Skip to content

Commit

Permalink
Make TypeScript recognize 'unreachable()' as an end point (AssemblySc…
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-tikhonov authored and dcodeIO committed Dec 18, 2019
1 parent 7acff76 commit 8e6a934
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ under the licensing terms detailed in LICENSE:
* Jay Phelps <hello@jayphelps.com>
* jhwgh1968 <jhwgh1968@protonmail.com>
* Jeffrey Charles <jeffreycharles@gmail.com>
* Vladimir Tikhonov <reg@tikhonov.by>

Portions of this software are derived from third-party works licensed under
the following terms:
Expand Down
4 changes: 2 additions & 2 deletions std/assembly/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ declare function trunc<T = f32 | f64>(value: T): T;
declare function load<T>(ptr: usize, immOffset?: usize, immAlign?: usize): T;
/** Stores a value of the specified type to memory. Equivalent to dereferencing a pointer in other languages when assigning a value. */
declare function store<T>(ptr: usize, value: any, immOffset?: usize, immAlign?: usize): void;
/** Emits an unreachable operation that results in a runtime error when executed. Both a statement and an expression of any type. */
declare function unreachable(): any; // sic
/** Emits an unreachable operation that results in a runtime error when executed. Both a statement and an expression. */
declare function unreachable(): never;

/** NaN (not a number) as a 32-bit or 64-bit float depending on context. */
declare const NaN: f32 | f64;
Expand Down

0 comments on commit 8e6a934

Please sign in to comment.