+ Added writable
This commit is contained in:
parent
7500ba502f
commit
482c90b53b
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ztimson/utils",
|
||||
"version": "0.24.5",
|
||||
"version": "0.24.6",
|
||||
"description": "Utility library",
|
||||
"author": "Zak Timson",
|
||||
"license": "MIT",
|
||||
|
@ -18,3 +18,10 @@
|
||||
export function typeKeys<T extends object>() {
|
||||
return Object.keys(<T>{}) as Array<keyof T>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark all properties as writable
|
||||
*/
|
||||
type Writable<T> = {
|
||||
-readonly [P in keyof T]: T[P]
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user