Add built-in valueof type

This commit is contained in:
dcode
2019-06-15 22:44:48 +02:00
parent a4e5857f7f
commit 8571df939f
10 changed files with 333 additions and 39 deletions

View File

@ -28,6 +28,9 @@ declare type usize = number;
declare type f32 = number;
declare type f64 = number;
/** Special type evaluating the value type of a collection. */
declare type valueof<T extends unknown[]> = T[0];
// Compiler hints
/** Compiler target. 0 = JS, 1 = WASM32, 2 = WASM64. */