mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-17 17:01:37 +00:00
guard, info on never null, more general array rt
This commit is contained in:
18
std/assembly/util/error.ts
Normal file
18
std/assembly/util/error.ts
Normal file
@ -0,0 +1,18 @@
|
||||
// Common error messages for use accross the standard library. Keeping error messages compact
|
||||
// and reusing them where possible ensures minimal static data in binaries.
|
||||
|
||||
// @ts-ignore: decorator
|
||||
@lazy @inline
|
||||
export const E_INDEXOUTOFRANGE: string = "Index out of range";
|
||||
|
||||
// @ts-ignore: decorator
|
||||
@lazy @inline
|
||||
export const E_INVALIDLENGTH: string = "Invalid length";
|
||||
|
||||
// @ts-ignore: decorator
|
||||
@lazy @inline
|
||||
export const E_EMPTYARRAY: string = "Array is empty";
|
||||
|
||||
// @ts-ignore: decorator
|
||||
@lazy @inline
|
||||
export const E_HOLEYARRAY: string = "Element type must be nullable if array is holey";
|
Reference in New Issue
Block a user