mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-06 13:11:46 +00:00
Unwrap all lone ambient external modules
This commit is contained in:
Vendored
+47
-48
@@ -6,59 +6,58 @@
|
||||
/// <reference path="../node-ffi/node-ffi-buffer.d.ts" />
|
||||
/// <reference path="../ref/ref.d.ts" />
|
||||
|
||||
declare module "ref-struct" {
|
||||
import ref = require('ref');
|
||||
|
||||
/**
|
||||
* This is the `constructor` of the Struct type that gets returned.
|
||||
*
|
||||
* Invoke it with `new` to create a new Buffer instance backing the struct.
|
||||
* Pass it an existing Buffer instance to use that as the backing buffer.
|
||||
* Pass in an Object containing the struct fields to auto-populate the
|
||||
* struct with the data.
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
interface StructType extends ref.Type {
|
||||
/** Pass it an existing Buffer instance to use that as the backing buffer. */
|
||||
new (arg: Buffer, data?: {}): any;
|
||||
new (data?: {}): any;
|
||||
/** Pass it an existing Buffer instance to use that as the backing buffer. */
|
||||
(arg: Buffer, data?: {}): any;
|
||||
(data?: {}): any;
|
||||
import ref = require('ref');
|
||||
|
||||
fields: {[key: string]: {type: ref.Type}};
|
||||
/**
|
||||
* This is the `constructor` of the Struct type that gets returned.
|
||||
*
|
||||
* Invoke it with `new` to create a new Buffer instance backing the struct.
|
||||
* Pass it an existing Buffer instance to use that as the backing buffer.
|
||||
* Pass in an Object containing the struct fields to auto-populate the
|
||||
* struct with the data.
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
interface StructType extends ref.Type {
|
||||
/** Pass it an existing Buffer instance to use that as the backing buffer. */
|
||||
new (arg: Buffer, data?: {}): any;
|
||||
new (data?: {}): any;
|
||||
/** Pass it an existing Buffer instance to use that as the backing buffer. */
|
||||
(arg: Buffer, data?: {}): any;
|
||||
(data?: {}): any;
|
||||
|
||||
/**
|
||||
* Adds a new field to the struct instance with the given name and type.
|
||||
* Note that this function will throw an Error if any instances of the struct
|
||||
* type have already been created, therefore this function must be called at the
|
||||
* beginning, before any instances are created.
|
||||
*/
|
||||
defineProperty(name: string, type: ref.Type): void;
|
||||
fields: { [key: string]: { type: ref.Type } };
|
||||
|
||||
/**
|
||||
* Adds a new field to the struct instance with the given name and type.
|
||||
* Note that this function will throw an Error if any instances of the struct
|
||||
* type have already been created, therefore this function must be called at the
|
||||
* beginning, before any instances are created.
|
||||
*/
|
||||
defineProperty(name: string, type: string): void;
|
||||
/**
|
||||
* Adds a new field to the struct instance with the given name and type.
|
||||
* Note that this function will throw an Error if any instances of the struct
|
||||
* type have already been created, therefore this function must be called at the
|
||||
* beginning, before any instances are created.
|
||||
*/
|
||||
defineProperty(name: string, type: ref.Type): void;
|
||||
|
||||
/**
|
||||
* Custom for struct type instances.
|
||||
* @override
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
/**
|
||||
* Adds a new field to the struct instance with the given name and type.
|
||||
* Note that this function will throw an Error if any instances of the struct
|
||||
* type have already been created, therefore this function must be called at the
|
||||
* beginning, before any instances are created.
|
||||
*/
|
||||
defineProperty(name: string, type: string): void;
|
||||
|
||||
/** The struct type meta-constructor. */
|
||||
var StructType: {
|
||||
new (fields?: {}): StructType;
|
||||
new (fields?: any[]): StructType;
|
||||
(fields?: {}): StructType;
|
||||
(fields?: any[]): StructType;
|
||||
}
|
||||
/**
|
||||
* Custom for struct type instances.
|
||||
* @override
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** The struct type meta-constructor. */
|
||||
declare var StructType: {
|
||||
new (fields?: {}): StructType;
|
||||
new (fields?: any[]): StructType;
|
||||
(fields?: {}): StructType;
|
||||
(fields?: any[]): StructType;
|
||||
}
|
||||
|
||||
export = StructType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user