-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add win32 path.toNamespacedPath and align rest of node:path with Node #8469
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3316,6 +3316,10 @@ JSC__JSValue JSC__JSValue__jsDoubleNumber(double arg0) | |
{ | ||
return JSC::JSValue::encode(JSC::jsNumber(arg0)); | ||
} | ||
JSC__JSValue JSC__JSValue__jsEmptyString(JSC__JSGlobalObject* arg0) | ||
{ | ||
return JSC::JSValue::encode(JSC::jsEmptyString(arg0->vm())); | ||
}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Part of exposing |
||
JSC__JSValue JSC__JSValue__jsNull() { return JSC::JSValue::encode(JSC::jsNull()); }; | ||
JSC__JSValue JSC__JSValue__jsNumberFromChar(unsigned char arg0) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -748,9 +748,9 @@ pub const ZigString = extern struct { | |
if (is16Bit(&this)) { | ||
const buffer = this.toOwnedSlice(allocator) catch unreachable; | ||
return Slice{ | ||
.allocator = NullableAllocator.init(allocator), | ||
.ptr = buffer.ptr, | ||
.len = @as(u32, @truncate(buffer.len)), | ||
.allocator = NullableAllocator.init(allocator), | ||
}; | ||
} | ||
|
||
|
@@ -3960,27 +3960,32 @@ pub const JSValue = enum(JSValueReprInt) { | |
return null; | ||
} | ||
|
||
pub fn jsNumber(number: anytype) JSValue { | ||
return jsNumberWithType(@TypeOf(number), number); | ||
pub inline fn jsBoolean(i: bool) JSValue { | ||
return cppFn("jsBoolean", .{i}); | ||
} | ||
|
||
pub fn jsDoubleNumber(i: f64) JSValue { | ||
return cppFn("jsDoubleNumber", .{i}); | ||
} | ||
|
||
pub inline fn jsEmptyString(globalThis: *JSGlobalObject) JSValue { | ||
return cppFn("jsEmptyString", .{globalThis}); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ☝️ Part of exposing |
||
|
||
pub inline fn jsNull() JSValue { | ||
return JSValue.null; | ||
} | ||
pub inline fn jsUndefined() JSValue { | ||
return JSValue.undefined; | ||
} | ||
pub inline fn jsBoolean(i: bool) JSValue { | ||
const out = cppFn("jsBoolean", .{i}); | ||
return out; | ||
|
||
pub fn jsNumber(number: anytype) JSValue { | ||
return jsNumberWithType(@TypeOf(number), number); | ||
} | ||
|
||
pub fn jsTDZValue() JSValue { | ||
pub inline fn jsTDZValue() JSValue { | ||
return cppFn("jsTDZValue", .{}); | ||
} | ||
|
||
pub fn jsDoubleNumber(i: f64) JSValue { | ||
return cppFn("jsDoubleNumber", .{i}); | ||
pub inline fn jsUndefined() JSValue { | ||
return JSValue.undefined; | ||
} | ||
|
||
pub fn className(this: JSValue, globalThis: *JSGlobalObject) ZigString { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By using
JSC.Maybe
we can continue to associate that one withsys.Error
and allow JSC.Node.Maybe to beErrorType
agnostic. Doing this is the least invasive way to allow more configurability in theMaybe
.