-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73a6890
commit d787b47
Showing
10 changed files
with
1,047 additions
and
11 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@microsoft-teams-js-d39b2214-2e37-4bce-8c44-654fc1465efd.json
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,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Backed out `Buffer` removal changes", | ||
"packageName": "@microsoft/teams-js", | ||
"email": "109628470+noahdarveau-MSFT@users.noreply.github.com", | ||
"dependentChangeType": "patch" | ||
} |
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 |
---|---|---|
|
@@ -145,6 +145,7 @@ | |
} | ||
}, | ||
"dependencies": { | ||
"skeleton-buffer": "file:./skeleton-buffer", | ||
"uuid": "^9.0.1" | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
export class Buffer extends Uint8Array { | ||
length: number; | ||
write(string: string, offset?: number, length?: number, encoding?: string): number; | ||
toString(encoding?: string, start?: number, end?: number): string; | ||
slice(start?: number, end?: number): Buffer; | ||
|
||
/** | ||
* Allocates a new buffer containing the given {str}. | ||
* | ||
* @param str String to store in buffer. | ||
* @param encoding encoding to use, optional. Default is 'utf8' | ||
*/ | ||
constructor(str: string, encoding?: string); | ||
/** | ||
* Allocates a new buffer of {size} octets. | ||
* | ||
* @param size count of octets to allocate. | ||
*/ | ||
constructor(size: number); | ||
/** | ||
* Allocates a new buffer containing the given {array} of octets. | ||
* | ||
* @param array The octets to store. | ||
*/ | ||
constructor(array: Uint8Array); | ||
/** | ||
* Produces a Buffer backed by the same allocated memory as | ||
* the given {ArrayBuffer}. | ||
* | ||
* | ||
* @param arrayBuffer The ArrayBuffer with which to share memory. | ||
*/ | ||
constructor(arrayBuffer: ArrayBuffer); | ||
/** | ||
* Allocates a new buffer containing the given {array} of octets. | ||
* | ||
* @param array The octets to store. | ||
*/ | ||
constructor(array: any[]); | ||
/** | ||
* Copies the passed {buffer} data onto a new {Buffer} instance. | ||
* | ||
* @param buffer The buffer to copy. | ||
*/ | ||
constructor(buffer: Buffer); | ||
prototype: Buffer; | ||
/** | ||
* When passed a reference to the .buffer property of a TypedArray instance, | ||
* the newly created Buffer will share the same allocated memory as the TypedArray. | ||
* The optional {byteOffset} and {length} arguments specify a memory range | ||
* within the {arrayBuffer} that will be shared by the Buffer. | ||
* | ||
* @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() | ||
* @param byteOffset | ||
* @param length | ||
*/ | ||
static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; | ||
/** | ||
* Creates a new Buffer containing the given JavaScript string {str}. | ||
* If provided, the {encoding} parameter identifies the character encoding. | ||
* If not provided, {encoding} defaults to 'utf8'. | ||
* | ||
* @param str | ||
*/ | ||
static from(str: string, encoding?: string): Buffer; | ||
/** | ||
* Returns true if {obj} is a Buffer | ||
* | ||
* @param obj object to test. | ||
*/ | ||
static isBuffer(obj: any): obj is Buffer; | ||
/** | ||
* Returns true if {encoding} is a valid encoding argument. | ||
* Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' | ||
* | ||
* @param encoding string to test. | ||
*/ | ||
static isEncoding(encoding: string): boolean; | ||
/** | ||
* Gives the actual byte length of a string. encoding defaults to 'utf8'. | ||
* This is not the same as String.prototype.length since that returns the number of characters in a string. | ||
* | ||
* @param string string to test. | ||
* @param encoding encoding used to evaluate (defaults to 'utf8') | ||
*/ | ||
static byteLength(string: string, encoding?: string): number; | ||
/** | ||
* Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents | ||
* of the newly created Buffer are unknown and may contain sensitive data. | ||
* | ||
* @param size count of octets to allocate | ||
*/ | ||
static allocUnsafe(size: number): Buffer; | ||
} |
Oops, something went wrong.