Skip to content

Commit

Permalink
fix: make inputs be optional in d.ts and adjust length
Browse files Browse the repository at this point in the history
  • Loading branch information
erivas-ligo committed Nov 24, 2023
1 parent 16c67c1 commit dd79003
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jstz_api/src/urlpattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,12 @@ impl NativeClass for UrlPatternClass {
.accessor(js_string!("username"), username, Attribute::all())
.method(
js_string!("test"),
2,
0,
NativeFunction::from_fn_ptr(UrlPatternClass::test),
)
.method(
js_string!("exec"),
2,
0,
NativeFunction::from_fn_ptr(UrlPatternClass::exec),
);
Ok(())
Expand Down
6 changes: 3 additions & 3 deletions packages/jstz-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ declare interface URLPatternResult {
}

declare interface URLPattern {
test(input: URLPatternInput, baseURL?: string): boolean;
exec(input: URLPatternInput, baseURL?: string): URLPatternResult | null;
test(input?: URLPatternInput, baseURL?: string): boolean;
exec(input?: URLPatternInput, baseURL?: string): URLPatternResult | null;
readonly hash: string;
readonly hostname: string;
readonly password: string;
Expand All @@ -86,7 +86,7 @@ declare interface URLPattern {

declare var URLPattern: {
readonly prototype: URLPattern;
new (input: URLPatternInput, baseURL?: string): URLPattern;
new (input?: URLPatternInput, baseURL?: string): URLPattern;
};

declare type BufferSource = ArrayBufferView | ArrayBuffer;
Expand Down

0 comments on commit dd79003

Please sign in to comment.