@types/ref-struct
Advanced tools
@@ -17,3 +17,2 @@ // Type definitions for ref-struct | ||
| * | ||
| * @constructor | ||
| */ | ||
@@ -20,0 +19,0 @@ interface StructType extends ref.Type { |
| MIT License | ||
| Copyright (c) Microsoft Corporation. All rights reserved. | ||
| Copyright (c) Microsoft Corporation. | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
| { | ||
| "name": "@types/ref-struct", | ||
| "version": "0.0.29", | ||
| "version": "0.0.30", | ||
| "description": "TypeScript definitions for ref-struct", | ||
| "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ref-struct", | ||
| "license": "MIT", | ||
@@ -14,5 +15,7 @@ "contributors": [ | ||
| "main": "", | ||
| "types": "index.d.ts", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
| "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
| "directory": "types/ref-struct" | ||
| }, | ||
@@ -23,4 +26,4 @@ "scripts": {}, | ||
| }, | ||
| "typesPublisherContentHash": "c5bdd0537bc1117e6e195cb911c179f9a26298915099c81ee66096c53a2376f7", | ||
| "typeScriptVersion": "2.2" | ||
| "typesPublisherContentHash": "dc304dea66acf539a04aefa51bbe436472cd70bc8a5669264c2315f9b27144ec", | ||
| "typeScriptVersion": "4.3" | ||
| } |
+68
-5
@@ -8,10 +8,73 @@ # Installation | ||
| # Details | ||
| Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ref-struct | ||
| Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ref-struct. | ||
| ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ref-struct/index.d.ts) | ||
| ````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 | ||
| // TypeScript Version: 2.2 | ||
| Additional Details | ||
| * Last updated: Tue, 02 Jan 2018 21:15:24 GMT | ||
| * Dependencies: ref | ||
| 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. | ||
| * | ||
| */ | ||
| 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?: object, opt?: object): StructType; | ||
| new (fields?: any[]): StructType; | ||
| (fields?: object, opt?: object): StructType; | ||
| (fields?: any[]): StructType; | ||
| } | ||
| export = StructType; | ||
| ```` | ||
| ### Additional Details | ||
| * Last updated: Sat, 29 Apr 2023 04:03:42 GMT | ||
| * Dependencies: [@types/ref](https://npmjs.com/package/@types/ref) | ||
| * Global values: none | ||
| # Credits | ||
| These definitions were written by Paul Loyd <https://github.com/loyd>. | ||
| These definitions were written by [Paul Loyd](https://github.com/loyd). |
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6785
53.96%1
-50%80
370.59%51
-1.92%