structurae
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -238,2 +238,3 @@ // Type definitions for structurae | ||
itemLength?: number; | ||
default?: any; | ||
} | ||
@@ -245,7 +246,13 @@ | ||
interface ObjectViewTypeDefs { | ||
[propName: string]: (field: ObjectViewField) => void; | ||
} | ||
export declare class ObjectView extends DataView { | ||
static fields: string[]; | ||
static types: ObjectViewTypeDefs; | ||
static schema: ObjectViewSchema; | ||
static isInitialized: boolean; | ||
static objectLength: number; | ||
private static fields: string[]; | ||
private static objectLength: number; | ||
private static defaultBuffer: ArrayBuffer; | ||
@@ -252,0 +259,0 @@ get(field: string): number | View; |
@@ -34,5 +34,14 @@ const StringView = require('./string-view'); | ||
* @property {number} [itemLength] | ||
* @property {*} [default] | ||
*/ | ||
/** | ||
* @typedef {Object<string, ObjectViewField>} ObjectViewSchema | ||
*/ | ||
/** | ||
* @typedef {Object<string, Function>} ObjectViewTypeDefs | ||
*/ | ||
/** | ||
* A DataView based C-like struct to store JavaScript objects in ArrayBuffer. | ||
@@ -299,2 +308,5 @@ * | ||
/** | ||
* @type {ObjectViewTypeDefs} | ||
*/ | ||
ObjectView.types = { | ||
@@ -358,14 +370,18 @@ /** | ||
/** | ||
* @private | ||
* @type {Array<ObjectViewField>} | ||
* @type {ObjectViewSchema} | ||
*/ | ||
ObjectView.fields = undefined; | ||
ObjectView.schema = undefined; | ||
/** @type {boolean} */ | ||
ObjectView.isInitialized = false; | ||
/** | ||
* @private | ||
* @type {Array<string>} | ||
*/ | ||
ObjectView.schema = undefined; | ||
ObjectView.fields = undefined; | ||
/** | ||
* @private | ||
* @type {number} | ||
*/ | ||
@@ -380,5 +396,2 @@ ObjectView.objectLength = 0; | ||
/** @type {boolean} */ | ||
ObjectView.isInitialized = false; | ||
/** | ||
@@ -385,0 +398,0 @@ * Creates an ObjectView class with a given schema. |
{ | ||
"name": "structurae", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Data structures for performance-sensitive modern JavaScript applications.", | ||
@@ -47,7 +47,7 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@types/jest": "^24.0.23", | ||
"@types/jest": "^24.0.25", | ||
"benchmark": "^2.1.4", | ||
"eslint": "^6.6.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-import": "^2.19.1", | ||
"jest": "^24.9.0", | ||
@@ -54,0 +54,0 @@ "jsdoc-to-markdown": "^5.0.3", |
195554
5425