@dfinity/candid
Advanced tools
Comparing version 0.20.0-beta.0 to 0.20.0
@@ -27,2 +27,4 @@ "use strict"; | ||
exports.renderValue = exports.renderInput = exports.Render = exports.vecForm = exports.optForm = exports.variantForm = exports.tupleForm = exports.recordForm = exports.inputBox = void 0; | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
const IDL = __importStar(require("./idl")); | ||
@@ -29,0 +31,0 @@ const principal_1 = require("@dfinity/principal"); |
@@ -226,3 +226,2 @@ import { Principal as PrincipalId } from '@dfinity/principal'; | ||
* Arrays of float or other non-primitive types are encoded/decoded as untyped array in Javascript. | ||
* | ||
* @param {Type} t | ||
@@ -261,3 +260,3 @@ */ | ||
* Represents an IDL Record | ||
* @param {Object} [fields] - mapping of function name to Type | ||
* @param {object} [fields] - mapping of function name to Type | ||
*/ | ||
@@ -293,3 +292,3 @@ export declare class RecordClass extends ConstructType<Record<string, any>> { | ||
* Represents an IDL Variant | ||
* @param {Object} [fields] - mapping of function name to Type | ||
* @param {object} [fields] - mapping of function name to Type | ||
*/ | ||
@@ -296,0 +295,0 @@ export declare class VariantClass extends ConstructType<Record<string, any>> { |
@@ -5,3 +5,4 @@ "use strict"; | ||
exports.Service = exports.Func = exports.Rec = void 0; | ||
// tslint:disable:max-classes-per-file | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
const principal_1 = require("@dfinity/principal"); | ||
@@ -159,2 +160,3 @@ const buffer_1 = require("./utils/buffer"); | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
_buildTypeTableImpl(typeTable) { | ||
@@ -624,3 +626,2 @@ // No type table encoding for Primitive types. | ||
* Arrays of float or other non-primitive types are encoded/decoded as untyped array in Javascript. | ||
* | ||
* @param {Type} t | ||
@@ -808,3 +809,3 @@ */ | ||
* Represents an IDL Record | ||
* @param {Object} [fields] - mapping of function name to Type | ||
* @param {object} [fields] - mapping of function name to Type | ||
*/ | ||
@@ -992,3 +993,3 @@ class RecordClass extends ConstructType { | ||
* Represents an IDL Variant | ||
* @param {Object} [fields] - mapping of function name to Type | ||
* @param {object} [fields] - mapping of function name to Type | ||
*/ | ||
@@ -995,0 +996,0 @@ class VariantClass extends ConstructType { |
/** | ||
* Equivalent to `Math.log2(n)` with support for `BigInt` values | ||
* | ||
* @param n bigint or integer | ||
@@ -11,3 +10,2 @@ * @returns integer | ||
* (necessary for browser preprocessors which replace the `**` operator with `Math.pow`) | ||
* | ||
* @param n bigint or integer | ||
@@ -14,0 +12,0 @@ * @returns bigint |
@@ -6,3 +6,2 @@ "use strict"; | ||
* Equivalent to `Math.log2(n)` with support for `BigInt` values | ||
* | ||
* @param n bigint or integer | ||
@@ -22,3 +21,2 @@ * @returns integer | ||
* (necessary for browser preprocessors which replace the `**` operator with `Math.pow`) | ||
* | ||
* @param n bigint or integer | ||
@@ -25,0 +23,0 @@ * @returns bigint |
@@ -98,3 +98,2 @@ "use strict"; | ||
// Add a little bit of exponential growth. | ||
// tslint:disable-next-line:no-bitwise | ||
const b = new ArrayBuffer(((this._buffer.byteLength + amount) * 1.2) | 0); | ||
@@ -101,0 +100,0 @@ const v = new Uint8Array(b, 0, this._view.byteLength + amount); |
@@ -5,3 +5,2 @@ "use strict"; | ||
/* eslint-disable no-constant-condition */ | ||
// tslint:disable:no-bitwise | ||
// Note: this file uses buffer-pipe, which on Node only, uses the Node Buffer | ||
@@ -8,0 +7,0 @@ // implementation, which isn't compatible with the NPM buffer package |
@@ -0,1 +1,3 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
import * as IDL from './idl'; | ||
@@ -2,0 +4,0 @@ import { Principal } from '@dfinity/principal'; |
@@ -226,3 +226,2 @@ import { Principal as PrincipalId } from '@dfinity/principal'; | ||
* Arrays of float or other non-primitive types are encoded/decoded as untyped array in Javascript. | ||
* | ||
* @param {Type} t | ||
@@ -261,3 +260,3 @@ */ | ||
* Represents an IDL Record | ||
* @param {Object} [fields] - mapping of function name to Type | ||
* @param {object} [fields] - mapping of function name to Type | ||
*/ | ||
@@ -293,3 +292,3 @@ export declare class RecordClass extends ConstructType<Record<string, any>> { | ||
* Represents an IDL Variant | ||
* @param {Object} [fields] - mapping of function name to Type | ||
* @param {object} [fields] - mapping of function name to Type | ||
*/ | ||
@@ -296,0 +295,0 @@ export declare class VariantClass extends ConstructType<Record<string, any>> { |
@@ -1,2 +0,3 @@ | ||
// tslint:disable:max-classes-per-file | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { Principal as PrincipalId } from '@dfinity/principal'; | ||
@@ -152,2 +153,3 @@ import { concat, PipeArrayBuffer as Pipe } from './utils/buffer'; | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
_buildTypeTableImpl(typeTable) { | ||
@@ -604,3 +606,2 @@ // No type table encoding for Primitive types. | ||
* Arrays of float or other non-primitive types are encoded/decoded as untyped array in Javascript. | ||
* | ||
* @param {Type} t | ||
@@ -786,3 +787,3 @@ */ | ||
* Represents an IDL Record | ||
* @param {Object} [fields] - mapping of function name to Type | ||
* @param {object} [fields] - mapping of function name to Type | ||
*/ | ||
@@ -968,3 +969,3 @@ export class RecordClass extends ConstructType { | ||
* Represents an IDL Variant | ||
* @param {Object} [fields] - mapping of function name to Type | ||
* @param {object} [fields] - mapping of function name to Type | ||
*/ | ||
@@ -971,0 +972,0 @@ export class VariantClass extends ConstructType { |
/** | ||
* Equivalent to `Math.log2(n)` with support for `BigInt` values | ||
* | ||
* @param n bigint or integer | ||
@@ -11,3 +10,2 @@ * @returns integer | ||
* (necessary for browser preprocessors which replace the `**` operator with `Math.pow`) | ||
* | ||
* @param n bigint or integer | ||
@@ -14,0 +12,0 @@ * @returns bigint |
/** | ||
* Equivalent to `Math.log2(n)` with support for `BigInt` values | ||
* | ||
* @param n bigint or integer | ||
@@ -17,3 +16,2 @@ * @returns integer | ||
* (necessary for browser preprocessors which replace the `**` operator with `Math.pow`) | ||
* | ||
* @param n bigint or integer | ||
@@ -20,0 +18,0 @@ * @returns bigint |
@@ -92,3 +92,2 @@ /** | ||
// Add a little bit of exponential growth. | ||
// tslint:disable-next-line:no-bitwise | ||
const b = new ArrayBuffer(((this._buffer.byteLength + amount) * 1.2) | 0); | ||
@@ -95,0 +94,0 @@ const v = new Uint8Array(b, 0, this._view.byteLength + amount); |
/* eslint-disable no-constant-condition */ | ||
// tslint:disable:no-bitwise | ||
// Note: this file uses buffer-pipe, which on Node only, uses the Node Buffer | ||
@@ -4,0 +3,0 @@ // implementation, which isn't compatible with the NPM buffer package |
{ | ||
"name": "@dfinity/candid", | ||
"version": "0.20.0-beta.0", | ||
"version": "0.20.0", | ||
"author": "DFINITY Stiftung <sdk@dfinity.org>", | ||
@@ -48,24 +48,20 @@ "license": "Apache-2.0", | ||
"test": "jest", | ||
"test:coverage": "jest --verbose --collectCoverage" | ||
"test:coverage": "jest --collectCoverage" | ||
}, | ||
"peerDependencies": { | ||
"@dfinity/principal": "^0.20.0-beta.0" | ||
"@dfinity/principal": "^0.20.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^28.1.4", | ||
"@types/jest": "^29.5.5", | ||
"@typescript-eslint/eslint-plugin": "^5.30.5", | ||
"@typescript-eslint/parser": "^5.30.5", | ||
"esbuild": "^0.15.16", | ||
"eslint-plugin-jsdoc": "^39.3.3", | ||
"eslint": "^8.19.0", | ||
"jest": "^29.7.0", | ||
"jest-diff": "^27.3.1", | ||
"jest": "^28.1.2", | ||
"prettier": "^2.0.5", | ||
"size-limit": "^8.2.6", | ||
"text-encoding": "^0.7.0", | ||
"ts-jest": "^28.0.5", | ||
"ts-node": "^10.8.2", | ||
"tslint": "^5.20.0", | ||
"typedoc": "^0.22.11", | ||
"typescript": "^4.7.4", | ||
"whatwg-fetch": "^3.0.0" | ||
@@ -72,0 +68,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
642859
13
6742