Skip to content
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

docs(streams): improve docs for stabilization #4852

Merged
merged 37 commits into from
May 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
fba942a
improve streams/buffer.ts
magurotuna May 23, 2024
65ba402
improve streams/byte_slice_stream.ts
magurotuna May 23, 2024
b56c2a6
improve streams/delimiter_stream.ts
magurotuna May 23, 2024
a3596c8
improve streams/early_zip_readable_streams.ts
magurotuna May 23, 2024
122a38e
improve streams/iterate_reader.ts
magurotuna May 23, 2024
23fa26a
improve streams/limited_bytes_transform_stream.ts
magurotuna May 23, 2024
5ed8f71
improve streams/limited_transform_stream.ts
magurotuna May 23, 2024
0bc0ad1
further improve streams/early_zip_readable_streams.ts
magurotuna May 23, 2024
7d0e56d
improve streams/merge_readable_streams.ts
magurotuna May 23, 2024
0e433c3
improve streams/readable_stream_from_reader.ts
magurotuna May 23, 2024
5af61ab
improve streams/readre_from_iterable.ts
magurotuna May 23, 2024
9e1f3e2
improve streams/reader_from_stream_reader.ts
magurotuna May 23, 2024
0654316
improve streams/text_delimiter_stream.ts
magurotuna May 24, 2024
dc3110a
improve streams/text_line_stream.ts
magurotuna May 24, 2024
c1573d3
improve streams/text_delimiter_stream.ts more
magurotuna May 24, 2024
2cb1daf
improve streams/to_array_buffer.ts
magurotuna May 24, 2024
2fe6c51
improve streams/to_blob.ts
magurotuna May 24, 2024
14f9ba0
improve streams/to_json.ts
magurotuna May 24, 2024
72da712
improve streams/to_json.ts
magurotuna May 24, 2024
1c6d378
improve streams/text_line_stream.ts more
magurotuna May 24, 2024
3acbf10
improve streams/to_transform_stream.ts
magurotuna May 24, 2024
797265c
improve streams/writable_stream_from_writer.ts
magurotuna May 24, 2024
d1ea855
improve streams/writer_from_stream_writer.ts
magurotuna May 24, 2024
2d93ced
improve streams/zip_readable_streams.ts
magurotuna May 24, 2024
2be8e5d
define interfaces for optional params
magurotuna May 24, 2024
5cac4e9
address lint warnings in buffer.ts
magurotuna May 24, 2024
abb7dd5
address lint warnings
magurotuna May 24, 2024
1710956
add streams/mod.ts to doc checker entrypoints
magurotuna May 24, 2024
76e5c61
Merge branch 'main' into magurotuna/streams-doc
magurotuna May 24, 2024
bbf4667
fix type error
magurotuna May 24, 2024
32b416c
tweak test data so spell checker will not complain
magurotuna May 24, 2024
08ef776
fix example code to make it work in windows
magurotuna May 24, 2024
f834d46
Merge branch 'main' into magurotuna/streams-doc
magurotuna May 24, 2024
9cba9c6
fix example code to make it work in windows (2)
magurotuna May 24, 2024
acde22a
Update streams/early_zip_readable_streams.ts
kt3k May 27, 2024
67f6732
Update streams/early_zip_readable_streams.ts
kt3k May 27, 2024
fd5b75b
Merge branch 'main' into magurotuna/streams-doc
magurotuna May 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve streams/readable_stream_from_reader.ts
  • Loading branch information
magurotuna committed May 23, 2024
commit 0e433c3750ec2af12ca7e995f0e55e2113c8415a
13 changes: 6 additions & 7 deletions streams/readable_stream_from_reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type { Closer };
/**
* Options for {@linkcode readableStreamFromReader}.
*
* @deprecated This will be removed in 1.0.0. Use {@linkcode toReadableStream} instead.
* @deprecated This will be removed in 1.0.0. Use {@linkcode https://jsr.io/@std/io/doc/~/toReadableStream | toReadableStream} instead.
*/
export interface ReadableStreamFromReaderOptions {
/** If the `reader` is also a `Closer`, automatically close the `reader`
Expand All @@ -28,22 +28,21 @@ export interface ReadableStreamFromReaderOptions {

/**
* Create a {@linkcode ReadableStream} of {@linkcode Uint8Array}s from a
* {@linkcode Reader}.
* {@linkcode https://jsr.io/@std/io/doc/types/~/Reader | Reader}.
*
* When the pull algorithm is called on the stream, a chunk from the reader
* will be read. When `null` is returned from the reader, the stream will be
* closed along with the reader (if it is also a `Closer`).
*
* An example converting a `Deno.FsFile` into a readable stream:
* closed along with the reader (if it is also a {@linkcode https://jsr.io/@std/io/doc/types/~/Closer | Closer}).
*
* @example Convert a `Deno.FsFile` into a readable stream:
* ```ts
* import { readableStreamFromReader } from "@std/streams/readable-stream-from-reader";
*
* const file = await Deno.open("./file.txt", { read: true });
* using file = await Deno.open("./file.txt", { read: true });
* const fileStream = readableStreamFromReader(file);
* ```
*
* @deprecated This will be removed in 1.0.0. Use {@linkcode toReadableStream} instead.
* @deprecated This will be removed in 1.0.0. Use {@linkcode https://jsr.io/@std/io/doc/~/toReadableStream | toReadableStream} instead.
*/
export function readableStreamFromReader(
reader: Reader | (Reader & Closer),
Expand Down