diff options
author | 2023-07-14 19:37:22 -0700 | |
---|---|---|
committer | 2023-07-14 19:37:22 -0700 | |
commit | c39c11e1011b682c2c4e48594c7d6110cfc3343c (patch) | |
tree | 8808ca4cd6684949423f28f3cd4d90aedb605cb7 /src/bun.js/scripts/class-definitions.ts | |
parent | 25512104265aa568ca98e5bd89a977203ee261a6 (diff) | |
download | bun-c39c11e1011b682c2c4e48594c7d6110cfc3343c.tar.gz bun-c39c11e1011b682c2c4e48594c7d6110cfc3343c.tar.zst bun-c39c11e1011b682c2c4e48594c7d6110cfc3343c.zip |
structured clone (#3637)
* copy `SerializedScriptValue`
* format
* make `SerializedScriptValue` compile
* add `transfer` option
* tests
* serialize/deserialize blobs
* tests for blobs
* serialize/deserialize file blobs
* more tests
* small cleanup
* format
* small changes + serialize offset
* slice helper
* map and set test
Diffstat (limited to 'src/bun.js/scripts/class-definitions.ts')
-rw-r--r-- | src/bun.js/scripts/class-definitions.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bun.js/scripts/class-definitions.ts b/src/bun.js/scripts/class-definitions.ts index 59b8f6f05..281cd62c5 100644 --- a/src/bun.js/scripts/class-definitions.ts +++ b/src/bun.js/scripts/class-definitions.ts @@ -41,6 +41,7 @@ export interface ClassDefinition { configurable?: boolean; enumerable?: boolean; + structuredClone?: boolean | { transferrable: boolean; tag: number }; } export interface CustomField { @@ -58,6 +59,7 @@ export function define( estimatedSize = false, call = false, construct = false, + structuredClone = false, ...rest } = {} as ClassDefinition, ): ClassDefinition { @@ -66,6 +68,7 @@ export function define( call, construct, estimatedSize, + structuredClone, values, klass: Object.fromEntries(Object.entries(klass).sort(([a], [b]) => a.localeCompare(b))), proto: Object.fromEntries(Object.entries(proto).sort(([a], [b]) => a.localeCompare(b))), |