Skip to content

Commit 796314f

Browse files
committed
0.15.0
1 parent e1ba6fa commit 796314f

4 files changed

Lines changed: 30 additions & 36 deletions

File tree

meta/npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yavascript",
3-
"version": "0.0.0-git",
3+
"version": "0.15.0",
44
"main": "lib/index.js",
55
"bin": "lib/cli.js",
66
"types": "yavascript.d.ts",

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yavascript",
3-
"version": "0.0.0-git",
3+
"version": "0.15.0",
44
"main": "dist/index.js",
55
"author": "Lily Skye <me@suchipi.com>",
66
"license": "MIT",

yavascript.d.ts

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,7 @@ declare interface WhoAmIResult {
13261326
*/
13271327
declare function whoami(): WhoAmIResult;
13281328

1329+
13291330
/**
13301331
* Runs a child process and blocks until it exits. You can call it with either a
13311332
* string or an array of strings.
@@ -4456,6 +4457,7 @@ declare var process: {
44564457
exit(code?: number | null | undefined): void;
44574458
};
44584459

4460+
44594461
// ==========================================
44604462
// ------------------------------------------
44614463
// QuickJS APIs, which YavaScript builds upon
@@ -4473,7 +4475,7 @@ interface ObjectConstructor {
44734475
*/
44744476
toPrimitive(
44754477
input: any,
4476-
hint: "string" | "number" | "default",
4478+
hint: "string" | "number" | "default"
44774479
): string | number | bigint | boolean | undefined | symbol | null;
44784480

44794481
/**
@@ -4572,9 +4574,8 @@ interface LeftOperators<T, Left> extends Partial<OperatorFunctions<Left, T>> {
45724574
right?: undefined;
45734575
}
45744576

4575-
interface RightOperators<T, Right> extends Partial<
4576-
OperatorFunctions<T, Right>
4577-
> {
4577+
interface RightOperators<T, Right>
4578+
extends Partial<OperatorFunctions<T, Right>> {
45784579
left?: undefined;
45794580
right: {};
45804581
}
@@ -4603,7 +4604,7 @@ interface OperatorsConstructor {
46034604
* using this function.
46044605
*/
46054606
updateBigIntOperators(
4606-
ops: Pick<OperatorFunctions<BigInt, BigInt>, "/" | "**">,
4607+
ops: Pick<OperatorFunctions<BigInt, BigInt>, "/" | "**">
46074608
): void;
46084609
}
46094610

@@ -5156,7 +5157,7 @@ interface BigFloat {
51565157
toPrecision(
51575158
precision: number,
51585159
roundingMode?: BigFloatRoundingMode,
5159-
radix?: number,
5160+
radix?: number
51605161
): string;
51615162

51625163
/**
@@ -5169,7 +5170,7 @@ interface BigFloat {
51695170
toFixed(
51705171
fractionDigits: number,
51715172
roundingMode?: BigFloatRoundingMode,
5172-
radix?: number,
5173+
radix?: number
51735174
): string;
51745175

51755176
/**
@@ -5182,7 +5183,7 @@ interface BigFloat {
51825183
toExponential(
51835184
fractionDigits: number,
51845185
roundingMode?: BigFloatRoundingMode,
5185-
radix?: number,
5186+
radix?: number
51865187
): string;
51875188

51885189
[Symbol.typeofValue]: () => "bigfloat";
@@ -5314,7 +5315,7 @@ interface BigDecimal {
53145315
*/
53155316
toFixed(
53165317
fractionDigits: number,
5317-
roundingMode?: BigDecimalRoundingMode,
5318+
roundingMode?: BigDecimalRoundingMode
53185319
): string;
53195320

53205321
/**
@@ -5325,7 +5326,7 @@ interface BigDecimal {
53255326
*/
53265327
toExponential(
53275328
fractionDigits: number,
5328-
roundingMode?: BigDecimalRoundingMode,
5329+
roundingMode?: BigDecimalRoundingMode
53295330
): string;
53305331
}
53315332

@@ -5861,10 +5862,7 @@ declare module "quickjs:std" {
58615862
* - `responseHeaders`: headers separated by CRLF (string)
58625863
* - `status`: status code (number)
58635864
*/
5864-
(
5865-
url: string,
5866-
options: { full: true },
5867-
): {
5865+
(url: string, options: { full: true }): {
58685866
status: number;
58695867
response: string;
58705868
responseHeaders: string;
@@ -5879,10 +5877,7 @@ declare module "quickjs:std" {
58795877
* - `responseHeaders`: headers separated by CRLF (string)
58805878
* - `status`: status code (number)
58815879
*/
5882-
(
5883-
url: string,
5884-
options: { full: true; binary: false },
5885-
): {
5880+
(url: string, options: { full: true; binary: false }): {
58865881
status: number;
58875882
response: string;
58885883
responseHeaders: string;
@@ -5897,10 +5892,7 @@ declare module "quickjs:std" {
58975892
* - `responseHeaders`: headers separated by CRLF (string)
58985893
* - `status`: status code (number)
58995894
*/
5900-
(
5901-
url: string,
5902-
options: { full: true; binary: true },
5903-
): {
5895+
(url: string, options: { full: true; binary: true }): {
59045896
status: number;
59055897
response: ArrayBuffer;
59065898
responseHeaders: string;
@@ -5933,7 +5925,7 @@ declare module "quickjs:std" {
59335925
export function strftime(
59345926
maxBytes: number,
59355927
format: string,
5936-
time: Date | number,
5928+
time: Date | number
59375929
): string;
59385930
}
59395931

@@ -6001,15 +5993,15 @@ declare module "quickjs:os" {
60015993
fd: number,
60025994
buffer: ArrayBuffer,
60035995
offset: number,
6004-
length: number,
5996+
length: number
60055997
): number;
60065998

60075999
/** Write `length` bytes to the file with descriptor `fd` from the ArrayBuffer `buffer` at byte position `offset`. Return the number of written bytes. */
60086000
export function write(
60096001
fd: number,
60106002
buffer: ArrayBuffer,
60116003
offset: number,
6012-
length: number,
6004+
length: number
60136005
): number;
60146006

60156007
/** Return `true` if the file opened with descriptor `fd` is a TTY (terminal). */
@@ -6281,7 +6273,7 @@ declare module "quickjs:os" {
62816273
/** Call the function `func` when the signal `signal` happens. Only a single handler per signal number is supported. Use `null` to set the default handler or `undefined` to ignore the signal. Signal handlers can only be defined in the main thread. */
62826274
export function signal(
62836275
signal: number,
6284-
func: null | undefined | (() => void),
6276+
func: null | undefined | (() => void)
62856277
): void;
62866278

62876279
/** POSIX signal number. */
@@ -6420,7 +6412,7 @@ declare module "quickjs:os" {
64206412
/** Call the function func after delay ms. Return a handle to the timer. */
64216413
export function setTimeout(
64226414
func: (...args: any) => any,
6423-
delay: number,
6415+
delay: number
64246416
): OSTimer;
64256417

64266418
/** Cancel a timer. */
@@ -6731,7 +6723,7 @@ declare module "quickjs:engine" {
67316723
*/
67326724
export function evalScript(
67336725
code: string,
6734-
options?: { backtraceBarrier?: boolean; filename?: string },
6726+
options?: { backtraceBarrier?: boolean; filename?: string }
67356727
): any;
67366728

67376729
/**
@@ -6751,7 +6743,7 @@ declare module "quickjs:engine" {
67516743
*/
67526744
export function importModule(
67536745
filename: string,
6754-
basename?: string,
6746+
basename?: string
67556747
): { [key: string]: any };
67566748

67576749
/**
@@ -6783,7 +6775,7 @@ declare module "quickjs:engine" {
67836775
*/
67846776
export function defineBuiltinModule(
67856777
name: string,
6786-
obj: { [key: string]: any },
6778+
obj: { [key: string]: any }
67876779
): void;
67886780

67896781
/**
@@ -6813,15 +6805,15 @@ declare module "quickjs:bytecode" {
68136805
byteSwap?: boolean;
68146806
sourceType?: "module" | "script";
68156807
encodedFileName?: string;
6816-
},
6808+
}
68176809
): ArrayBuffer;
68186810

68196811
/**
68206812
* Convert the provided value into bytecode. Doesn't work with all values.
68216813
*/
68226814
export function fromValue(
68236815
value: any,
6824-
options?: { byteSwap?: boolean },
6816+
options?: { byteSwap?: boolean }
68256817
): ArrayBuffer;
68266818

68276819
/**
@@ -7014,9 +7006,11 @@ declare module "quickjs:encoding" {
70147006
export function fromUtf8(input: string): ArrayBuffer;
70157007
}
70167008

7009+
70177010
declare const std: typeof import("quickjs:std");
70187011
declare const os: typeof import("quickjs:os");
70197012

70207013
// undocumented from quickjs, but it's there
70217014
/** Get the current unix timestamp with microsecond precision. */
70227015
declare function __date_clock(): number;
7016+

0 commit comments

Comments
 (0)