mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-30 23:30:06 +00:00
[btoa] Accept Buffer (#34271)
This commit is contained in:
committed by
Ron Buckton
parent
59ed5920c9
commit
a804a580d0
@@ -1,3 +1,5 @@
|
||||
import btoa = require('btoa');
|
||||
|
||||
btoa('foo');
|
||||
|
||||
btoa(Buffer.from('foo'));
|
||||
|
||||
4
types/btoa/index.d.ts
vendored
4
types/btoa/index.d.ts
vendored
@@ -5,6 +5,8 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
declare function btoa(str: string): string;
|
||||
/// <reference types="node" />
|
||||
|
||||
declare function btoa(str: string | Buffer): string;
|
||||
|
||||
export = btoa;
|
||||
|
||||
Reference in New Issue
Block a user