mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
waa
This commit is contained in:
@@ -18,3 +18,13 @@ export const requiredAndOptionalArg = fn({
|
||||
},
|
||||
ret: t.i32,
|
||||
});
|
||||
|
||||
// export const HeadersInit = t.oneOf(t.sequence(t.sequence(t.ByteString)), t.record(t.ByteString));
|
||||
export const HeadersInit = t.sequence(t.DOMString);
|
||||
|
||||
export const headersInit = fn({
|
||||
args: {
|
||||
a: HeadersInit,
|
||||
},
|
||||
ret: t.i32,
|
||||
});
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import { t, fn } from "bindgen";
|
||||
|
||||
export const clone = fn({
|
||||
this: t.externalClass("Request"),
|
||||
args: {
|
||||
global: t.globalObject,
|
||||
this_js: t.anyThisValue,
|
||||
},
|
||||
ret: t.externalClass("Request"),
|
||||
});
|
||||
@@ -758,10 +758,7 @@ pub const Request = struct {
|
||||
}
|
||||
|
||||
pub fn constructor(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.JSError!*Request {
|
||||
const arguments_ = callframe.arguments_old(2);
|
||||
const arguments = arguments_.ptr[0..arguments_.len];
|
||||
|
||||
const request = try constructInto(globalThis, arguments);
|
||||
const request = try constructInto(globalThis, callframe.arguments());
|
||||
return Request.new(request);
|
||||
}
|
||||
|
||||
@@ -800,7 +797,6 @@ pub const Request = struct {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return js_wrapper;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ interface TypeDataDefs {
|
||||
oneOf: TypeImpl[];
|
||||
dictionary: DictionaryField[];
|
||||
}
|
||||
type TypeData<K extends TypeKind> = K extends keyof TypeDataDefs ? TypeDataDefs[K] : any;
|
||||
export type TypeData<K extends TypeKind> = K extends keyof TypeDataDefs ? TypeDataDefs[K] : any;
|
||||
|
||||
export const enum NodeValidator {
|
||||
validateInteger = "validateInteger",
|
||||
|
||||
@@ -33,6 +33,7 @@ import {
|
||||
NodeValidator,
|
||||
cAbiIntegerLimits,
|
||||
extInternalDispatchVariant,
|
||||
TypeData,
|
||||
} from "./bindgen-lib-internal";
|
||||
import assert from "node:assert";
|
||||
import { argParse, readdirRecursiveWithExclusionsAndExtensionsSync, writeIfNotChanged } from "./helpers";
|
||||
@@ -139,6 +140,10 @@ function resolveComplexArgumentStrategy(
|
||||
}
|
||||
|
||||
switch (type.kind) {
|
||||
case "sequence": {
|
||||
const child = type.data as TypeData<"sequence">;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new Error(`TODO: resolveComplexArgumentStrategy for ${type.kind}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user