MCPcopy Index your code
hub / github.com/nodejs/node / addToAffectedFilesPendingEmit

Function addToAffectedFilesPendingEmit

test/fixtures/snapshot/typescript.js:121020–121035  ·  view source on GitHub ↗
(state, affectedFilePendingEmit, kind)

Source from the content-addressed store, hash-verified

121018 }
121019 ts.createBuilderProgram = createBuilderProgram;
121020 function addToAffectedFilesPendingEmit(state, affectedFilePendingEmit, kind) {
121021 if (!state.affectedFilesPendingEmit)
121022 state.affectedFilesPendingEmit = [];
121023 if (!state.affectedFilesPendingEmitKind)
121024 state.affectedFilesPendingEmitKind = new ts.Map();
121025 var existingKind = state.affectedFilesPendingEmitKind.get(affectedFilePendingEmit);
121026 state.affectedFilesPendingEmit.push(affectedFilePendingEmit);
121027 state.affectedFilesPendingEmitKind.set(affectedFilePendingEmit, existingKind || kind);
121028 // affectedFilesPendingEmitIndex === undefined
121029 // - means the emit state.affectedFilesPendingEmit was undefined before adding current affected files
121030 // so start from 0 as array would be affectedFilesPendingEmit
121031 // else, continue to iterate from existing index, the current set is appended to existing files
121032 if (state.affectedFilesPendingEmitIndex === undefined) {
121033 state.affectedFilesPendingEmitIndex = 0;
121034 }
121035 }
121036 function toBuilderStateFileInfo(fileInfo) {
121037 return ts.isString(fileInfo) ?
121038 { version: fileInfo, signature: fileInfo, affectsGlobalScope: undefined, impliedFormat: undefined } :

Callers 3

handleDtsMayChangeOfFunction · 0.85

Calls 3

getMethod · 0.65
pushMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected