demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/call-bind-apply-helpers-1.0.2/index.d.ts

Path
demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/call-bind-apply-helpers-1.0.2/index.d.ts
Status
scanned
Type
file
Name
index.d.ts
Extension
.ts
Programming language
TypeScript
Mime type
text/plain
File type
ASCII text
Tag

      
    
Rootfs path

      
    
Size
2226 (2.2 KB)
MD5
bc872a81b1e8a5ff8356a9ad0f0d1ddd
SHA1
a25f20d5efeb3c3a72682cfe9240977c45664d9b
SHA256
47f88260dacdcbb125448220446b7f71a48fb392267ec81db281f50fd380def2
SHA512

      
    
SHA1_git
541516bd0f23194a87482e272f48439100b70c73
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
index.d.ts | 2.2 KB |

type RemoveFromTuple< Tuple extends readonly unknown[], RemoveCount extends number, Index extends 1[] = [] > = Index["length"] extends RemoveCount ? Tuple : Tuple extends [infer First, ...infer Rest] ? RemoveFromTuple<Rest, RemoveCount, [...Index, 1]> : Tuple; type ConcatTuples< Prefix extends readonly unknown[], Suffix extends readonly unknown[] > = [...Prefix, ...Suffix]; type ExtractFunctionParams<T> = T extends (this: infer TThis, ...args: infer P extends readonly unknown[]) => infer R ? { thisArg: TThis; params: P; returnType: R } : never; type BindFunction< T extends (this: any, ...args: any[]) => any, TThis, TBoundArgs extends readonly unknown[], ReceiverBound extends boolean > = ExtractFunctionParams<T> extends { thisArg: infer OrigThis; params: infer P extends readonly unknown[]; returnType: infer R; } ? ReceiverBound extends true ? (...args: RemoveFromTuple<P, Extract<TBoundArgs["length"], number>>) => R extends [OrigThis, ...infer Rest] ? [TThis, ...Rest] // Replace `this` with `thisArg` : R : <U, RemainingArgs extends RemoveFromTuple<P, Extract<TBoundArgs["length"], number>>>( thisArg: U, ...args: RemainingArgs ) => R extends [OrigThis, ...infer Rest] ? [U, ...ConcatTuples<TBoundArgs, Rest>] // Preserve bound args in return type : R : never; declare function callBind< const T extends (this: any, ...args: any[]) => any, Extracted extends ExtractFunctionParams<T>, const TBoundArgs extends Partial<Extracted["params"]> & readonly unknown[], const TThis extends Extracted["thisArg"] >( args: [fn: T, thisArg: TThis, ...boundArgs: TBoundArgs] ): BindFunction<T, TThis, TBoundArgs, true>; declare function callBind< const T extends (this: any, ...args: any[]) => any, Extracted extends ExtractFunctionParams<T>, const TBoundArgs extends Partial<Extracted["params"]> & readonly unknown[] >( args: [fn: T, ...boundArgs: TBoundArgs] ): BindFunction<T, Extracted["thisArg"], TBoundArgs, false>; declare function callBind<const TArgs extends readonly unknown[]>( args: [fn: Exclude<TArgs[0], Function>, ...rest: TArgs] ): never; // export as namespace callBind; export = callBind;
Package URL License Primary language
pkg:npm/call-bind-apply-helpers@1.0.2 mit JavaScript
pkg:npm/acme-demo-app@1.0.0 JavaScript