Skip to content

Commit 42a4c7b

Browse files
committed
Update README
1 parent 6bd9a26 commit 42a4c7b

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The [OCapN](https://ocapn.org/) network protocol treats strings and byte-arrays
5353
## Solution
5454

5555
This proposal introduces additional methods and read-only accessor properties to `ArrayBuffer.prototype` that fit naturally into those explained above. Just as a buffer can be resizable or not, and detached or not, this proposal enables buffers to be immutable or not. Just as `transferToFixedSize` moves the contents of a original buffer into a newly created non-resizable buffer, this proposal provides a transfer operation that moves the contents of an original original buffer into a newly created immutable buffer. Altogether, this proposal only adds to `ArrayBuffer.prototype` one method
56-
- `transferToImmutable() :ArrayBuffer` -- move the contents of the original buffer into a new immutable buffer, detach the original buffer, and return the new buffer.
56+
- `transferToImmutable(newByteLength?: number) :ArrayBuffer` -- move the contents of the original buffer into a new immutable buffer, detach the original buffer, and return the new buffer.
5757

5858
and one read-only accessor
5959
- `immutable: boolean` -- is this buffer immutable, or can its contents be changed?
@@ -130,15 +130,6 @@ No, TypedArray index properties should continue to track the state of the underl
130130
</dd>
131131

132132

133-
<dt>
134-
135-
Should `transferToImmutable` support a _newByteLength_ argument?
136-
</dt>
137-
<dd>
138-
It might be useful for truncation, but probably rarely for expansion because the output would have an all-zeroes suffix that could not be changed.
139-
</dd>
140-
141-
142133
<dt>
143134

144135
Should ArrayBuffers support zero-copy slices (e.g., `arrayBuffer.sliceToImmutable()`)?

0 commit comments

Comments
 (0)