@@ -22,12 +22,7 @@ import {
22
22
type TgpuSlot ,
23
23
} from '../slot/slotTypes.ts' ;
24
24
import { createFnCore , type FnCore } from './fnCore.ts' ;
25
- import type {
26
- Implementation ,
27
- InferArgs ,
28
- InferReturn ,
29
- JsImplementation ,
30
- } from './fnTypes.ts' ;
25
+ import type { Implementation , InferArgs , JsImplementation } from './fnTypes.ts' ;
31
26
import { stripTemplate } from './templateUtils.ts' ;
32
27
33
28
// ----------
@@ -58,7 +53,7 @@ export type TgpuFnShell<
58
53
> =
59
54
& TgpuFnShellHeader < Args , Return >
60
55
& ( (
61
- implementation : ( ...args : InferArgs < Args > ) => InferReturn < Return > ,
56
+ implementation : ( ...args : InferArgs < Args > ) => Infer < Return > ,
62
57
) => TgpuFn < Args , Return > )
63
58
& ( ( implementation : string ) => TgpuFn < Args , Return > )
64
59
& ( (
@@ -73,7 +68,7 @@ export type TgpuFnShell<
73
68
& ( (
74
69
implementation : (
75
70
...args : InferArgs < Args >
76
- ) => InferReturn < Return > ,
71
+ ) => Infer < Return > ,
77
72
) => TgpuFn < Args , Return > )
78
73
& ( ( implementation : string ) => TgpuFn < Args , Return > ) ;
79
74
} ;
@@ -103,7 +98,7 @@ export type TgpuFn<
103
98
Return extends AnyData = AnyData ,
104
99
> =
105
100
& TgpuFnBase < Args , Return >
106
- & ( ( ...args : InferArgs < Args > ) => InferReturn < Return > ) ;
101
+ & ( ( ...args : InferArgs < Args > ) => Infer < Return > ) ;
107
102
108
103
export function fn <
109
104
Args extends AnyData [ ] | [ ] ,
@@ -135,7 +130,7 @@ export function fn<
135
130
} ) as TgpuFnShell < Args , Return > ;
136
131
}
137
132
138
- export function isTgpuFn < Args extends AnyData [ ] , Return extends AnyData > (
133
+ export function isTgpuFn < Args extends AnyData [ ] | [ ] , Return extends AnyData > (
139
134
value : unknown | TgpuFn < Args , Return > ,
140
135
) : value is TgpuFn < Args , Return > {
141
136
return ! ! ( value as TgpuFn < Args , Return > ) ?. [ $internal ] &&
0 commit comments