Skip to content

Commit

Permalink
Fix return and parameter types in String declarations (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGraey authored and dcodeIO committed Jun 21, 2019
1 parent a2d067a commit 1fd20a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions std/assembly/index.d.ts
Expand Up @@ -1230,16 +1230,17 @@ declare class String {
readonly length: i32;
readonly lengthUTF8: i32;

charAt(index: u32): string;
charCodeAt(index: u32): u16;
charAt(index: i32): string;
charCodeAt(index: i32): i32;
codePointAt(index: i32): i32;
concat(other: string): string;
endsWith(other: string): bool;
indexOf(other: string, fromIndex?: i32): u32;
indexOf(other: string, fromIndex?: i32): i32;
lastIndexOf(other: string, fromIndex?: i32): i32;
includes(other: string): bool;
startsWith(other: string): bool;
substr(start: u32, length?: u32): string;
substring(start: u32, end?: u32): string;
substr(start: i32, length?: i32): string;
substring(start: i32, end?: i32): string;
trim(): string;
trimLeft(): string;
trimRight(): string;
Expand Down
3 changes: 2 additions & 1 deletion std/portable/index.d.ts
Expand Up @@ -450,13 +450,14 @@ declare class String {

charAt(index: i32): string;
charCodeAt(index: i32): i32;
codePointAt(index: i32): i32;
concat(other: string): string;
indexOf(other: string, fromIndex?: i32): i32;
lastIndexOf(other: string, fromIndex?: i32): i32;
includes(other: string): bool;
startsWith(other: string): bool;
endsWith(other: string): bool;
substr(start: u32, length?: u32): string;
substr(start: i32, length?: i32): string;
substring(from: i32, to?: i32): string;
trim(): string;
trimLeft(): string;
Expand Down

0 comments on commit 1fd20a8

Please sign in to comment.