Skip to content

Commit 5f158c8

Browse files
committed
test: use --strict flag for tsc
Signed-off-by: Andrey <[email protected]>
1 parent 829b947 commit 5f158c8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/typescript_declarations/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ clean:
55
.PHONY: test
66
test:
77
cargo run --quiet -- build
8-
tsc ./main.ts --noEmit --lib es2015,dom
8+
tsc ./main.ts --strict --noEmit --lib es2015,dom

test/typescript_declarations/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const add_one: (_: number) => number = Gleam.add_one()
1414
const two: number = add_one(1)
1515

1616
// Check UserId type alias
17-
const first_moderator: Gleam.UserId = Gleam.moders[ 0];
17+
const first_moderator: Gleam.UserId = Gleam.moders.toArray()[ 0];
1818
const first_moderator_num: number = first_moderator;
1919
const me: UserID = 84738;
2020
type UserID = Gleam.UserId;
@@ -46,7 +46,7 @@ const user: Gleam.User$ = new Gleam.User("King", 83874, new Gleam.PlainUser());
4646
const guest: Gleam.User$ = new Gleam.Guest();
4747
const user_username: Option$<string> = Gleam.user_name(user);
4848
const guest_username: Option$<string> = Gleam.user_name(guest);
49-
const plain_user_string: string = Gleam.role_string(user.withFields["role"]);
49+
const plain_user_string: string = Gleam.role_string((user as Gleam.User).role);
5050

5151
// Check Either type
5252
const left_either: Gleam.Either$<string, number> = new Gleam.Left("Hello!");

0 commit comments

Comments
 (0)