1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 08:09:08 -05:00

chore: improve built-in API documentation (#16158)

Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Kitson Kelly 2022-10-27 00:53:48 +11:00 committed by GitHub
parent 5d45d2a7e0
commit a0d10efbb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 1253 additions and 383 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -935,7 +935,7 @@ fn lsp_hover() {
"language": "typescript",
"value": "const Deno.args: string[]"
},
"Returns the script arguments to the program. If for example we run a\nprogram:\n\ndeno run --allow-read https://deno.land/std/examples/cat.ts /etc/passwd\n\nThen `Deno.args` will contain:\n\n[ \"/etc/passwd\" ]",
"Returns the script arguments to the program.\n\nGive the following command line invocation of Deno:\n\n```sh\ndeno run --allow-read https://deno.land/std/examples/cat.ts /etc/passwd\n```\n\nThen `Deno.args` will contain:\n\n```\n[ \"/etc/passwd\" ]\n```\n\nIf you are looking for a structured way to parse arguments, there is the\n[`std/flags`](https://deno.land/std/flags) module as part of the Deno\nstandard library.",
"\n\n*@category* - Runtime Environment",
],
"range": {

View file

@ -4,7 +4,7 @@
"detail": "const Deno.build: {\n target: string;\n arch: \"x86_64\" | \"aarch64\";\n os: \"darwin\" | \"linux\" | \"windows\";\n vendor: string;\n env?: string | undefined;\n}",
"documentation": {
"kind": "markdown",
"value": "Build related information.\n\n*@category* - Runtime Environment"
"value": "Information related to the build of the current Deno runtime.\n\nUsers are discouraged from code branching based on this information, as\nassumptions about what is available in what build environment might change\nover time. Developers should specifically sniff out the features they\nintend to use.\n\nThe intended use for the information is for logging and debugging purposes.\n\n*@category* - Runtime Environment"
},
"sortText": "1",
"insertTextFormat": 1

View file

@ -671,13 +671,10 @@ interface ReadableStream<R = any> {
cancel(reason?: any): Promise<void>;
getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
getReader(options?: { mode?: undefined }): ReadableStreamDefaultReader<R>;
pipeThrough<T>(
{ writable, readable }: {
writable: WritableStream<R>;
readable: ReadableStream<T>;
},
options?: PipeOptions,
): ReadableStream<T>;
pipeThrough<T>(transform: {
writable: WritableStream<R>;
readable: ReadableStream<T>;
}, options?: PipeOptions): ReadableStream<T>;
pipeTo(dest: WritableStream<R>, options?: PipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>];
[Symbol.asyncIterator](options?: {