@@ -13,7 +13,7 @@ export class GPU {
13
13
nativeFunctions : IGPUNativeFunction [ ] ;
14
14
setFunctions ( flag : any ) : this;
15
15
setNativeFunctions ( flag : IGPUNativeFunction [ ] ) : this;
16
- addFunction ( kernel : GPUFunction , settings ?: IGPUFunctionSettings ) : this;
16
+ addFunction < ArgTypes extends ThreadKernelVariable [ ] = ThreadKernelVariable [ ] , ConstantsType = { } > ( kernel : GPUFunction < ArgTypes , ConstantsType > , settings ?: IGPUFunctionSettings ) : this;
17
17
addNativeFunction ( name : string , source : string , settings ?: IGPUFunctionSettings ) : this;
18
18
combineKernels ( ...kernels : KernelFunction [ ] ) : IKernelRunShortcut ;
19
19
combineKernels < KF extends KernelFunction > ( ...kernels : KF [ ] ) :
@@ -617,7 +617,7 @@ export class Input {
617
617
618
618
export type input = ( value : number [ ] , size : OutputDimensions ) => Input ;
619
619
620
- export function alias ( name : string , source : KernelFunction ) : KernelFunction ;
620
+ export function alias < T > ( name : string , source : T ) : T ;
621
621
622
622
export class KernelValue {
623
623
constructor ( value : KernelVariable , settings : IKernelValueSettings ) ;
@@ -657,8 +657,8 @@ export interface IJSONSettings {
657
657
threadDim ?: number [ ] ;
658
658
}
659
659
660
- export type utils = {
661
- getMinifySafeName ( arrowReference : ( ) => Function ) : string ;
660
+ export declare const utils : {
661
+ getMinifySafeName : < T > ( arrowReference : ( ) => T ) => string
662
662
}
663
663
664
664
export interface IReason {
0 commit comments