You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ArrayBuffer docs on MDN and MSDN show the existence of ArrayBuffer.slice(). This is not currently represented in lib.d.ts (as of ef5ae6e on master).
Existing:
interface ArrayBuffer {
/**
* Read-only. The length of the ArrayBuffer (in bytes).
*/
byteLength: number;
}
Suggested:
interface ArrayBuffer {
/**
* Read-only. The length of the ArrayBuffer (in bytes).
*/
byteLength: number;
/**
* Returns a section of an ArrayBuffer.
*/
slice(begin:number, end?:number): ArrayBuffer;
}
The text was updated successfully, but these errors were encountered:
IE11 (and other head browsers) support ArrayBuffer.prototype.slice. I believe elsewhere, lib.d.ts includes everything that's part of IE11. For example, lib.d.ts includes Map and Set types. Given that, shouldn't slice be added?
lib.d.ts is intentionally generated from a more broadly-supported subset of the API
Just out of interest, how do the Typescript team determine this? I'm assuming there must be a set of agreed upon rules that an API feature is tested against, as opposed to one's opinion?
Talked to @mhegazy about this; the ArrayBuffer and ArrayBufferView are in the small subset of things that aren't automatically generated, so we just missed this one.
The
ArrayBuffer
docs on MDN and MSDN show the existence ofArrayBuffer.slice()
. This is not currently represented inlib.d.ts
(as of ef5ae6e on master).Existing:
Suggested:
The text was updated successfully, but these errors were encountered: