From a691576615b9b1fad97e0de0724f7675999f6c52 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 16 Oct 2020 17:34:33 +0300 Subject: [PATCH 1/2] init --- src/definitions.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/definitions.ts b/src/definitions.ts index 82cae89ca5..5ce581aa99 100644 --- a/src/definitions.ts +++ b/src/definitions.ts @@ -597,27 +597,27 @@ export class TSDBuilder extends ExportsWalker { var sb = this.sb; var isWasm64 = this.program.options.isWasm64; sb.push("declare module ASModule {\n"); - sb.push(" type i8 = number;\n"); - sb.push(" type i16 = number;\n"); - sb.push(" type i32 = number;\n"); - sb.push(" type i64 = BigInt;\n"); + sb.push(" type i8 = number;\n"); + sb.push(" type i16 = number;\n"); + sb.push(" type i32 = number;\n"); + sb.push(" type i64 = bigint;\n"); if (isWasm64) { - sb.push(" type isize = BigInt;\n"); + sb.push(" type isize = bigint;\n"); } else { sb.push(" type isize = number;\n"); } - sb.push(" type u8 = number;\n"); - sb.push(" type u16 = number;\n"); - sb.push(" type u32 = number;\n"); - sb.push(" type u64 = BigInt;\n"); + sb.push(" type u8 = number;\n"); + sb.push(" type u16 = number;\n"); + sb.push(" type u32 = number;\n"); + sb.push(" type u64 = bigint;\n"); if (isWasm64) { - sb.push(" type usize = BigInt;\n"); + sb.push(" type usize = bigint;\n"); } else { sb.push(" type usize = number;\n"); } - sb.push(" type f32 = number;\n"); - sb.push(" type f64 = number;\n"); - sb.push(" type bool = any;\n"); + sb.push(" type f32 = number;\n"); + sb.push(" type f64 = number;\n"); + sb.push(" type bool = boolean | number;\n"); ++this.indentLevel; this.walk(); --this.indentLevel; From 3a607617990980bb7292d284f21933e455796c52 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 17 Oct 2020 01:00:13 +0300 Subject: [PATCH 2/2] remove aligned idents --- src/definitions.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/definitions.ts b/src/definitions.ts index 5ce581aa99..766c53cca0 100644 --- a/src/definitions.ts +++ b/src/definitions.ts @@ -597,27 +597,27 @@ export class TSDBuilder extends ExportsWalker { var sb = this.sb; var isWasm64 = this.program.options.isWasm64; sb.push("declare module ASModule {\n"); - sb.push(" type i8 = number;\n"); - sb.push(" type i16 = number;\n"); - sb.push(" type i32 = number;\n"); - sb.push(" type i64 = bigint;\n"); + sb.push(" type i8 = number;\n"); + sb.push(" type i16 = number;\n"); + sb.push(" type i32 = number;\n"); + sb.push(" type i64 = bigint;\n"); if (isWasm64) { sb.push(" type isize = bigint;\n"); } else { sb.push(" type isize = number;\n"); } - sb.push(" type u8 = number;\n"); - sb.push(" type u16 = number;\n"); - sb.push(" type u32 = number;\n"); - sb.push(" type u64 = bigint;\n"); + sb.push(" type u8 = number;\n"); + sb.push(" type u16 = number;\n"); + sb.push(" type u32 = number;\n"); + sb.push(" type u64 = bigint;\n"); if (isWasm64) { sb.push(" type usize = bigint;\n"); } else { sb.push(" type usize = number;\n"); } - sb.push(" type f32 = number;\n"); - sb.push(" type f64 = number;\n"); - sb.push(" type bool = boolean | number;\n"); + sb.push(" type f32 = number;\n"); + sb.push(" type f64 = number;\n"); + sb.push(" type bool = boolean | number;\n"); ++this.indentLevel; this.walk(); --this.indentLevel;