@@ -11,7 +11,7 @@ import type {
1111export type NgtNonFunctionKeys < T > = { [ K in keyof T ] -?: T [ K ] extends Function ? never : K } [ keyof T ] ;
1212export type NgtOverwrite < T , O > = Omit < T , NgtNonFunctionKeys < O > > & O ;
1313export type NgtProperties < T > = Pick < T , NgtNonFunctionKeys < T > > ;
14- export type NgtMutable < P > = { [ K in keyof P ] : P [ K ] | Readonly < P [ K ] > } ;
14+ export type NgtMutable < P > = { [ K in keyof P ] : P [ K ] extends Array < any > ? P [ K ] : P [ K ] | Readonly < P [ K ] > } ;
1515
1616export interface NgtMathRepresentation {
1717 set ( ...args : number [ ] ) : any ;
@@ -33,6 +33,15 @@ export type NgtMathProperties<P> = {
3333 [ K in keyof P as P [ K ] extends NgtMathTypes ? K : never ] : P [ K ] extends NgtMathTypes ? NgtMathType < P [ K ] > : never ;
3434} ;
3535
36+ export type NgtIsProperties < P > = {
37+ [ K in keyof P as P [ K ] extends true ? K : never ] : true ;
38+ } ;
39+
40+ export type NgtNonMutableProperties = 'id' | 'uuid' | 'name' | 'type' | 'parent' | 'children' ;
41+ export type NgtNonPartialProperties < P > = {
42+ [ K in keyof P as K extends NgtNonMutableProperties ? K : never ] : P [ K ] ;
43+ } ;
44+
3645export type NgtNullableRaycast < P > = {
3746 [ K in keyof P as K extends 'raycast' ? K : never ] : K extends 'raycast' ? P [ K ] | null : never ;
3847} ;
@@ -109,6 +118,8 @@ export type NgtElementProperties<
109118 TConstructor extends NgtConstructorRepresentation ,
110119 TInstance = InstanceType < TConstructor > ,
111120> = Partial < NgtOverwrite < TInstance , NgtMathProperties < TInstance > & NgtNullableRaycast < TInstance > > > &
121+ NgtIsProperties < TInstance > &
122+ NgtNonPartialProperties < TInstance > &
112123 NgtNodeElement < TConstructor , TInstance > ;
113124
114125export type NgtThreeElement < TConstructor extends NgtConstructorRepresentation > = NgtMutable <
0 commit comments