-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): fixup and lint optionals and return values in api.md
- Loading branch information
1 parent
39e5eb7
commit 0dbe973
Showing
12 changed files
with
189 additions
and
111 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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 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 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 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 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,19 @@ | ||
class Foo { | ||
bar(options: {x: number, y: number, maybe?: number, nullable: string|null, object?: {one: number, two?: number}}) { | ||
|
||
} | ||
|
||
async goBack() : Promise<Response | null> { | ||
return null; | ||
} | ||
|
||
response(): Response | null { | ||
return null; | ||
} | ||
|
||
baz(): {abc: number, def?: number, ghi: string} | null { | ||
return null; | ||
} | ||
} | ||
|
||
export {Foo}; |
This file contains 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,32 @@ | ||
### class: Foo | ||
|
||
#### foo.bar(options) | ||
- `options` <[Object]> | ||
- `x` <[number]> **required** | ||
- `y` <[number]> **required** | ||
- `nullable` <?[string]> **required** | ||
- `maybe` <[number]> | ||
- `object` <[Object]> | ||
- `one` <[number]> | ||
- `two` <[number]> defaults to `2`. | ||
|
||
#### foo.baz() | ||
- returns: <?[Object]> | ||
- `abc` <[number]> | ||
- `def` <[number]> if applicable. | ||
- `ghi` <[string]> | ||
|
||
|
||
#### foo.goBack() | ||
- returns: <[Promise]<?[Response]>> Promise which resolves to the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If | ||
can not go back, resolves to `null`. | ||
|
||
#### foo.response() | ||
- returns: <?[Response]> A matching [Response] object, or `null` if the response has not been received yet. | ||
|
||
|
||
[string]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String" | ||
[Object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Object_type "Object" | ||
[number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type "number" | ||
[Promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Promise_type "Promise" | ||
[Response]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Response_type "Response" |
Empty file.
This file contains 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 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