aboutsummaryrefslogtreecommitdiff
path: root/src/api/demo/schema.js
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2022-11-09 15:40:40 -0800
committerGravatar GitHub <noreply@github.com> 2022-11-09 15:40:40 -0800
commitf7f1b604443c030afe29d1059b90f72c69afe081 (patch)
tree8f2397447b2a84dab02850007264b72cc565f5d6 /src/api/demo/schema.js
parentda257336b0b70df8c31da647496899cf70670000 (diff)
downloadbun-f7f1b604443c030afe29d1059b90f72c69afe081.tar.gz
bun-f7f1b604443c030afe29d1059b90f72c69afe081.tar.zst
bun-f7f1b604443c030afe29d1059b90f72c69afe081.zip
Add bun-types, add typechecking, add `child_process` types (#1475)
* Add bun-types to packages * Improve typing * Fix types in tests * Fix dts tests * Run formatter * Fix all type errors * Add strict mode, fix type errors * Add ffi changes * Move workflows to root * Add workflows * Remove labeler * Add child_process types * Fix synthetic defaults issue * Remove docs * Move scripts * Run prettier * Include examples in typechecking * captureStackTrace types * moved captureStackTrace types to globals * Address reviews Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Diffstat (limited to 'src/api/demo/schema.js')
-rw-r--r--src/api/demo/schema.js54
1 files changed, 30 insertions, 24 deletions
diff --git a/src/api/demo/schema.js b/src/api/demo/schema.js
index b89ed4a08..2c31d9512 100644
--- a/src/api/demo/schema.js
+++ b/src/api/demo/schema.js
@@ -120,7 +120,9 @@ function encodeStackFrame(message, bb) {
var encoded = StackFrameScope[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "StackFrameScope"'
+ "Invalid value " +
+ JSON.stringify(value) +
+ ' for enum "StackFrameScope"',
);
bb.writeByte(encoded);
} else {
@@ -500,7 +502,7 @@ function encodeFallbackMessageContainer(message, bb) {
var encoded = FallbackStep[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "FallbackStep"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "FallbackStep"',
);
bb.writeByte(encoded);
}
@@ -612,7 +614,7 @@ function encodeJSX(message, bb) {
var encoded = JSXRuntime[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "JSXRuntime"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "JSXRuntime"',
);
bb.writeByte(encoded);
} else {
@@ -833,7 +835,7 @@ function encodeJavascriptBundle(message, bb) {
bb.writeByteArray(value);
} else {
throw new Error(
- 'Missing required field "app_package_json_dependencies_hash"'
+ 'Missing required field "app_package_json_dependencies_hash"',
);
}
@@ -960,7 +962,7 @@ function encodeModuleImportRecord(message, bb) {
throw new Error(
"Invalid value " +
JSON.stringify(value) +
- ' for enum "ModuleImportType"'
+ ' for enum "ModuleImportType"',
);
bb.writeByte(encoded);
} else {
@@ -1090,7 +1092,7 @@ function encodeLoaderMap(message, bb) {
var encoded = Loader[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
);
bb.writeByte(encoded);
}
@@ -1167,7 +1169,7 @@ function encodeLoadedEnvConfig(message, bb) {
var encoded = DotEnvBehavior[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "DotEnvBehavior"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "DotEnvBehavior"',
);
bb.writeVarUint(encoded);
} else {
@@ -1272,7 +1274,9 @@ function encodeFrameworkConfig(message, bb) {
var encoded = CSSInJSBehavior[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "CSSInJSBehavior"'
+ "Invalid value " +
+ JSON.stringify(value) +
+ ' for enum "CSSInJSBehavior"',
);
bb.writeByte(encoded);
}
@@ -1308,7 +1312,7 @@ function encodeFrameworkEntryPoint(message, bb) {
throw new Error(
"Invalid value " +
JSON.stringify(value) +
- ' for enum "FrameworkEntryPointType"'
+ ' for enum "FrameworkEntryPointType"',
);
bb.writeByte(encoded);
} else {
@@ -1460,7 +1464,9 @@ function encodeLoadedFramework(message, bb) {
var encoded = CSSInJSBehavior[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "CSSInJSBehavior"'
+ "Invalid value " +
+ JSON.stringify(value) +
+ ' for enum "CSSInJSBehavior"',
);
bb.writeByte(encoded);
} else {
@@ -1743,7 +1749,7 @@ function encodeTransformOptions(message, bb) {
var encoded = ResolveMode[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "ResolveMode"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "ResolveMode"',
);
bb.writeByte(encoded);
}
@@ -1844,7 +1850,7 @@ function encodeTransformOptions(message, bb) {
var encoded = Platform[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Platform"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "Platform"',
);
bb.writeByte(encoded);
}
@@ -1921,7 +1927,7 @@ function encodeTransformOptions(message, bb) {
var encoded = MessageLevel[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "MessageLevel"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "MessageLevel"',
);
bb.writeVarUint(encoded);
}
@@ -2019,7 +2025,7 @@ function encodeTransform(message, bb) {
var encoded = Loader[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
);
bb.writeByte(encoded);
}
@@ -2077,7 +2083,7 @@ function encodeScan(message, bb) {
var encoded = Loader[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
);
bb.writeByte(encoded);
}
@@ -2145,7 +2151,7 @@ function encodeScannedImport(message, bb) {
var encoded = ImportKind[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "ImportKind"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "ImportKind"',
);
bb.writeByte(encoded);
} else {
@@ -2246,7 +2252,7 @@ function encodeTransformResponse(message, bb) {
throw new Error(
"Invalid value " +
JSON.stringify(value) +
- ' for enum "TransformResponseStatus"'
+ ' for enum "TransformResponseStatus"',
);
bb.writeVarUint(encoded);
} else {
@@ -2460,7 +2466,7 @@ function encodeMessage(message, bb) {
var encoded = MessageLevel[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "MessageLevel"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "MessageLevel"',
);
bb.writeVarUint(encoded);
} else {
@@ -2626,7 +2632,7 @@ function encodeWebsocketMessage(message, bb) {
throw new Error(
"Invalid value " +
JSON.stringify(value) +
- ' for enum "WebsocketMessageKind"'
+ ' for enum "WebsocketMessageKind"',
);
bb.writeByte(encoded);
} else {
@@ -2656,7 +2662,7 @@ function encodeWebsocketMessageWelcome(message, bb) {
var encoded = Reloader[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Reloader"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "Reloader"',
);
bb.writeByte(encoded);
} else {
@@ -2692,7 +2698,7 @@ function encodeWebsocketMessageFileChangeNotification(message, bb) {
var encoded = Loader[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
);
bb.writeByte(encoded);
} else {
@@ -2716,7 +2722,7 @@ function encodeWebsocketCommand(message, bb) {
throw new Error(
"Invalid value " +
JSON.stringify(value) +
- ' for enum "WebsocketCommandKind"'
+ ' for enum "WebsocketCommandKind"',
);
bb.writeByte(encoded);
} else {
@@ -2794,7 +2800,7 @@ function encodeWebsocketMessageBuildSuccess(message, bb) {
var encoded = Loader[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
);
bb.writeByte(encoded);
} else {
@@ -2847,7 +2853,7 @@ function encodeWebsocketMessageBuildFailure(message, bb) {
var encoded = Loader[value];
if (encoded === void 0)
throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"'
+ "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
);
bb.writeByte(encoded);
} else {