mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 14:31:28 +00:00
Document the purpose of most files
This commit is contained in:
4
std/assembly.d.ts
vendored
4
std/assembly.d.ts
vendored
@ -1,4 +1,6 @@
|
||||
// Definitions for the "AssemblyScript" subset.
|
||||
/**
|
||||
* @file Environment definitions for compiling AssemblyScript to WebAssembly using asc.
|
||||
*/
|
||||
|
||||
// Types
|
||||
|
||||
|
19
std/portable.d.ts
vendored
19
std/portable.d.ts
vendored
@ -1,14 +1,17 @@
|
||||
// Definitions for the "portable AssemblyScript" subset.
|
||||
/**
|
||||
* @file Environment definitions for compiling AssemblyScript to JavaScript using tsc.
|
||||
*
|
||||
* Note that semantic differences require additional explicit conversions for full compatibility.
|
||||
* For example, when casting an i32 to an u8, doing `<u8>(someI32 & 0xff)` will yield the same
|
||||
* result when compiling to WebAssembly or JS while `<u8>someI32` alone does nothing in JS.
|
||||
*
|
||||
* Note that i64's are not portable (JS numbers are IEEE754 doubles with a maximum safe integer
|
||||
* value of 2^53-1) and instead require a compatibility layer to work in JS as well, as for example
|
||||
* {@link ./glue/js/i64.d.ts} / {@link ./glue/js/i64.js}.
|
||||
*/
|
||||
|
||||
// Portable types
|
||||
|
||||
// Note that semantic differences require additional explicit conversions for full compatibility.
|
||||
// For example, when casting an i32 to an u8, doing `<u8>(someI32 & 0xff)` will yield the same
|
||||
// result when compiling to WebAssembly or JS while `<u8>someI32` alone does nothing in JS.
|
||||
|
||||
// Note that i64's are not portable (JS numbers are IEEE754 doubles with a maximum safe integer value
|
||||
// of 2^53-1) and instead require a compatibility layer to work in JS as well. See: src/util/i64.ts
|
||||
|
||||
declare type i8 = number;
|
||||
declare type i16 = number;
|
||||
declare type i32 = number;
|
||||
|
@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @file Environment implementation for compiling AssemblyScript to JavaScript using tsc.
|
||||
*/
|
||||
|
||||
var globalScope = typeof window !== "undefined" && window || typeof global !== "undefined" && global || self;
|
||||
|
||||
Object.defineProperties(
|
||||
|
Reference in New Issue
Block a user