-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add null
to argument types of optional parameters
#4188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c1d8bc6
Add `null` to argument types of optional parameters
RunDevelopment 0fe90f9
Update echo.js
RunDevelopment e3fd6f0
Merge branch 'main' into input-null
RunDevelopment ff5dd9d
Updated refs and changelog
RunDevelopment 914222d
Adjust changelog entry
daxpedda 49c13bf
Merge branch 'main' into input-null
RunDevelopment 3febb5e
Fixed missing null in TS optional args
RunDevelopment 841f802
Remove `| undefined` from JSDoc types
RunDevelopment 22e345f
Merge branch 'main' into input-null
RunDevelopment bf08a5d
Merge branch 'main' into input-null
RunDevelopment 90f1efb
Update ref
RunDevelopment 7695674
Merge branch 'main' into input-null
RunDevelopment e86acdf
Merge branch 'main' into input-null
RunDevelopment b712add
Updated refs
RunDevelopment e9cedd4
Update crates/cli-support/src/js/binding.rs
RunDevelopment b23e3d7
Merge branch 'main' into input-null
RunDevelopment fd337f2
Updated refs
RunDevelopment 3939d03
Merge branch 'main' into input-null
RunDevelopment d4ff7fa
Updated refs
RunDevelopment b45cfb6
Unreachable has been reached
RunDevelopment dd79ed4
Fixed TS test
RunDevelopment 54b6852
Added test for optional args
RunDevelopment d329619
Merge branch 'main' into input-null
RunDevelopment 36846b3
Updated refs
RunDevelopment 366df0a
Merge branch 'main' into input-null
RunDevelopment File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {number} a | ||
* @returns {number} | ||
*/ | ||
export function echo_u8(a: number): number; | ||
/** | ||
* @param {number} a | ||
* @returns {number} | ||
*/ | ||
export function echo_i8(a: number): number; | ||
/** | ||
* @param {number} a | ||
* @returns {number} | ||
*/ | ||
export function echo_u16(a: number): number; | ||
/** | ||
* @param {number} a | ||
* @returns {number} | ||
*/ | ||
export function echo_i16(a: number): number; | ||
/** | ||
* @param {number} a | ||
* @returns {number} | ||
*/ | ||
export function echo_u32(a: number): number; | ||
/** | ||
* @param {number} a | ||
* @returns {number} | ||
*/ | ||
export function echo_i32(a: number): number; | ||
/** | ||
* @param {bigint} a | ||
* @returns {bigint} | ||
*/ | ||
export function echo_u64(a: bigint): bigint; | ||
/** | ||
* @param {bigint} a | ||
* @returns {bigint} | ||
*/ | ||
export function echo_i64(a: bigint): bigint; | ||
/** | ||
* @param {number} a | ||
* @returns {number} | ||
*/ | ||
export function echo_usize(a: number): number; | ||
/** | ||
* @param {number} a | ||
* @returns {number} | ||
*/ | ||
export function echo_isize(a: number): number; | ||
/** | ||
* @param {number} a | ||
* @returns {number} | ||
*/ | ||
export function echo_f32(a: number): number; | ||
/** | ||
* @param {number} a | ||
* @returns {number} | ||
*/ | ||
export function echo_f64(a: number): number; | ||
/** | ||
* @param {boolean} a | ||
* @returns {boolean} | ||
*/ | ||
export function echo_bool(a: boolean): boolean; | ||
/** | ||
* @param {string} a | ||
* @returns {string} | ||
*/ | ||
export function echo_char(a: string): string; | ||
/** | ||
* @param {string} a | ||
* @returns {string} | ||
*/ | ||
export function echo_string(a: string): string; | ||
/** | ||
* @param {Uint8Array} a | ||
* @returns {Uint8Array} | ||
*/ | ||
export function echo_vec_u8(a: Uint8Array): Uint8Array; | ||
/** | ||
* @param {Foo} a | ||
* @returns {Foo} | ||
*/ | ||
export function echo_struct(a: Foo): Foo; | ||
/** | ||
* @param {(Foo)[]} a | ||
* @returns {(Foo)[]} | ||
*/ | ||
export function echo_vec_struct(a: (Foo)[]): (Foo)[]; | ||
/** | ||
* @param {number | undefined | null} [a] | ||
* @returns {number | undefined} | ||
*/ | ||
export function echo_option_u8(a?: number): number | undefined; | ||
RunDevelopment marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/** | ||
* @param {number | undefined | null} [a] | ||
* @returns {number | undefined} | ||
*/ | ||
export function echo_option_i8(a?: number): number | undefined; | ||
/** | ||
* @param {number | undefined | null} [a] | ||
* @returns {number | undefined} | ||
*/ | ||
export function echo_option_u16(a?: number): number | undefined; | ||
/** | ||
* @param {number | undefined | null} [a] | ||
* @returns {number | undefined} | ||
*/ | ||
export function echo_option_i16(a?: number): number | undefined; | ||
/** | ||
* @param {number | undefined | null} [a] | ||
* @returns {number | undefined} | ||
*/ | ||
export function echo_option_u32(a?: number): number | undefined; | ||
/** | ||
* @param {number | undefined | null} [a] | ||
* @returns {number | undefined} | ||
*/ | ||
export function echo_option_i32(a?: number): number | undefined; | ||
/** | ||
* @param {bigint | undefined | null} [a] | ||
* @returns {bigint | undefined} | ||
*/ | ||
export function echo_option_u64(a?: bigint): bigint | undefined; | ||
/** | ||
* @param {bigint | undefined | null} [a] | ||
* @returns {bigint | undefined} | ||
*/ | ||
export function echo_option_i64(a?: bigint): bigint | undefined; | ||
/** | ||
* @param {number | undefined | null} [a] | ||
* @returns {number | undefined} | ||
*/ | ||
export function echo_option_usize(a?: number): number | undefined; | ||
/** | ||
* @param {number | undefined | null} [a] | ||
* @returns {number | undefined} | ||
*/ | ||
export function echo_option_isize(a?: number): number | undefined; | ||
/** | ||
* @param {number | undefined | null} [a] | ||
* @returns {number | undefined} | ||
*/ | ||
export function echo_option_f32(a?: number): number | undefined; | ||
/** | ||
* @param {number | undefined | null} [a] | ||
* @returns {number | undefined} | ||
*/ | ||
export function echo_option_f64(a?: number): number | undefined; | ||
/** | ||
* @param {boolean | undefined | null} [a] | ||
* @returns {boolean | undefined} | ||
*/ | ||
export function echo_option_bool(a?: boolean): boolean | undefined; | ||
/** | ||
* @param {string | undefined | null} [a] | ||
* @returns {string | undefined} | ||
*/ | ||
export function echo_option_char(a?: string): string | undefined; | ||
/** | ||
* @param {string | undefined | null} [a] | ||
* @returns {string | undefined} | ||
*/ | ||
export function echo_option_string(a?: string): string | undefined; | ||
/** | ||
* @param {Uint8Array | undefined | null} [a] | ||
* @returns {Uint8Array | undefined} | ||
*/ | ||
export function echo_option_vec_u8(a?: Uint8Array): Uint8Array | undefined; | ||
/** | ||
* @param {Foo | undefined | null} [a] | ||
* @returns {Foo | undefined} | ||
*/ | ||
export function echo_option_struct(a?: Foo): Foo | undefined; | ||
/** | ||
* @param {(Foo)[] | undefined | null} [a] | ||
* @returns {(Foo)[] | undefined} | ||
*/ | ||
export function echo_option_vec_struct(a?: (Foo)[]): (Foo)[] | undefined; | ||
export class Foo { | ||
free(): void; | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.