Skip to content

Commit dae630f

Browse files
committed
feat(core): adjust internal types
1 parent 6d3e0ed commit dae630f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

libs/core/src/lib/three-types.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,11 @@ export type NgtNodeElement<TOriginal, TConstructor> = {
196196
__ngt_args__: NgtArguments<TConstructor>;
197197
};
198198

199-
export type NgtNode<TOriginal, TConstructor, TNoEvent = NoEvent<TOriginal>> = Expand<
200-
NgtExtendedColors<NgtOverwrite<Partial<TNoEvent>, NgtNodeElement<TOriginal, TConstructor>>>
201-
>;
199+
export type NgtNode<TOriginal, TConstructor, TNoEvent = NoEvent<TOriginal>> = [TNoEvent] extends [
200+
{ thisShouldNeverHappen: 'unless the object is of type any' },
201+
]
202+
? NgtExtendedColors<NgtOverwrite<Partial<{}>, NgtNodeElement<{}, {}>>>
203+
: NgtExtendedColors<NgtOverwrite<Partial<TNoEvent>, NgtNodeElement<TOriginal, TConstructor>>>;
202204

203205
export type NgtObject3DEventsMap = {
204206
[TEvent in keyof NgtEventHandlers]-?: Parameters<NonNullable<NgtEventHandlers[TEvent]>>[0];

libs/core/src/lib/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
import { NgtObject3DNode } from './three-types';
2121
import { NgtSignalStore } from './utils/signal-store';
2222

23-
export type NgtProperties<T> = Pick<T, { [K in keyof T]: T[K] extends (_: any) => any ? never : K }[keyof T]>;
23+
export type NgtProperties<T> = { [K in keyof T as T[K] extends (...args: Array<any>) => any ? never : K]: T[K] };
2424
export type NgtAnyRecord = Record<string, any>;
2525

2626
export type NgtEquConfig = {

0 commit comments

Comments
 (0)