mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [ref-struct]: add opt parameter to allow create packed struct * Set TypeScript version to 2.2 for package depending on ref-struct
13 lines
252 B
TypeScript
13 lines
252 B
TypeScript
import ref = require("ref");
|
|
import StructType = require("ref-struct");
|
|
|
|
const normalStruct = StructType({
|
|
t: ref.types.uint8,
|
|
v: ref.types.long,
|
|
});
|
|
|
|
const packedStruct = StructType({
|
|
t: ref.types.uint8,
|
|
v: ref.types.long,
|
|
}, {packed: true});
|