Cleanup: Make use of type inference and use 'var' in functions to match actual WebAssembly semantics

This commit is contained in:
dcodeIO
2017-12-28 04:09:40 +01:00
parent 7795d48d98
commit 2ed3c22031
16 changed files with 1065 additions and 982 deletions

15
std/portable.d.ts vendored
View File

@@ -157,6 +157,7 @@ declare class String {
private constructor();
indexOf(subject: string): i32;
lastIndexOf(subject: string): i32;
charAt(index: i32): string;
charCodeAt(index: i32): i32;
substring(from: i32, to?: i32): string;
startsWith(subject: string): bool;
@@ -205,16 +206,18 @@ declare class Map<K,V> {
has(key: K): bool;
get(key: K): V | null;
clear(): void;
[Symbol.iterator](): Iterator<[K, V]>;
entries(): Iterable<[K, V]>;
keys(): Iterable<K>;
values(): Iterable<V>;
[Symbol.iterator](): Iterator<[K,V]>;
}
interface Iterable<T> {
[Symbol.iterator](): Iterator<T>;
}
interface Iterator<T> {}
declare namespace JSON {
/** @deprecated */
function stringify(subject: any): string;
}
declare namespace console {
/** @deprecated */
function log(message: string): void;