diff --git a/types/ffi/index.d.ts b/types/ffi/index.d.ts index 76e197e841..cf562cea06 100644 --- a/types/ffi/index.d.ts +++ b/types/ffi/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for node-ffi 0.1 +// Type definitions for node-ffi 0.2 // Project: https://github.com/rbranson/node-ffi -// Definitions by: Paul Loyd +// Definitions by: Paul Loyd , Waiting Song // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -135,12 +135,13 @@ export const DynamicLibrary: { * The function pointer may be used in other C functions that * accept C callback functions. */ -export const Callback: { +export interface Callback { new (retType: any, argTypes: any[], abi: number, fn: any): Buffer; new (retType: any, argTypes: any[], fn: any): Buffer; (retType: any, argTypes: any[], abi: number, fn: any): Buffer; (retType: any, argTypes: any[], fn: any): Buffer; -}; +} +export const Callback: Callback; export const ffiType: { /** Get a `ffi_type *` Buffer appropriate for the given type. */