typeson-registry 13.2.1 → 13.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +51 -1
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.cjs +74 -0
- package/dist/index.umd.cjs.map +1 -1
- package/dist/index.umd.min.cjs +1 -1
- package/dist/index.umd.min.cjs.map +1 -1
- package/dist/presets/structured-cloning-throwing.umd.cjs +1 -1
- package/dist/presets/structured-cloning-throwing.umd.cjs.map +1 -1
- package/dist/presets/structured-cloning.d.ts.map +1 -1
- package/dist/presets/structured-cloning.umd.cjs +1 -1
- package/dist/presets/structured-cloning.umd.cjs.map +1 -1
- package/dist/types/quotaexceedederror.d.ts +6 -0
- package/dist/types/quotaexceedederror.d.ts.map +1 -0
- package/dist/types/quotaexceedederror.umd.cjs +2 -0
- package/dist/types/quotaexceedederror.umd.cjs.map +1 -0
- package/dist/types/webtransporterror.d.ts +6 -0
- package/dist/types/webtransporterror.d.ts.map +1 -0
- package/dist/types/webtransporterror.umd.cjs +2 -0
- package/dist/types/webtransporterror.umd.cjs.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -257,6 +257,7 @@ Note that the type name corresponds to the file name in the following manner:
|
|
|
257
257
|
adding them as properties
|
|
258
258
|
- `primitive-objects.js` (`StringObject`, `BooleanObject`, `NumberObject`)
|
|
259
259
|
- `promise`
|
|
260
|
+
- `quotaexceedederror`
|
|
260
261
|
- `regexp`
|
|
261
262
|
- `resurrectable` - Resurrects any non-array object, function, or symbol; can
|
|
262
263
|
only be revived for the current window session.
|
|
@@ -275,6 +276,7 @@ Note that the type name corresponds to the file name in the following manner:
|
|
|
275
276
|
- `userObjects` - Allows for inherited objects but ensures the prototype chain
|
|
276
277
|
inherits from `Object` (or `null`). Should be low priority if one is
|
|
277
278
|
matching other objects as it will readily match many objects.
|
|
279
|
+
- `webtransporterror`
|
|
278
280
|
|
|
279
281
|
### Presets
|
|
280
282
|
|
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import negativeZero from './types/negative-zero.js';
|
|
|
28
28
|
import nonbuiltinIgnore from './types/nonbuiltin-ignore.js';
|
|
29
29
|
import primitiveObjects from './types/primitive-objects.js';
|
|
30
30
|
import promise from './types/promise.js';
|
|
31
|
+
import quotaexceedederror from './types/quotaexceedederror.js';
|
|
31
32
|
import regexp from './types/regexp.js';
|
|
32
33
|
import resurrectable from './types/resurrectable.js';
|
|
33
34
|
import set from './types/set.js';
|
|
@@ -36,6 +37,7 @@ import typedArraysSocketio from './types/typed-arrays-socketio.js';
|
|
|
36
37
|
import typedArrays from './types/typed-arrays.js';
|
|
37
38
|
import undef from './types/undef.js';
|
|
38
39
|
import userObject from './types/user-object.js';
|
|
40
|
+
import webtransporterror from './types/webtransporterror.js';
|
|
39
41
|
import arrayNonindexKeys from './presets/array-nonindex-keys.js';
|
|
40
42
|
import builtin from './presets/builtin.js';
|
|
41
43
|
import postmessage from './presets/postmessage.js';
|
|
@@ -46,5 +48,5 @@ import structuredCloningThrowing from './presets/structured-cloning-throwing.js'
|
|
|
46
48
|
import structuredCloning from './presets/structured-cloning.js';
|
|
47
49
|
import undefPreset from './presets/undef.js';
|
|
48
50
|
import universal from './presets/universal.js';
|
|
49
|
-
export { arraybuffer, audiodata, bigintObject, bigint, blob, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domquad, domrect, error, errors, file, filelist, imagebitmap, imagedata, infinity, intlTypes, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, primitiveObjects, promise, regexp, resurrectable, set, symbol, typedArraysSocketio, typedArrays, undef, userObject, arrayNonindexKeys, builtin, postmessage, socketio, sparseUndefined, specialNumbers, structuredCloningThrowing, structuredCloning, undefPreset, universal };
|
|
51
|
+
export { arraybuffer, audiodata, bigintObject, bigint, blob, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domquad, domrect, error, errors, file, filelist, imagebitmap, imagedata, infinity, intlTypes, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, primitiveObjects, promise, quotaexceedederror, regexp, resurrectable, set, symbol, typedArraysSocketio, typedArrays, undef, userObject, webtransporterror, arrayNonindexKeys, builtin, postmessage, socketio, sparseUndefined, specialNumbers, structuredCloningThrowing, structuredCloning, undefPreset, universal };
|
|
50
52
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";wBAGwB,wBAAwB;sBAC1B,sBAAsB;yBACnB,0BAA0B;mBAChC,mBAAmB;iBACrB,iBAAiB;sBACZ,sBAAsB;sBACtB,sBAAsB;qBACvB,qBAAqB;iBACzB,iBAAiB;yBACT,yBAAyB;sBAC5B,sBAAsB;qBACvB,qBAAqB;oBACtB,oBAAoB;oBACpB,oBAAoB;kBACtB,kBAAkB;mBACjB,mBAAmB;iBACrB,iBAAiB;qBACb,qBAAqB;wBAClB,wBAAwB;sBAC1B,sBAAsB;qBACvB,qBAAqB;sBACpB,uBAAuB;gBAC7B,gBAAgB;gBAChB,gBAAgB;6BACH,8BAA8B;yBAClC,0BAA0B;6BACtB,8BAA8B;6BAC9B,8BAA8B;oBACvC,oBAAoB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";wBAGwB,wBAAwB;sBAC1B,sBAAsB;yBACnB,0BAA0B;mBAChC,mBAAmB;iBACrB,iBAAiB;sBACZ,sBAAsB;sBACtB,sBAAsB;qBACvB,qBAAqB;iBACzB,iBAAiB;yBACT,yBAAyB;sBAC5B,sBAAsB;qBACvB,qBAAqB;oBACtB,oBAAoB;oBACpB,oBAAoB;kBACtB,kBAAkB;mBACjB,mBAAmB;iBACrB,iBAAiB;qBACb,qBAAqB;wBAClB,wBAAwB;sBAC1B,sBAAsB;qBACvB,qBAAqB;sBACpB,uBAAuB;gBAC7B,gBAAgB;gBAChB,gBAAgB;6BACH,8BAA8B;yBAClC,0BAA0B;6BACtB,8BAA8B;6BAC9B,8BAA8B;oBACvC,oBAAoB;+BACT,+BAA+B;mBAC3C,mBAAmB;0BACZ,0BAA0B;gBACpC,gBAAgB;mBACb,mBAAmB;gCACN,kCAAkC;wBAC1C,yBAAyB;kBAC/B,kBAAkB;uBACb,wBAAwB;8BACjB,8BAA8B;8BAG9B,kCAAkC;oBAC5C,sBAAsB;wBAClB,0BAA0B;qBAC7B,uBAAuB;4BAChB,+BAA+B;2BAChC,8BAA8B;sCAErD,0CAA0C;8BAChB,iCAAiC;wBACvC,oBAAoB;sBACtB,wBAAwB"}
|
package/dist/index.js
CHANGED
|
@@ -1298,6 +1298,29 @@ const promise = {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
};
|
|
1300
1300
|
|
|
1301
|
+
/**
|
|
1302
|
+
* @type {import('typeson').TypeSpecSet}
|
|
1303
|
+
*/
|
|
1304
|
+
const quotaexceedederror = {
|
|
1305
|
+
quotaexceedederror: {
|
|
1306
|
+
test (x) { return toStringTag(x) === 'QuotaExceededError'; },
|
|
1307
|
+
replace ({message, quota, requested}) {
|
|
1308
|
+
return {message, quota, requested};
|
|
1309
|
+
},
|
|
1310
|
+
revive ({message, quota, requested}) {
|
|
1311
|
+
/** @type {{quota?: number, requested?: number}} */
|
|
1312
|
+
const options = {};
|
|
1313
|
+
if (quota !== null && quota !== undefined) {
|
|
1314
|
+
options.quota = quota;
|
|
1315
|
+
}
|
|
1316
|
+
if (requested !== null && requested !== undefined) {
|
|
1317
|
+
options.requested = requested;
|
|
1318
|
+
}
|
|
1319
|
+
return new QuotaExceededError(message, options);
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
};
|
|
1323
|
+
|
|
1301
1324
|
/**
|
|
1302
1325
|
* @type {import('typeson').TypeSpecSet}
|
|
1303
1326
|
*/
|
|
@@ -1589,6 +1612,29 @@ const userObject = {
|
|
|
1589
1612
|
}
|
|
1590
1613
|
};
|
|
1591
1614
|
|
|
1615
|
+
/* globals WebTransportError -- Newer API */
|
|
1616
|
+
|
|
1617
|
+
/**
|
|
1618
|
+
* @type {import('typeson').TypeSpecSet}
|
|
1619
|
+
*/
|
|
1620
|
+
const webtransporterror = {
|
|
1621
|
+
webtransporterror: {
|
|
1622
|
+
test (x) { return toStringTag(x) === 'WebTransportError'; },
|
|
1623
|
+
// Note that we can't support the `source` property (defaults
|
|
1624
|
+
// to `stream` instead of `session`)
|
|
1625
|
+
replace ({message, streamErrorCode}) {
|
|
1626
|
+
return {message, streamErrorCode};
|
|
1627
|
+
},
|
|
1628
|
+
revive ({message, streamErrorCode}) {
|
|
1629
|
+
// TS lib still models the older two-argument
|
|
1630
|
+
// `(message, options)` form; browsers implement a single
|
|
1631
|
+
// `init` object (which also carries `message`).
|
|
1632
|
+
// @ts-expect-error - More recent API
|
|
1633
|
+
return new WebTransportError({message, streamErrorCode});
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
};
|
|
1637
|
+
|
|
1592
1638
|
/**
|
|
1593
1639
|
* @type {import('typeson').Preset}
|
|
1594
1640
|
*/
|
|
@@ -1811,6 +1857,10 @@ const expObj = [
|
|
|
1811
1857
|
/* c8 ignore next */
|
|
1812
1858
|
typeof DOMException !== 'undefined' ? domexception : [],
|
|
1813
1859
|
/* c8 ignore next */
|
|
1860
|
+
typeof QuotaExceededError !== 'undefined' ? quotaexceedederror : [],
|
|
1861
|
+
/* c8 ignore next */
|
|
1862
|
+
typeof WebTransportError !== 'undefined' ? webtransporterror : [],
|
|
1863
|
+
/* c8 ignore next */
|
|
1814
1864
|
typeof DOMRect !== 'undefined' ? domrect : [],
|
|
1815
1865
|
/* c8 ignore next */
|
|
1816
1866
|
typeof DOMPoint !== 'undefined' ? dompoint : [],
|
|
@@ -1957,5 +2007,5 @@ const universal = [
|
|
|
1957
2007
|
// built-in into ecmasript standard.
|
|
1958
2008
|
];
|
|
1959
2009
|
|
|
1960
|
-
export { i$1 as JSON_TYPES, Typeson, TypesonPromise, Undefined, arrayNonindexKeys, arraybuffer, audiodata, bigint, bigintObject, blob, expObj$1 as builtin, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domquad, domrect, error, errors, escapeKeyPathComponent, file, filelist, getByKeyPath, getJSONType, hasConstructorOf, imagebitmap, imagedata, infinity, intlTypes, isObject, isPlainObject, isThenable, isUserObject, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, postmessage, primitiveObjects, promise, regexp, resurrectable, set, setAtKeyPath, socketio, sparseUndefined, specialNumbers, expObj as structuredCloning, structuredCloningThrowing, symbol, toStringTag, typedArrays, typedArraysSocketIO as typedArraysSocketio, undef$1 as undef, undef as undefPreset, unescapeKeyPathComponent, universal, userObject };
|
|
2010
|
+
export { i$1 as JSON_TYPES, Typeson, TypesonPromise, Undefined, arrayNonindexKeys, arraybuffer, audiodata, bigint, bigintObject, blob, expObj$1 as builtin, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domquad, domrect, error, errors, escapeKeyPathComponent, file, filelist, getByKeyPath, getJSONType, hasConstructorOf, imagebitmap, imagedata, infinity, intlTypes, isObject, isPlainObject, isThenable, isUserObject, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, postmessage, primitiveObjects, promise, quotaexceedederror, regexp, resurrectable, set, setAtKeyPath, socketio, sparseUndefined, specialNumbers, expObj as structuredCloning, structuredCloningThrowing, symbol, toStringTag, typedArrays, typedArraysSocketIO as typedArraysSocketio, undef$1 as undef, undef as undefPreset, unescapeKeyPathComponent, universal, userObject, webtransporterror };
|
|
1961
2011
|
//# sourceMappingURL=index.js.map
|