Skip to content

Commit

Permalink
Add DeepReadonly (#3)
Browse files Browse the repository at this point in the history
* Add `DeepReadonly`

* Update package.json
  • Loading branch information
chkn committed May 3, 2024
1 parent 93e600f commit 4c3d12f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@glideapps/ts-necessities",
"version": "2.2.3",
"version": "2.2.4",
"description": "Small utilities to make life with TypeScript easier",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export type Writable<T> = { -readonly [P in keyof T]: T[P] };

export type DeepWritable<T> = { -readonly [P in keyof T]: DeepWritable<T[P]> };

export type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]> };

/**
* If `x` is undefined, return `undefined`. Otherwise, return `f(x)`.
*/
Expand Down

0 comments on commit 4c3d12f

Please sign in to comment.