Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source-map-support.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export interface Options {
* Callback will be called every time we redirect due to `redirectConflictingLibrary`
* This allows consumers to log helpful warnings if they choose.
* @param parent NodeJS.Module which made the require() or require.resolve() call
* @param options options object internally passed to node's `_resolveFilename` hook
*/
onConflictingLibraryRedirect?: (request: string, parent: any, isMain: boolean, redirectedRequest: string) => void;
onConflictingLibraryRedirect?: (request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void;
}

export interface Position {
Expand Down
7 changes: 6 additions & 1 deletion source-map-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ function dynamicRequire(mod, request) {
// Increment this if the format of sharedData changes in a breaking way.
var sharedDataVersion = 1;

/**
* @template T
* @param {T} defaults
* @returns {T}
*/
function initializeSharedData(defaults) {
var sharedDataKey = 'source-map-support/sharedData';
if (typeof Symbol !== 'undefined') {
Expand Down Expand Up @@ -80,7 +85,7 @@ var sharedData = initializeSharedData({
/** @type {HookState} */
moduleResolveFilenameHook: undefined,

/** @type {Array<(request: string, parent: any, isMain: boolean, redirectedRequest: string) => void>} */
/** @type {Array<(request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void>} */
onConflictingLibraryRedirectArr: [],

// If true, the caches are reset before a stack trace formatting operation
Expand Down