mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
browserify: work around TypeScript issue 14107
Changes the overloaded function to a single function that accepts a union. This works around Microsoft/TypeScript#14107.
This commit is contained in:
parent
da80a81f9b
commit
e5d1a67ec6
@ -60,3 +60,6 @@ Object.keys(insertGlobals.vars).forEach((x) => {
|
||||
var b = browserify('./browser/main.js', {
|
||||
insertGlobalVars: insertGlobalVars
|
||||
});
|
||||
|
||||
declare const file: string | string[];
|
||||
b.add(file);
|
||||
|
||||
8
types/browserify/index.d.ts
vendored
8
types/browserify/index.d.ts
vendored
@ -1,6 +1,9 @@
|
||||
// Type definitions for Browserify 12.0
|
||||
// Project: http://browserify.org/
|
||||
// Definitions by: Andrew Gaspar <https://github.com/AndrewGaspar>, John Vilk <https://github.com/jvilk>, Leonard Thieu <https://github.com/leonard-thieu>
|
||||
// Definitions by: Andrew Gaspar <https://github.com/AndrewGaspar>
|
||||
// John Vilk <https://github.com/jvilk>
|
||||
// Leonard Thieu <https://github.com/leonard-thieu>
|
||||
// Linus Unnebäck <https://github.com/LinusU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@ -102,8 +105,7 @@ interface BrowserifyObject extends NodeJS.EventEmitter {
|
||||
* Add an entry file from file that will be executed when the bundle loads.
|
||||
* If file is an array, each item in file will be added as an entry file.
|
||||
*/
|
||||
add(file: InputFile[], opts?: FileOptions): BrowserifyObject;
|
||||
add(file: InputFile, opts?: FileOptions): BrowserifyObject;
|
||||
add(file: InputFile | InputFile[], opts?: FileOptions): BrowserifyObject;
|
||||
/**
|
||||
* Make file available from outside the bundle with require(file).
|
||||
* The file param is anything that can be resolved by require.resolve().
|
||||
|
||||
Loading…
Reference in New Issue
Block a user