mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-16 16:31:32 +00:00
Implement optional type parameters (#360)
* Add a NATIVE<T> macro type to simplify use of a native WebAssembly type * Add default type parameters for internal helpers for explicit loads and stores * Unify loadUnsafe/loadUnsafeWithOffset etc. into one * Renamed loadUnsafe etc. into just LOAD, like a macro * Implement parsing of index signatures, but ignore them, for properly linting code * Refactor TypedArray<T> to use macros
This commit is contained in:
@ -11,7 +11,7 @@ import {
|
||||
} from "./internal/string";
|
||||
|
||||
import {
|
||||
storeUnsafe as storeUnsafeArray
|
||||
STORE
|
||||
} from "./internal/arraybuffer";
|
||||
|
||||
@sealed
|
||||
@ -436,7 +436,7 @@ export class String {
|
||||
),
|
||||
HEADER_SIZE
|
||||
);
|
||||
storeUnsafeArray<String,String>(buffer, i, char);
|
||||
STORE<String>(buffer, i, char);
|
||||
}
|
||||
return result;
|
||||
} else if (!length) {
|
||||
|
Reference in New Issue
Block a user