diff options
author | 2022-09-28 00:11:15 -0700 | |
---|---|---|
committer | 2022-09-28 00:11:15 -0700 | |
commit | 71ea4a2c9bf38f1ac3e6351c3f863b6698513b82 (patch) | |
tree | 1aa534d170c2f3cca4654199b6c3d2bc6ba7b318 /src/bun.js/scripts/class-definitions.ts | |
parent | a8ab18bd50b3a98c65c6ce96bd75d87d7893df12 (diff) | |
download | bun-71ea4a2c9bf38f1ac3e6351c3f863b6698513b82.tar.gz bun-71ea4a2c9bf38f1ac3e6351c3f863b6698513b82.tar.zst bun-71ea4a2c9bf38f1ac3e6351c3f863b6698513b82.zip |
Fix several bugs with Request body streaming + store small response bodies without an extra memory allocation
Diffstat (limited to 'src/bun.js/scripts/class-definitions.ts')
-rw-r--r-- | src/bun.js/scripts/class-definitions.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/bun.js/scripts/class-definitions.ts b/src/bun.js/scripts/class-definitions.ts index 67e4cf475..f8b08e9bd 100644 --- a/src/bun.js/scripts/class-definitions.ts +++ b/src/bun.js/scripts/class-definitions.ts @@ -20,13 +20,23 @@ export interface ClassDefinition { proto: Record<string, Field>; JSType?: string; noConstructor?: boolean; + estimatedSize?: boolean; + isEventEmitter?: boolean; } export function define( - { klass = {}, proto = {}, ...rest } = {} as ClassDefinition + { + klass = {}, + proto = {}, + isEventEmitter = false, + estimatedSize = false, + ...rest + } = {} as ClassDefinition ): ClassDefinition { return { ...rest, + isEventEmitter, + estimatedSize, klass: Object.fromEntries( Object.entries(klass).sort(([a], [b]) => a.localeCompare(b)) ), |