🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@types/ref-struct

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/ref-struct - npm Package Compare versions

Comparing version
0.0.27
to
0.0.28
+59
ref-struct/index.d.ts
// Type definitions for ref-struct
// Project: https://github.com/TooTallNate/ref-struct
// Definitions by: Paul Loyd <https://github.com/loyd>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
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;
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: ref.Type): 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: string): void;
/**
* 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;
{
"name": "@types/ref-struct",
"version": "0.0.28",
"description": "TypeScript definitions for ref-struct",
"license": "MIT",
"author": "Paul Loyd <https://github.com/loyd>",
"main": "",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"dependencies": {
"@types/ref": "*"
},
"typings": "index.d.ts",
"typesPublisherContentHash": "edc9a6d902088050fd92e4336c09d5ea6c48645e0589ddf8c1513cbad48f55ab"
}
# Installation
> `npm install --save @types/ref-struct`
# Summary
This package contains type definitions for ref-struct (https://github.com/TooTallNate/ref-struct).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/ref-struct
Additional Details
* Last updated: Mon, 19 Sep 2016 17:28:59 GMT
* File structure: ProperModule
* Library Dependencies: none
* Module Dependencies: ref
* Global values: StructType
# Credits
These definitions were written by Paul Loyd <https://github.com/loyd>.
{
"authors": "Paul Loyd <https://github.com/loyd>",
"definitionFilename": "index.d.ts",
"libraryDependencies": [],
"moduleDependencies": [
"ref"
],
"libraryMajorVersion": "0",
"libraryMinorVersion": "0",
"libraryName": "ref-struct",
"typingsPackageName": "ref-struct",
"projectName": "https://github.com/TooTallNate/ref-struct",
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
"sourceBranch": "types-2.0",
"kind": "ProperModule",
"globals": [
"StructType"
],
"declaredModules": [
"ref-struct"
],
"files": [
"index.d.ts"
],
"hasPackageJson": false,
"contentHash": "edc9a6d902088050fd92e4336c09d5ea6c48645e0589ddf8c1513cbad48f55ab"
}
-59
// Type definitions for ref-struct
// Project: https://github.com/TooTallNate/ref-struct
// Definitions by: Paul Loyd <https://github.com/loyd>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
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;
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: ref.Type): 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: string): void;
/**
* 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;
{
"name": "@types/ref-struct",
"version": "0.0.27",
"description": "TypeScript definitions for ref-struct",
"main": "",
"scripts": {},
"author": "Paul Loyd <https://github.com/loyd>",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"license": "MIT",
"typings": "index.d.ts",
"dependencies": {
"@types/ref": "0.0.*"
}
}
# Installation
> `npm install --save @types/ref-struct`
# Summary
This package contains type definitions for ref-struct (https://github.com/TooTallNate/ref-struct).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/ref-struct
Additional Details
* Last updated: Thu, 14 Jul 2016 13:52:50 GMT
* File structure: ProperModule
* Library Dependencies: none
* Module Dependencies: ref
* Global values: StructType
# Credits
These definitions were written by Paul Loyd <https://github.com/loyd>.
{
"authors": "Paul Loyd <https://github.com/loyd>",
"definitionFilename": "index.d.ts",
"libraryDependencies": [],
"moduleDependencies": [
"ref"
],
"libraryMajorVersion": "0",
"libraryMinorVersion": "0",
"libraryName": "ref-struct",
"typingsPackageName": "ref-struct",
"projectName": "https://github.com/TooTallNate/ref-struct",
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
"sourceBranch": "types-2.0",
"kind": "ProperModule",
"globals": [
"StructType"
],
"declaredModules": [
"ref-struct"
],
"files": [
"index.d.ts"
],
"contentHash": "edc9a6d902088050fd92e4336c09d5ea6c48645e0589ddf8c1513cbad48f55ab"
}