Merge branch 'master' into release-2.9

This commit is contained in:
Mohamed Hegazy
2018-05-16 13:42:48 -07:00
267 changed files with 4049 additions and 2996 deletions
+4 -4
View File
@@ -32,8 +32,8 @@ What shortcomings exist with current approaches?
## Checklist
My suggestion meets these guidelines:
[ ] This wouldn't be a breaking change in existing TypeScript / JavaScript code
[ ] This wouldn't change the runtime behavior of existing JavaScript code
[ ] This could be implemented without emitting different JS based on the types of the expressions
[ ] This isn't a runtime feature (e.g. new expression-level syntax)
* [ ] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
* [ ] This could be implemented without emitting different JS based on the types of the expressions
* [ ] This isn't a runtime feature (e.g. new expression-level syntax)
+6 -5
View File
@@ -2,15 +2,16 @@
Thank you for submitting a pull request!
Here's a checklist you might find useful.
[ ] There is an associated issue that is labeled
* [ ] There is an associated issue that is labeled
'Bug' or 'help wanted' or is in the Community milestone
[ ] Code is up-to-date with the `master` branch
[ ] You've successfully run `jake runtests` locally
[ ] You've signed the CLA
[ ] There are new or updated unit tests validating the change
* [ ] Code is up-to-date with the `master` branch
* [ ] You've successfully run `jake runtests` locally
* [ ] You've signed the CLA
* [ ] There are new or updated unit tests validating the change
Refer to CONTRIBUTING.MD for more details.
https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
-->
Fixes #
+1
View File
@@ -1,4 +1,5 @@
node_modules/
.node_modules/
built/*
tests/cases/rwc/*
tests/cases/test262/*
+21 -2
View File
@@ -308,7 +308,7 @@ Remo H. Jansen <remo.jansen@wolksoftware.com>
Sean Barag <sjbarag@gmail.com>
Sharon Rolel <sharonrolel@gmail.com>
Stanislav Iliev <gigobest2@gmail.com>
Wenlu Wang <805037171@163.com> wenlu.wang <805037171@163.com> kingwl <805037171@163.com>
Wenlu Wang <805037171@163.com> wenlu.wang <805037171@163.com> kingwl <805037171@163.com> 王文璐 <kingwenlu@gmail.com> 王文璐 <wenlu.wang@chaitin.com>
Wilson Hobbs <wilsonhobbs1@gmail.com>
Yuval Greenfield <ubershmekel@gmail.com>
Daniel <nieltg@users.noreply.github.com> # @nieltg
@@ -321,4 +321,23 @@ AdityaDaflapurkar <adaflapurkar@gmail.com> # Aditya Daflapurkar
Eric Grube <grubee79@gmail.com>
Martyn Janes <martyn@obany.com>
Ricardo N Feliciano <FelicianoTech@gmail.com>
Sergii Bezliudnyi <serg.bezludny@gmail.com>
Sergii Bezliudnyi <serg.bezludny@gmail.com>
Adrien Gibrat <adrien.gibrat@gmail.com>
Alex Ryan <ialexryan@users.noreply.github.com>
Alexader <alexander.v.tarasyuk@gmail.com> Alexander T <alexander.v.tarasyuk@gmail.com> # Alexander Tarasyuk
Andrew Faulkner <andfaulkner@gmail.com>
Artem Tyurin <artem.tyurin@uber.com>
Brandon Slade <brandonyoyoslade@gmail.com>
Derek P Sifford <dereksifford@gmail.com>
Dhruv Rajvanshi <dhruvrajvanshi@outlook.com>
Holger Jeromin <mailgithub@katur.de>
Jordi Oliveras Rovira <jordi.oliveras.rovira@gmail.com>
Joscha Feth <joscha@canva.com> Joscha Feth <joscha@feth.com>
Ken703 <bowden.kenny@gmail.com> # Bowden Kenny
Kevin Donnelly <kpdonn@users.noreply.github.com>
Maarten Sijm <M.P.Sijm@student.tudelft.nl>
Paul Koerbitz <paul.koerbitz@gmail.com>
EcoleKeine <Ecole_k@qq.com> # Ecole Keine
Khải <hvksmr1996@gmail.com>
rhysd <lin90162@yahoo.co.jp> # @rhysd
Zen <843968788@qq.com> Zzzen <843968788@qq.com> # @Zzzen
+20 -1
View File
@@ -6,14 +6,17 @@ TypeScript is authored by:
* Aditya Daflapurkar
* Adnan Chowdhury
* Adrian Leonhard
* Adrien Gibrat
* Ahmad Farid
* Akshar Patel
* Alan Agius
* Alex Chugaev
* Alex Eagle
* Alex Khomchenko
* Alex Ryan
* Alexander Kuvaev
* Alexander Rusakov
* Alexander Tarasyuk
* Ali Sabzevari
* Aliaksandr Radzivanovich
* Aluan Haddad
@@ -22,6 +25,7 @@ TypeScript is authored by:
* Andreas Martin
* Andrej Baran
* Andrew Casey
* Andrew Faulkner
* Andrew Ochsner
* Andrew Stegmaier
* Andrew Z Allen
@@ -34,6 +38,7 @@ TypeScript is authored by:
* Armando Aguirre
* Arnaud Tournier
* Arnav Singh
* Artem Tyurin
* Arthur Ozga
* Asad Saeeduddin
* Avery Morin
@@ -49,6 +54,8 @@ TypeScript is authored by:
* Blake Embrey
* @bootstraponline
* Bowden Kelly
* Bowden Kenny
* Brandon Slade
* Brett Mayen
* Bryan Forbes
* Caitlin Potter
@@ -76,6 +83,8 @@ TypeScript is authored by:
* David Sheldrick
* David Souther
* Denis Nedelyaev
* Derek P Sifford
* Dhruv Rajvanshi
* Dick van den Brink
* Diogo Franco (Kovensky)
* Dirk Bäumer
@@ -84,6 +93,7 @@ TypeScript is authored by:
* Donald Pipowitch
* Doug Ilijev
* @e-cloud
* Ecole Keine
* Elisée Maurer
* Emilio García-Pumarino
* Eric Grube
@@ -118,6 +128,7 @@ TypeScript is authored by:
* Hendrik Liebau
* Henry Mercer
* Herrington Darkholme
* Holger Jeromin
* Homa Wong
* Iain Monro
* @IdeaHunter
@@ -155,6 +166,8 @@ TypeScript is authored by:
* Jonathan Toland
* Jonathan Turner
* Jonathon Smith
* Jordi Oliveras Rovira
* Joscha Feth
* Josh Abernathy
* Josh Goldberg
* Josh Kalderimis
@@ -170,7 +183,9 @@ TypeScript is authored by:
* Keith Mashinter
* Ken Howard
* Kenji Imamula
* Kevin Donnelly
* Kevin Lang
* Khải
* Kitson Kelly
* Klaus Meinhardt
* Kris Zyp
@@ -179,6 +194,7 @@ TypeScript is authored by:
* Lorant Pinter
* Lucien Greathouse
* Lukas Elmer
* Maarten Sijm
* Magnus Hiie
* Magnus Kulke
* Manish Giri
@@ -223,6 +239,7 @@ TypeScript is authored by:
* Oussama Ben Brahim
* Patrick Zhong
* Paul Jolly
* Paul Koerbitz
* Paul van Brenk
* @pcbro
* Pedro Maltez
@@ -240,6 +257,7 @@ TypeScript is authored by:
* Raj Dosanjh
* Reiner Dolp
* Remo H. Jansen
* @rhysd
* Ricardo N Feliciano
* Richard Karmazín
* Richard Knoll
@@ -309,4 +327,5 @@ TypeScript is authored by:
* Yuval Greenfield
* Zeeshan Ahmed
* Zev Spitz
* Zhengbo Li
* Zhengbo Li
* @Zzzen
+3 -2
View File
@@ -19,7 +19,7 @@ const userName = process.env.GH_USERNAME;
const reviewers = ["weswigham", "sandersn", "mhegazy"]
const now = new Date();
const branchName = `user-update-${now.getFullYear()}${padNum(now.getMonth())}${padNum(now.getDay())}`;
const remoteUrl = `https://github.com/${userName}/TypeScript.git`;
const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`;
runSequence([
["git", ["checkout", "."]], // reset any changes
["node", ["./node_modules/jake/bin/cli.js", "baseline-accept"]], // accept baselines
@@ -27,7 +27,7 @@ runSequence([
["git", ["add", "."]], // Add all changes
["git", ["commit", "-m", `"Update user baselines"`]], // Commit all changes
["git", ["remote", "add", "fork", remoteUrl]], // Add the remote fork
["git", ["-c", `http.extraheader="AUTHORIZATION: basic ${process.argv[2]}"`, "push", "--set-upstream", "fork", branchName]] // push the branch
["git", ["push", "--set-upstream", "fork", branchName, "-f"]] // push the branch
]);
const gh = new Octokit();
@@ -44,6 +44,7 @@ gh.pullRequests.create({
base: "master",
body:
`Please review the diff and merge if no changes are unexpected.
You can view the build log [here](https://typescript.visualstudio.com/TypeScript/_build/index?buildId=${process.env.BUILD_BUILDID}&_a=summary).
cc ${reviewers.map(r => "@" + r).join(" ")}`,
}).then(r => {
+88 -57
View File
@@ -401,6 +401,7 @@ namespace ts {
const unknownSignature = createSignature(undefined, undefined, undefined, emptyArray, unknownType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
const resolvingSignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
const silentNeverSignature = createSignature(undefined, undefined, undefined, emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
const resolvingSignaturesArray = [resolvingSignature];
const enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true);
const jsObjectLiteralIndexInfo = createIndexInfo(anyType, /*isReadonly*/ false);
@@ -892,6 +893,7 @@ namespace ts {
function mergeSymbol(target: Symbol, source: Symbol) {
if (!(target.flags & getExcludedSymbolFlags(source.flags)) ||
(source.flags | target.flags) & SymbolFlags.JSContainer) {
const targetValueDeclaration = target.valueDeclaration;
Debug.assert(!!(target.flags & SymbolFlags.Transient));
// Javascript static-property-assignment declarations always merge, even though they are also values
if (source.flags & SymbolFlags.ValueModule && target.flags & SymbolFlags.ValueModule && target.constEnumOnlyModule && !source.constEnumOnlyModule) {
@@ -916,12 +918,13 @@ namespace ts {
}
if ((source.flags | target.flags) & SymbolFlags.JSContainer) {
const sourceInitializer = getJSInitializerSymbol(source);
let targetInitializer = getJSInitializerSymbol(target);
const init = getDeclaredJavascriptInitializer(targetValueDeclaration) || getAssignedJavascriptInitializer(targetValueDeclaration);
let targetInitializer = init && init.symbol ? init.symbol : target;
if (!(targetInitializer.flags & SymbolFlags.Transient)) {
const mergedInitializer = getMergedSymbol(targetInitializer);
targetInitializer = mergedInitializer === targetInitializer ? cloneSymbol(targetInitializer) : mergedInitializer;
}
if (sourceInitializer !== source || targetInitializer !== target) {
if (!(targetInitializer.flags & SymbolFlags.Transient)) {
const mergedInitializer = getMergedSymbol(targetInitializer);
targetInitializer = mergedInitializer === targetInitializer ? cloneSymbol(targetInitializer) : mergedInitializer;
}
mergeSymbol(targetInitializer, sourceInitializer);
}
}
@@ -4022,6 +4025,10 @@ namespace ts {
function determineIfDeclarationIsVisible() {
switch (node.kind) {
case SyntaxKind.JSDocTypedefTag:
// Top-level jsdoc typedefs are considered exported
// First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file
return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent));
case SyntaxKind.BindingElement:
return isDeclarationVisible(node.parent.parent);
case SyntaxKind.VariableDeclaration:
@@ -5161,8 +5168,8 @@ namespace ts {
let result: TypeParameter[];
for (const node of symbol.declarations) {
if (node.kind === SyntaxKind.InterfaceDeclaration || node.kind === SyntaxKind.ClassDeclaration ||
node.kind === SyntaxKind.ClassExpression || node.kind === SyntaxKind.TypeAliasDeclaration) {
const declaration = <InterfaceDeclaration | TypeAliasDeclaration>node;
node.kind === SyntaxKind.ClassExpression || node.kind === SyntaxKind.TypeAliasDeclaration || node.kind === SyntaxKind.JSDocTypedefTag) {
const declaration = <InterfaceDeclaration | TypeAliasDeclaration | JSDocTypedefTag>node;
const typeParameters = getEffectiveTypeParameterDeclarations(declaration);
if (typeParameters) {
result = appendTypeParameters(result, typeParameters);
@@ -8692,6 +8699,10 @@ namespace ts {
// Transform an indexed access to a simpler form, if possible. Return the simpler form, or return
// the type itself if no transformation is possible.
function getSimplifiedIndexedAccessType(type: IndexedAccessType): Type {
if (type.simplified) {
return type.simplified === circularConstraintType ? type : type.simplified;
}
type.simplified = circularConstraintType;
const objectType = type.objectType;
if (objectType.flags & TypeFlags.Intersection && isGenericObjectType(objectType)) {
// Given an indexed access type T[K], if T is an intersection containing one or more generic types and one or
@@ -8709,7 +8720,7 @@ namespace ts {
regularTypes.push(t);
}
}
return getUnionType([
return type.simplified = getUnionType([
getSimplifiedType(getIndexedAccessType(getIntersectionType(regularTypes), type.indexType)),
getIntersectionType(stringIndexTypes)
]);
@@ -8720,7 +8731,7 @@ namespace ts {
// eventually anyway, but it easier to reason about.
if (some((<IntersectionType>objectType).types, isMappedTypeToNever)) {
const nonNeverTypes = filter((<IntersectionType>objectType).types, t => !isMappedTypeToNever(t));
return getSimplifiedType(getIndexedAccessType(getIntersectionType(nonNeverTypes), type.indexType));
return type.simplified = getSimplifiedType(getIndexedAccessType(getIntersectionType(nonNeverTypes), type.indexType));
}
}
// If the object type is a mapped type { [P in K]: E }, where K is generic, instantiate E using a mapper
@@ -8728,15 +8739,15 @@ namespace ts {
// construct the type Box<T[X]>. We do not further simplify the result because mapped types can be recursive
// and we might never terminate.
if (isGenericMappedType(objectType)) {
return substituteIndexedMappedType(objectType, type);
return type.simplified = substituteIndexedMappedType(objectType, type);
}
if (objectType.flags & TypeFlags.TypeParameter) {
const constraint = getConstraintFromTypeParameter(objectType as TypeParameter);
if (constraint && isGenericMappedType(constraint)) {
return substituteIndexedMappedType(constraint, type);
return type.simplified = substituteIndexedMappedType(constraint, type);
}
}
return type;
return type.simplified = type;
}
function substituteIndexedMappedType(objectType: MappedType, type: IndexedAccessType) {
@@ -9040,7 +9051,7 @@ namespace ts {
}
function getAliasSymbolForTypeNode(node: TypeNode) {
return node.parent.kind === SyntaxKind.TypeAliasDeclaration ? getSymbolOfNode(node.parent) : undefined;
return (node.parent.kind === SyntaxKind.TypeAliasDeclaration || node.parent.kind === SyntaxKind.JSDocTypedefTag) ? getSymbolOfNode(node.parent) : undefined;
}
function getAliasTypeArgumentsForTypeNode(node: TypeNode) {
@@ -15349,8 +15360,17 @@ namespace ts {
}
}
if (context.typeArguments) {
signatures = mapDefined(signatures, s => getJsxSignatureTypeArgumentInstantiation(s, context, isJs));
const links = getNodeLinks(context);
if (!links.resolvedSignatures) {
links.resolvedSignatures = createMap();
}
const cacheKey = "" + getTypeId(valueType);
if (links.resolvedSignatures.get(cacheKey) && links.resolvedSignatures.get(cacheKey) !== resolvingSignaturesArray) {
signatures = links.resolvedSignatures.get(cacheKey);
}
else if (!links.resolvedSignatures.get(cacheKey)) {
links.resolvedSignatures.set(cacheKey, resolvingSignaturesArray);
links.resolvedSignatures.set(cacheKey, signatures = instantiateJsxSignatures(context, signatures));
}
return getUnionType(map(signatures, ctor ? t => getJsxPropsTypeFromClassType(t, isJs, context, /*reportErrors*/ false) : t => getJsxPropsTypeFromCallSignature(t, context)), UnionReduction.None);
@@ -16331,6 +16351,40 @@ namespace ts {
return undefined;
}
function getInstantiatedJsxSignatures(openingLikeElement: JsxOpeningLikeElement, elementType: Type, reportErrors?: boolean) {
const links = getNodeLinks(openingLikeElement);
if (!links.resolvedSignatures) {
links.resolvedSignatures = createMap();
}
const cacheKey = "" + getTypeId(elementType);
if (links.resolvedSignatures.get(cacheKey) && links.resolvedSignatures.get(cacheKey) === resolvingSignaturesArray) {
return;
}
else if (links.resolvedSignatures.get(cacheKey)) {
return links.resolvedSignatures.get(cacheKey);
}
links.resolvedSignatures.set(cacheKey, resolvingSignaturesArray);
// Resolve the signatures, preferring constructor
let signatures = getSignaturesOfType(elementType, SignatureKind.Construct);
if (signatures.length === 0) {
// No construct signatures, try call signatures
signatures = getSignaturesOfType(elementType, SignatureKind.Call);
if (signatures.length === 0) {
// We found no signatures at all, which is an error
if (reportErrors) {
error(openingLikeElement.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(openingLikeElement.tagName));
}
return;
}
}
// Instantiate in context of source type
const results = instantiateJsxSignatures(openingLikeElement, signatures);
links.resolvedSignatures.set(cacheKey, results);
return results;
}
/**
* Resolve attributes type of the given opening-like element. The attributes type is a type of attributes associated with the given elementType.
* For instance:
@@ -16393,20 +16447,10 @@ namespace ts {
// Get the element instance type (the result of newing or invoking this tag)
// Resolve the signatures, preferring constructor
let signatures = getSignaturesOfType(elementType, SignatureKind.Construct);
if (signatures.length === 0) {
// No construct signatures, try call signatures
signatures = getSignaturesOfType(elementType, SignatureKind.Call);
if (signatures.length === 0) {
// We found no signatures at all, which is an error
error(openingLikeElement.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(openingLikeElement.tagName));
return unknownType;
}
const instantiatedSignatures = getInstantiatedJsxSignatures(openingLikeElement, elementType, /*reportErrors*/ true);
if (!length(instantiatedSignatures)) {
return unknownType;
}
// Instantiate in context of source type
const instantiatedSignatures = instantiateJsxSignatures(openingLikeElement, signatures);
const elemInstanceType = getUnionType(map(instantiatedSignatures, getReturnTypeOfSignature), UnionReduction.Subtype);
// If we should include all stateless attributes type, then get all attributes type from all stateless function signature.
@@ -18096,11 +18140,11 @@ namespace ts {
let typeArguments: NodeArray<TypeNode>;
if (!isDecorator && !isJsxOpeningOrSelfClosingElement) {
if (!isDecorator) {
typeArguments = (<CallExpression>node).typeArguments;
// We already perform checking on the type arguments on the class declaration itself.
if (isTaggedTemplate || (<CallExpression>node).expression.kind !== SyntaxKind.SuperKeyword) {
if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || (<CallExpression>node).expression.kind !== SyntaxKind.SuperKeyword) {
forEach(typeArguments, checkSourceElement);
}
}
@@ -18689,30 +18733,6 @@ namespace ts {
*/
function getResolvedJsxStatelessFunctionSignature(openingLikeElement: JsxOpeningLikeElement, elementType: Type, candidatesOutArray: Signature[]): Signature | undefined {
Debug.assert(!(elementType.flags & TypeFlags.Union));
return resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray);
}
/**
* Try treating a given opening-like element as stateless function component and resolve a tagName to a function signature.
* @param openingLikeElement an JSX opening-like element we want to try resolve its stateless function if possible
* @param elementType a type of the opening-like JSX element, a result of resolving tagName in opening-like element.
* @param candidatesOutArray an array of signature to be filled in by the function. It is passed by signature help in the language service;
* the function will fill it up with appropriate candidate signatures
* @return a resolved signature if we can find function matching function signature through resolve call or a first signature in the list of functions.
* otherwise return undefined if tag-name of the opening-like element doesn't have call signatures
*/
function resolveStatelessJsxOpeningLikeElement(openingLikeElement: JsxOpeningLikeElement, elementType: Type, candidatesOutArray: Signature[]): Signature | undefined {
// If this function is called from language service, elementType can be a union type. This is not possible if the function is called from compiler (see: resolveCustomJsxElementAttributesType)
if (elementType.flags & TypeFlags.Union) {
const types = (elementType as UnionType).types;
let result: Signature;
for (const type of types) {
result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
}
return result;
}
const callSignatures = elementType && getSignaturesOfType(elementType, SignatureKind.Call);
if (callSignatures && callSignatures.length > 0) {
return resolveCall(openingLikeElement, callSignatures, candidatesOutArray);
@@ -18734,7 +18754,18 @@ namespace ts {
case SyntaxKind.JsxOpeningElement:
case SyntaxKind.JsxSelfClosingElement:
// This code-path is called by language service
return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray) || unknownSignature;
const exprTypes = checkExpression(node.tagName);
return forEachType(exprTypes, exprType => {
const sfcResult = getResolvedJsxStatelessFunctionSignature(node, exprType, candidatesOutArray);
if (sfcResult && sfcResult !== unknownSignature) {
return sfcResult;
}
const sigs = getInstantiatedJsxSignatures(node, exprType);
if (candidatesOutArray && length(sigs)) {
candidatesOutArray.push(...sigs);
}
return length(sigs) ? sigs[0] : unknownSignature;
}) || unknownSignature;
}
Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable.");
}
@@ -22613,11 +22644,11 @@ namespace ts {
const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? UnusedKind.Parameter : UnusedKind.Local;
if (!bindingPattern.elements.every(e => contains(bindingElements, e))) {
for (const e of bindingElements) {
addDiagnostic(kind, createDiagnosticForNode(e, Diagnostics._0_is_declared_but_its_value_is_never_read, getBindingElementNameText(e)));
addDiagnostic(kind, createDiagnosticForNode(e, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(cast(e.name, isIdentifier))));
}
}
else if (bindingElements.length === 1) {
addDiagnostic(kind, createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, getBindingElementNameText(first(bindingElements))));
addDiagnostic(kind, createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(cast(first(bindingElements).name, isIdentifier))));
}
else {
addDiagnostic(kind, createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused));
+9
View File
@@ -2900,6 +2900,15 @@ namespace ts {
return setSyntheticTrailingComments(node, append<SynthesizedComment>(getSyntheticTrailingComments(node), { kind, pos: -1, end: -1, hasTrailingNewLine, text }));
}
export function moveSyntheticComments<T extends Node>(node: T, original: Node): T {
setSyntheticLeadingComments(node, getSyntheticLeadingComments(original));
setSyntheticTrailingComments(node, getSyntheticTrailingComments(original));
const emit = getOrCreateEmitNode(original);
emit.leadingComments = undefined;
emit.trailingComments = undefined;
return node;
}
/**
* Gets the constant value to emit for an expression.
*/
+15 -4
View File
@@ -1012,8 +1012,10 @@ namespace ts {
}
else {
const jsPath = tryReadPackageJsonFields(/*readTypes*/ false, packageJsonContent, nodeModuleDirectory, state);
if (typeof jsPath === "string") {
subModuleName = removeExtension(removeExtension(jsPath.substring(nodeModuleDirectory.length + 1), Extension.Js), Extension.Jsx) + Extension.Dts;
if (typeof jsPath === "string" && jsPath.length > nodeModuleDirectory.length) {
const potentialSubModule = jsPath.substring(nodeModuleDirectory.length + 1);
subModuleName = (forEach(supportedJavascriptExtensions, extension =>
tryRemoveExtension(potentialSubModule, extension)) || potentialSubModule) + Extension.Dts;
}
else {
subModuleName = "index.d.ts";
@@ -1047,9 +1049,18 @@ namespace ts {
}
function loadModuleFromPackageJson(jsonContent: PackageJsonPathFields, extensions: Extensions, candidate: string, failedLookupLocations: Push<string>, state: ModuleResolutionState): PathAndExtension | undefined {
const file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript && extensions !== Extensions.Json, jsonContent, candidate, state);
let file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript && extensions !== Extensions.Json, jsonContent, candidate, state);
if (!file) {
return undefined;
if (extensions === Extensions.TypeScript) {
// When resolving typescript modules, try resolving using main field as well
file = tryReadPackageJsonFields(/*readTypes*/ false, jsonContent, candidate, state);
if (!file) {
return undefined;
}
}
else {
return undefined;
}
}
const onlyRecordFailures = !directoryProbablyExists(getDirectoryPath(file), state.host);
+21 -7
View File
@@ -2436,20 +2436,24 @@ namespace ts {
return finishNode(node);
}
/**
* @returns If return type parsing succeeds
*/
function fillSignature(
returnToken: SyntaxKind.ColonToken | SyntaxKind.EqualsGreaterThanToken,
flags: SignatureFlags,
signature: SignatureDeclaration): void {
signature: SignatureDeclaration): boolean {
if (!(flags & SignatureFlags.JSDoc)) {
signature.typeParameters = parseTypeParameters();
}
signature.parameters = parseParameterList(flags);
signature.type = parseReturnType(returnToken, !!(flags & SignatureFlags.Type));
if (shouldParseReturnType(returnToken, !!(flags & SignatureFlags.Type))) {
signature.type = parseTypeOrTypePredicate();
return signature.type !== undefined;
}
return true;
}
function parseReturnType(returnToken: SyntaxKind.ColonToken | SyntaxKind.EqualsGreaterThanToken, isType: boolean): TypeNode | undefined {
return shouldParseReturnType(returnToken, isType) ? parseTypeOrTypePredicate() : undefined;
}
function shouldParseReturnType(returnToken: SyntaxKind.ColonToken | SyntaxKind.EqualsGreaterThanToken, isType: boolean): boolean {
if (returnToken === SyntaxKind.EqualsGreaterThanToken) {
parseExpected(returnToken);
@@ -2758,6 +2762,9 @@ namespace ts {
const node = <ParenthesizedTypeNode>createNode(SyntaxKind.ParenthesizedType);
parseExpected(SyntaxKind.OpenParenToken);
node.type = parseType();
if (!node.type) {
return undefined;
}
parseExpected(SyntaxKind.CloseParenToken);
return finishNode(node);
}
@@ -2767,7 +2774,12 @@ namespace ts {
if (kind === SyntaxKind.ConstructorType) {
parseExpected(SyntaxKind.NewKeyword);
}
fillSignature(SyntaxKind.EqualsGreaterThanToken, SignatureFlags.Type, node);
if (!fillSignature(SyntaxKind.EqualsGreaterThanToken, SignatureFlags.Type | (sourceFile.languageVariant === LanguageVariant.JSX ? SignatureFlags.RequireCompleteParameterList : 0), node)) {
return undefined;
}
if (!node.parameters) {
return undefined;
}
return finishNode(node);
}
@@ -3598,7 +3610,9 @@ namespace ts {
// a => (b => c)
// And think that "(b =>" was actually a parenthesized arrow function with a missing
// close paren.
fillSignature(SyntaxKind.ColonToken, isAsync | (allowAmbiguity ? SignatureFlags.None : SignatureFlags.RequireCompleteParameterList), node);
if (!fillSignature(SyntaxKind.ColonToken, isAsync | (allowAmbiguity ? SignatureFlags.None : SignatureFlags.RequireCompleteParameterList), node)) {
return undefined;
}
// If we couldn't get parameters, we definitely could not parse out an arrow function.
if (!node.parameters) {
+11 -3
View File
@@ -448,10 +448,11 @@ namespace ts {
readDirectory(path: string, extensions?: ReadonlyArray<string>, exclude?: ReadonlyArray<string>, include?: ReadonlyArray<string>, depth?: number): string[];
getModifiedTime?(path: string): Date;
/**
* This should be cryptographically secure.
* A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm)
*/
createHash?(data: string): string;
/** This must be cryptographically secure. Only implement this method using `crypto.createHash("sha256")`. */
createSHA256Hash?(data: string): string;
getMemoryUsage?(): number;
exit(exitCode?: number): void;
realpath?(path: string): string;
@@ -527,7 +528,7 @@ namespace ts {
const _path = require("path");
const _os = require("os");
// crypto can be absent on reduced node installations
let _crypto: any;
let _crypto: typeof import("crypto");
try {
_crypto = require("crypto");
}
@@ -590,6 +591,7 @@ namespace ts {
readDirectory,
getModifiedTime,
createHash: _crypto ? createMD5HashUsingNativeCrypto : generateDjb2Hash,
createSHA256Hash: _crypto ? createSHA256Hash : undefined,
getMemoryUsage() {
if (global.gc) {
global.gc();
@@ -1072,11 +1074,17 @@ namespace ts {
return `${chars.reduce((prev, curr) => ((prev << 5) + prev) + curr, 5381)}`;
}
function createMD5HashUsingNativeCrypto(data: string) {
function createMD5HashUsingNativeCrypto(data: string): string {
const hash = _crypto.createHash("md5");
hash.update(data);
return hash.digest("hex");
}
function createSHA256Hash(data: string): string {
const hash = _crypto.createHash("sha256");
hash.update(data);
return hash.digest("hex");
}
}
function getChakraSystem(): System {
+1
View File
@@ -1885,6 +1885,7 @@ namespace ts {
const expression = visitNode(body, visitor, isExpression);
const returnStatement = createReturn(expression);
setTextRange(returnStatement, body);
moveSyntheticComments(returnStatement, body);
setEmitFlags(returnStatement, EmitFlags.NoTokenSourceMaps | EmitFlags.NoTrailingSourceMap | EmitFlags.NoTrailingComments);
statements.push(returnStatement);
+5
View File
@@ -2534,6 +2534,11 @@ namespace ts {
// we can safely elide the parentheses here, as a new synthetic
// ParenthesizedExpression will be inserted if we remove parentheses too
// aggressively.
// HOWEVER - if there are leading comments on the expression itself, to handle ASI
// correctly for return and throw, we must keep the parenthesis
if (length(getLeadingCommentRangesOfNode(expression, currentSourceFile))) {
return updateParen(node, expression);
}
return createPartiallyEmittedExpression(expression, node);
}
+2
View File
@@ -3625,6 +3625,7 @@ namespace ts {
flags?: NodeCheckFlags; // Set of flags specific to Node
resolvedType?: Type; // Cached type of type node
resolvedSignature?: Signature; // Cached signature of signature node or call expression
resolvedSignatures?: Map<Signature[]>; // Cached signatures of jsx node
resolvedSymbol?: Symbol; // Cached name resolution result
resolvedIndexInfo?: IndexInfo; // Cached indexing info resolution result
maybeTypePredicate?: boolean; // Cached check whether call expression might reference a type predicate
@@ -3973,6 +3974,7 @@ namespace ts {
objectType: Type;
indexType: Type;
constraint?: Type;
simplified?: Type;
}
export type TypeVariable = TypeParameter | IndexedAccessType;
+14 -10
View File
@@ -1842,9 +1842,9 @@ namespace ts {
(node as ModuleDeclaration).body;
}
export function getJSDocCommentsAndTags(node: Node): ReadonlyArray<JSDoc | JSDocTag> {
export function getJSDocCommentsAndTags(hostNode: Node): ReadonlyArray<JSDoc | JSDocTag> {
let result: (JSDoc | JSDocTag)[] | undefined;
getJSDocCommentsAndTagsWorker(node);
getJSDocCommentsAndTagsWorker(hostNode);
return result || emptyArray;
function getJSDocCommentsAndTagsWorker(node: Node): void {
@@ -1860,7 +1860,7 @@ namespace ts {
// */
// var x = function(name) { return name.length; }
if (parent.parent &&
(getSingleVariableOfVariableStatement(parent.parent) === node || getSourceOfAssignment(parent.parent))) {
(getSingleVariableOfVariableStatement(parent.parent) === node)) {
getJSDocCommentsAndTagsWorker(parent.parent);
}
if (parent.parent && parent.parent.parent &&
@@ -1869,8 +1869,8 @@ namespace ts {
getSourceOfDefaultedAssignment(parent.parent.parent))) {
getJSDocCommentsAndTagsWorker(parent.parent.parent);
}
if (isBinaryExpression(node) && getSpecialPropertyAssignmentKind(node) !== SpecialPropertyAssignmentKind.None ||
isBinaryExpression(parent) && getSpecialPropertyAssignmentKind(parent) !== SpecialPropertyAssignmentKind.None ||
if (isBinaryExpression(node) && node.operatorToken.kind === SyntaxKind.EqualsToken ||
isBinaryExpression(parent) && parent.operatorToken.kind === SyntaxKind.EqualsToken ||
node.kind === SyntaxKind.PropertyAccessExpression && node.parent && node.parent.kind === SyntaxKind.ExpressionStatement) {
getJSDocCommentsAndTagsWorker(parent);
}
@@ -1880,7 +1880,7 @@ namespace ts {
result = addRange(result, getJSDocParameterTags(node as ParameterDeclaration));
}
if (isVariableLike(node) && hasInitializer(node) && hasJSDocNodes(node.initializer)) {
if (isVariableLike(node) && hasInitializer(node) && node.initializer !== hostNode && hasJSDocNodes(node.initializer)) {
result = addRange(result, node.initializer.jsDoc);
}
@@ -3093,11 +3093,13 @@ namespace ts {
* Gets the effective type parameters. If the node was parsed in a
* JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
*/
export function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters) {
return node.typeParameters || (isInJavaScriptFile(node) ? getJSDocTypeParameterDeclarations(node) : undefined);
export function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters | JSDocTypedefTag) {
return isJSDocTypedefTag(node)
? getJSDocTypeParameterDeclarations(node)
: node.typeParameters || (isInJavaScriptFile(node) ? getJSDocTypeParameterDeclarations(node) : undefined);
}
export function getJSDocTypeParameterDeclarations(node: DeclarationWithTypeParameters) {
export function getJSDocTypeParameterDeclarations(node: DeclarationWithTypeParameters | JSDocTypedefTag) {
const templateTag = getJSDocTemplateTag(node);
return templateTag && templateTag.typeParameters;
}
@@ -4771,7 +4773,9 @@ namespace ts {
let tags = (node as JSDocContainer).jsDocCache;
// If cache is 'null', that means we did the work of searching for JSDoc tags and came up with nothing.
if (tags === undefined) {
(node as JSDocContainer).jsDocCache = tags = flatMap(getJSDocCommentsAndTags(node), j => isJSDoc(j) ? j.tags : j);
const comments = getJSDocCommentsAndTags(node);
Debug.assert(comments.length < 2 || comments[0] !== comments[1]);
(node as JSDocContainer).jsDocCache = tags = flatMap(comments, j => isJSDoc(j) ? j.tags : j);
}
return tags;
}
+58 -4
View File
@@ -2,6 +2,7 @@
/// <reference path="runnerbase.ts" />
const fs = require("fs");
const path = require("path");
const del = require("del");
interface ExecResult {
stdout: Buffer;
@@ -26,10 +27,36 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
// Read in and evaluate the test list
const testList = this.tests && this.tests.length ? this.tests : this.enumerateTestFiles();
describe(`${this.kind()} code samples`, () => {
// tslint:disable-next-line:no-this-assignment
const cls = this;
describe(`${this.kind()} code samples`, function(this: Mocha.ISuiteCallbackContext) {
this.timeout(600_000); // 10 minutes
const cwd = path.join(Harness.IO.getWorkspaceRoot(), cls.testDir);
const placeholderName = ".node_modules";
const moduleDirName = "node_modules";
before(() => {
ts.forEachAncestorDirectory(cwd, dir => {
try {
fs.renameSync(path.join(dir, moduleDirName), path.join(dir, placeholderName));
}
catch {
// empty
}
});
});
for (const test of testList) {
this.runTest(typeof test === "string" ? test : test.file);
cls.runTest(typeof test === "string" ? test : test.file);
}
after(() => {
ts.forEachAncestorDirectory(cwd, dir => {
try {
fs.renameSync(path.join(dir, placeholderName), path.join(dir, moduleDirName));
}
catch {
// empty
}
});
});
});
}
private runTest(directoryName: string) {
@@ -42,6 +69,7 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
it("should build successfully", () => {
let cwd = path.join(Harness.IO.getWorkspaceRoot(), cls.testDir, directoryName);
const originalCwd = cwd;
const stdio = isWorker ? "pipe" : "inherit";
let types: string[];
if (fs.existsSync(path.join(cwd, "test.json"))) {
@@ -64,7 +92,7 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
fs.unlinkSync(path.join(cwd, "package-lock.json"));
}
if (fs.existsSync(path.join(cwd, "node_modules"))) {
require("del").sync(path.join(cwd, "node_modules"), { force: true });
del.sync(path.join(cwd, "node_modules"), { force: true });
}
const install = cp.spawnSync(`npm`, ["i", "--ignore-scripts"], { cwd, timeout: timeout / 2, shell: true, stdio }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure
if (install.status !== 0) throw new Error(`NPM Install for ${directoryName} failed: ${install.stderr.toString()}`);
@@ -72,6 +100,9 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
const args = [path.join(Harness.IO.getWorkspaceRoot(), "built/local/tsc.js")];
if (types) {
args.push("--types", types.join(","));
// Also actually install those types (for, eg, the js projects which need node)
const install = cp.spawnSync(`npm`, ["i", ...types.map(t => `@types/${t}`), "--no-save", "--ignore-scripts"], { cwd: originalCwd, timeout: timeout / 2, shell: true, stdio }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure
if (install.status !== 0) throw new Error(`NPM Install types for ${directoryName} failed: ${install.stderr.toString()}`);
}
args.push("--noEmit");
Harness.Baseline.runBaseline(`${cls.kind()}/${directoryName}.log`, () => {
@@ -91,7 +122,7 @@ class UserCodeRunner extends ExternalCompileRunnerBase {
// tslint:disable-next-line:no-null-keyword
return result.status === 0 && !result.stdout.length && !result.stderr.length ? null : `Exit Code: ${result.status}
Standard output:
${stripAbsoluteImportPaths(result.stdout.toString().replace(/\r\n/g, "\n"))}
${sortErrors(stripAbsoluteImportPaths(result.stdout.toString().replace(/\r\n/g, "\n")))}
Standard error:
@@ -109,6 +140,29 @@ function stripAbsoluteImportPaths(result: string) {
.replace(/Module '".*?\/tests\/cases\/user\//g, `Module '"/`);
}
function sortErrors(result: string) {
return ts.flatten(splitBy(result.split("\n"), s => /^\S+/.test(s)).sort(compareErrorStrings)).join("\n");
}
const errorRegexp = /^(.+\.[tj]sx?)\((\d+),(\d+)\): error TS/;
function compareErrorStrings(a: string[], b: string[]) {
ts.Debug.assertGreaterThanOrEqual(a.length, 1);
ts.Debug.assertGreaterThanOrEqual(b.length, 1);
const matchA = a[0].match(errorRegexp);
if (!matchA) {
return -1;
}
const matchB = b[0].match(errorRegexp);
if (!matchB) {
return 1;
}
const [, errorFileA, lineNumberStringA, columnNumberStringA] = matchA;
const [, errorFileB, lineNumberStringB, columnNumberStringB] = matchB;
return ts.comparePathsCaseSensitive(errorFileA, errorFileB) ||
ts.compareValues(parseInt(lineNumberStringA), parseInt(lineNumberStringB)) ||
ts.compareValues(parseInt(columnNumberStringA), parseInt(columnNumberStringB));
}
class DefinitelyTypedRunner extends ExternalCompileRunnerBase {
readonly testDir = "../DefinitelyTyped/types/";
workingDirectory = this.testDir;
+144 -147
View File
@@ -23,7 +23,7 @@
namespace FourSlash {
ts.disableIncrementalParsing = false;
import ArrayOrSingle = FourSlashInterface.Many;
import ArrayOrSingle = FourSlashInterface.ArrayOrSingle;
// Represents a parsed source file with metadata
interface FourSlashFile {
@@ -378,7 +378,6 @@ namespace FourSlash {
"getCompletionEntryDetails",
"getCompletionEntrySymbol",
"getQuickInfoAtPosition",
"getSignatureHelpItems",
"getReferencesAtPosition",
"getDocumentHighlights",
];
@@ -1062,8 +1061,8 @@ namespace FourSlash {
if (tags !== undefined) {
assert.equal(details.tags.length, tags.length, this.messageAtLastKnownMarker("QuickInfo tags"));
ts.zipWith(tags, details.tags, (expectedTag, actualTag) => {
assert.equal(expectedTag.name, actualTag.name);
assert.equal(expectedTag.text, actualTag.text, this.messageAtLastKnownMarker("QuickInfo tag " + actualTag.name));
assert.equal(actualTag.name, expectedTag.name);
assert.equal(actualTag.text, expectedTag.text, this.messageAtLastKnownMarker("QuickInfo tag " + actualTag.name));
});
}
}
@@ -1446,83 +1445,91 @@ Actual: ${stringify(fullActual)}`);
}
}
public verifyCurrentSignatureHelpIs(expected: string) {
const help = this.getActiveSignatureHelpItem();
assert.equal(
ts.displayPartsToString(help.prefixDisplayParts) +
help.parameters.map(p => ts.displayPartsToString(p.displayParts)).join(ts.displayPartsToString(help.separatorDisplayParts)) +
ts.displayPartsToString(help.suffixDisplayParts), expected);
public verifyNoSignatureHelp(markers: ReadonlyArray<string>) {
if (markers.length) {
for (const marker of markers) {
this.goToMarker(marker);
this.verifyNoSignatureHelp(ts.emptyArray);
}
return;
}
const actual = this.getSignatureHelp();
if (actual) {
this.raiseError(`Expected no signature help, but got "${stringify(actual)}"`);
}
}
public verifyCurrentParameterIsVariable(isVariable: boolean) {
const signature = this.getActiveSignatureHelpItem();
assert.isOk(signature);
assert.equal(isVariable, signature.isVariadic);
public verifySignatureHelp(optionses: ReadonlyArray<FourSlashInterface.VerifySignatureHelpOptions>) {
for (const options of optionses) {
if (options.marker === undefined) {
this.verifySignatureHelpWorker(options);
}
else {
for (const marker of toArray(options.marker)) {
this.goToMarker(marker);
this.verifySignatureHelpWorker(options);
}
}
}
}
public verifyCurrentParameterHelpName(name: string) {
const activeParameter = this.getActiveParameter();
const activeParameterName = activeParameter.name;
assert.equal(activeParameterName, name);
}
private verifySignatureHelpWorker(options: FourSlashInterface.VerifySignatureHelpOptions) {
const help = this.getSignatureHelp();
const selectedItem = help.items[help.selectedItemIndex];
// Argument index may exceed number of parameters
const currentParameter: ts.SignatureHelpParameter | undefined = selectedItem.parameters[help.argumentIndex];
public verifyCurrentParameterSpanIs(parameter: string) {
const activeParameter = this.getActiveParameter();
assert.equal(ts.displayPartsToString(activeParameter.displayParts), parameter);
}
assert.equal(help.items.length, options.overloadsCount || 1, this.assertionMessageAtLastKnownMarker("signature help overloads count"));
public verifyCurrentParameterHelpDocComment(docComment: string) {
const activeParameter = this.getActiveParameter();
const activeParameterDocComment = activeParameter.documentation;
assert.equal(ts.displayPartsToString(activeParameterDocComment), docComment, this.assertionMessageAtLastKnownMarker("current parameter Help DocComment"));
}
assert.equal(ts.displayPartsToString(selectedItem.documentation), options.docComment || "", this.assertionMessageAtLastKnownMarker("current signature help doc comment"));
public verifyCurrentSignatureHelpParameterCount(expectedCount: number) {
assert.equal(this.getActiveSignatureHelpItem().parameters.length, expectedCount);
}
if (options.text !== undefined) {
assert.equal(
ts.displayPartsToString(selectedItem.prefixDisplayParts) +
selectedItem.parameters.map(p => ts.displayPartsToString(p.displayParts)).join(ts.displayPartsToString(selectedItem.separatorDisplayParts)) +
ts.displayPartsToString(selectedItem.suffixDisplayParts), options.text);
}
if (options.parameterName !== undefined) {
assert.equal(currentParameter!.name, options.parameterName);
}
if (options.parameterSpan !== undefined) {
assert.equal(ts.displayPartsToString(currentParameter!.displayParts), options.parameterSpan);
}
if (currentParameter) {
assert.equal(ts.displayPartsToString(currentParameter.documentation), options.parameterDocComment || "", this.assertionMessageAtLastKnownMarker("current parameter Help DocComment"));
}
if (options.parameterCount !== undefined) {
assert.equal(selectedItem.parameters.length, options.parameterCount);
}
if (options.argumentCount !== undefined) {
assert.equal(help.argumentCount, options.argumentCount);
}
public verifyCurrentSignatureHelpIsVariadic(expected: boolean) {
assert.equal(this.getActiveSignatureHelpItem().isVariadic, expected);
}
assert.equal(selectedItem.isVariadic, !!options.isVariadic);
public verifyCurrentSignatureHelpDocComment(docComment: string) {
const actualDocComment = this.getActiveSignatureHelpItem().documentation;
assert.equal(ts.displayPartsToString(actualDocComment), docComment, this.assertionMessageAtLastKnownMarker("current signature help doc comment"));
}
public verifyCurrentSignatureHelpTags(tags: ts.JSDocTagInfo[]) {
const actualTags = this.getActiveSignatureHelpItem().tags;
assert.equal(actualTags.length, tags.length, this.assertionMessageAtLastKnownMarker("signature help tags"));
ts.zipWith(tags, actualTags, (expectedTag, actualTag) => {
const actualTags = selectedItem.tags;
assert.equal(actualTags.length, (options.tags || ts.emptyArray).length, this.assertionMessageAtLastKnownMarker("signature help tags"));
ts.zipWith((options.tags || ts.emptyArray), actualTags, (expectedTag, actualTag) => {
assert.equal(expectedTag.name, actualTag.name);
assert.equal(expectedTag.text, actualTag.text, this.assertionMessageAtLastKnownMarker("signature help tag " + actualTag.name));
});
}
public verifySignatureHelpCount(expected: number) {
const help = this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition);
const actual = help && help.items ? help.items.length : 0;
assert.equal(actual, expected);
}
public verifySignatureHelpArgumentCount(expected: number) {
const signatureHelpItems = this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition);
const actual = signatureHelpItems.argumentCount;
assert.equal(actual, expected);
}
public verifySignatureHelpPresent(shouldBePresent = true) {
const actual = this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition);
if (shouldBePresent) {
if (!actual) {
this.raiseError("Expected signature help to be present, but it wasn't");
}
}
else {
if (actual) {
this.raiseError(`Expected no signature help, but got "${stringify(actual)}"`);
}
const allKeys: ReadonlyArray<keyof FourSlashInterface.VerifySignatureHelpOptions> = [
"marker",
"overloadsCount",
"docComment",
"text",
"parameterName",
"parameterSpan",
"parameterDocComment",
"parameterCount",
"isVariadic",
"tags",
"argumentCount",
];
for (const key in options) {
ts.Debug.assert(ts.contains(allKeys, key));
}
}
@@ -1564,19 +1571,6 @@ Actual: ${stringify(fullActual)}`);
this.validate("error", message, renameInfo.localizedErrorMessage);
}
private getActiveSignatureHelpItem() {
const help = this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition);
const index = help.selectedItemIndex;
return help.items[index];
}
private getActiveParameter(): ts.SignatureHelpParameter {
const help = this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition);
const item = help.items[help.selectedItemIndex];
const currentParam = help.argumentIndex;
return item.parameters[currentParam];
}
private alignmentForExtraInfo = 50;
private spanInfoToString(spanInfo: ts.TextSpan, prefixString: string) {
@@ -1790,8 +1784,12 @@ Actual: ${stringify(fullActual)}`);
}
public printCurrentSignatureHelp() {
const sigHelp = this.getActiveSignatureHelpItem();
Harness.IO.log(stringify(sigHelp));
const help = this.getSignatureHelp();
Harness.IO.log(stringify(help.items[help.selectedItemIndex]));
}
private getSignatureHelp(): ts.SignatureHelpItems | undefined {
return this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition);
}
public printCompletionListMembers(preferences: ts.UserPreferences | undefined) {
@@ -2295,9 +2293,13 @@ Actual: ${stringify(fullActual)}`);
}
public verifyCurrentFileContent(text: string) {
const actual = this.getFileContent(this.activeFile.fileName);
this.verifyFileContent(this.activeFile.fileName, text);
}
private verifyFileContent(fileName: string, text: string) {
const actual = this.getFileContent(fileName);
if (actual !== text) {
throw new Error(`verifyCurrentFileContent failed:\n${showTextDiff(text, actual)}`);
throw new Error(`verifyFileContent failed:\n${showTextDiff(text, actual)}`);
}
}
@@ -2485,7 +2487,7 @@ Actual: ${stringify(fullActual)}`);
this.applyCodeActions(details.codeActions);
this.verifyNewContent(options);
this.verifyNewContent(options, ts.flatMap(details.codeActions, a => a.changes.map(c => c.fileName)));
}
public verifyRangeIs(expectedText: string, includeWhiteSpace?: boolean) {
@@ -2572,13 +2574,25 @@ Actual: ${stringify(fullActual)}`);
this.applyEdits(change.fileName, change.textChanges, /*isFormattingEdit*/ false);
}
this.verifyNewContent(options);
this.verifyNewContent(options, action.changes.map(c => c.fileName));
}
private verifyNewContent(options: FourSlashInterface.NewContentOptions) {
private verifyNewContent(options: FourSlashInterface.NewContentOptions, changedFiles: ReadonlyArray<string>) {
const assertedChangedFiles = !options.newFileContent || typeof options.newFileContent === "string"
? [this.activeFile.fileName]
: ts.getOwnKeys(options.newFileContent);
assert.deepEqual(assertedChangedFiles, changedFiles);
if (options.newFileContent !== undefined) {
assert(!options.newRangeContent);
this.verifyCurrentFileContent(options.newFileContent);
if (typeof options.newFileContent === "string") {
this.verifyCurrentFileContent(options.newFileContent);
}
else {
for (const fileName in options.newFileContent) {
this.verifyFileContent(fileName, options.newFileContent[fileName]);
}
}
}
else {
this.verifyRangeIs(options.newRangeContent, /*includeWhitespace*/ true);
@@ -4042,8 +4056,12 @@ namespace FourSlashInterface {
this.state.verifyCompletionListAllowsNewIdentifier(this.negative);
}
public signatureHelpPresent() {
this.state.verifySignatureHelpPresent(!this.negative);
public noSignatureHelp(...markers: string[]): void {
this.state.verifyNoSignatureHelp(markers);
}
public signatureHelp(...options: VerifySignatureHelpOptions[]): void {
this.state.verifySignatureHelp(options);
}
public errorExistsBetweenMarkers(startMarker: string, endMarker: string) {
@@ -4108,7 +4126,7 @@ namespace FourSlashInterface {
super(state);
}
public completionsAt(markerName: Many<string>, completions: ReadonlyArray<ExpectedCompletionEntry>, options?: CompletionsAtOptions) {
public completionsAt(markerName: ArrayOrSingle<string>, completions: ReadonlyArray<ExpectedCompletionEntry>, options?: CompletionsAtOptions) {
this.state.verifyCompletionsAt(markerName, completions, options);
}
@@ -4163,19 +4181,19 @@ namespace FourSlashInterface {
this.state.verifyCurrentFileContent(text);
}
public goToDefinitionIs(endMarkers: Many<string>) {
public goToDefinitionIs(endMarkers: ArrayOrSingle<string>) {
this.state.verifyGoToDefinitionIs(endMarkers);
}
public goToDefinition(startMarkerName: Many<string>, endMarkerName: Many<string>, range?: FourSlash.Range): void;
public goToDefinition(startsAndEnds: [Many<string>, Many<string>][] | { [startMarkerName: string]: Many<string> }): void;
public goToDefinition(arg0: any, endMarkerName?: Many<string>) {
public goToDefinition(startMarkerName: ArrayOrSingle<string>, endMarkerName: ArrayOrSingle<string>, range?: FourSlash.Range): void;
public goToDefinition(startsAndEnds: [ArrayOrSingle<string>, ArrayOrSingle<string>][] | { [startMarkerName: string]: ArrayOrSingle<string> }): void;
public goToDefinition(arg0: any, endMarkerName?: ArrayOrSingle<string>) {
this.state.verifyGoToDefinition(arg0, endMarkerName);
}
public goToType(startMarkerName: Many<string>, endMarkerName: Many<string>): void;
public goToType(startsAndEnds: [Many<string>, Many<string>][] | { [startMarkerName: string]: Many<string> }): void;
public goToType(arg0: any, endMarkerName?: Many<string>) {
public goToType(startMarkerName: ArrayOrSingle<string>, endMarkerName: ArrayOrSingle<string>): void;
public goToType(startsAndEnds: [ArrayOrSingle<string>, ArrayOrSingle<string>][] | { [startMarkerName: string]: ArrayOrSingle<string> }): void;
public goToType(arg0: any, endMarkerName?: ArrayOrSingle<string>) {
this.state.verifyGoToType(arg0, endMarkerName);
}
@@ -4203,7 +4221,7 @@ namespace FourSlashInterface {
this.state.verifyTypeOfSymbolAtLocation(range, symbol, expected);
}
public referenceGroups(starts: Many<string> | Many<FourSlash.Range>, parts: ReferenceGroup[]) {
public referenceGroups(starts: ArrayOrSingle<string> | ArrayOrSingle<FourSlash.Range>, parts: ReferenceGroup[]) {
this.state.verifyReferenceGroups(starts, parts);
}
@@ -4223,46 +4241,6 @@ namespace FourSlashInterface {
this.state.verifyDisplayPartsOfReferencedSymbol(expected);
}
public currentParameterHelpArgumentNameIs(name: string) {
this.state.verifyCurrentParameterHelpName(name);
}
public currentParameterSpanIs(parameter: string) {
this.state.verifyCurrentParameterSpanIs(parameter);
}
public currentParameterHelpArgumentDocCommentIs(docComment: string) {
this.state.verifyCurrentParameterHelpDocComment(docComment);
}
public currentSignatureHelpDocCommentIs(docComment: string) {
this.state.verifyCurrentSignatureHelpDocComment(docComment);
}
public currentSignatureHelpTagsAre(tags: ts.JSDocTagInfo[]) {
this.state.verifyCurrentSignatureHelpTags(tags);
}
public signatureHelpCountIs(expected: number) {
this.state.verifySignatureHelpCount(expected);
}
public signatureHelpCurrentArgumentListIsVariadic(expected: boolean) {
this.state.verifyCurrentSignatureHelpIsVariadic(expected);
}
public signatureHelpArgumentCountIs(expected: number) {
this.state.verifySignatureHelpArgumentCount(expected);
}
public currentSignatureParameterCountIs(expected: number) {
this.state.verifyCurrentSignatureHelpParameterCount(expected);
}
public currentSignatureHelpIs(expected: string) {
this.state.verifyCurrentSignatureHelpIs(expected);
}
public noErrors() {
this.state.verifyNoErrors();
}
@@ -4435,7 +4413,7 @@ namespace FourSlashInterface {
this.state.verifyRenameInfoFailed(message);
}
public renameLocations(startRanges: Many<FourSlash.Range>, options: FourSlash.Range[] | { findInStrings?: boolean, findInComments?: boolean, ranges: FourSlash.Range[] }) {
public renameLocations(startRanges: ArrayOrSingle<FourSlash.Range>, options: FourSlash.Range[] | { findInStrings?: boolean, findInComments?: boolean, ranges: FourSlash.Range[] }) {
this.state.verifyRenameLocations(startRanges, options);
}
@@ -4775,16 +4753,35 @@ namespace FourSlashInterface {
}
export interface VerifyCompletionsOptions {
readonly marker?: Many<string>;
readonly marker?: ArrayOrSingle<string>;
readonly isNewIdentifierLocation?: boolean;
readonly exact?: Many<ExpectedCompletionEntry>;
readonly includes?: Many<ExpectedCompletionEntry>;
readonly excludes?: Many<string | { readonly name: string, readonly source: string }>;
readonly exact?: ArrayOrSingle<ExpectedCompletionEntry>;
readonly includes?: ArrayOrSingle<ExpectedCompletionEntry>;
readonly excludes?: ArrayOrSingle<string | { readonly name: string, readonly source: string }>;
readonly preferences: ts.UserPreferences;
readonly triggerCharacter?: ts.CompletionsTriggerCharacter;
}
export type Many<T> = T | ReadonlyArray<T>;
export interface VerifySignatureHelpOptions {
readonly marker?: ArrayOrSingle<string>;
/** @default 1 */
readonly overloadsCount?: number;
/** @default undefined */
readonly docComment?: string;
readonly text?: string;
readonly parameterName?: string;
readonly parameterSpan?: string;
/** @default undefined */
readonly parameterDocComment?: string;
readonly parameterCount?: number;
readonly argumentCount?: number;
/** @default false */
readonly isVariadic?: boolean;
/** @default ts.emptyArray */
readonly tags?: ReadonlyArray<ts.JSDocTagInfo>;
}
export type ArrayOrSingle<T> = T | ReadonlyArray<T>;
export interface VerifyCompletionListContainsOptions extends ts.UserPreferences {
triggerCharacter?: ts.CompletionsTriggerCharacter;
@@ -4800,7 +4797,7 @@ namespace FourSlashInterface {
export interface NewContentOptions {
// Exactly one of these should be defined.
newFileContent?: string;
newFileContent?: string | { readonly [filename: string]: string };
newRangeContent?: string;
}
@@ -181,6 +181,13 @@ namespace ts {
"/a/b/foo.ts",
"/a/b/foo.tsx",
"/a/b/foo.d.ts",
"/c/d",
"/c/d.ts",
"/c/d.tsx",
"/c/d.d.ts",
"/c/d/index.ts",
"/c/d/index.tsx",
"/c/d/index.d.ts",
"/a/b/foo/index.ts",
"/a/b/foo/index.tsx",
]);
+3 -6
View File
@@ -59,7 +59,6 @@ namespace ts.projectSystem {
// TODO: Apparently compilerOptions is mutated, so have to repeat it here!
et.assertProjectInfoTelemetryEvent({
projectId: Harness.mockHash("/hunter2/foo.csproj"),
compilerOptions: { strict: true },
compileOnSave: true,
// These properties can't be present for an external project, so they are undefined instead of false.
@@ -69,7 +68,7 @@ namespace ts.projectSystem {
exclude: undefined,
configFileName: "other",
projectType: "external",
});
}, "/hunter2/foo.csproj");
// Also test that opening an external project only sends an event once.
@@ -202,7 +201,6 @@ namespace ts.projectSystem {
const et = new TestServerEventManager([jsconfig, file]);
et.service.openClientFile(file.path);
et.assertProjectInfoTelemetryEvent({
projectId: Harness.mockHash("/jsconfig.json"),
fileStats: fileStats({ js: 1 }),
compilerOptions: autoJsCompilerOptions,
typeAcquisition: {
@@ -211,7 +209,7 @@ namespace ts.projectSystem {
exclude: false,
},
configFileName: "jsconfig.json",
});
}, "/jsconfig.json");
});
it("detects whether language service was disabled", () => {
@@ -222,7 +220,6 @@ namespace ts.projectSystem {
et.service.openClientFile(file.path);
et.getEvent<server.ProjectLanguageServiceStateEvent>(server.ProjectLanguageServiceStateEvent);
et.assertProjectInfoTelemetryEvent({
projectId: Harness.mockHash("/jsconfig.json"),
fileStats: fileStats({ js: 1 }),
compilerOptions: autoJsCompilerOptions,
configFileName: "jsconfig.json",
@@ -232,7 +229,7 @@ namespace ts.projectSystem {
exclude: false,
},
languageServiceEnabled: false,
});
}, "/jsconfig.json");
});
describe("open files telemetry", () => {
+29
View File
@@ -270,6 +270,35 @@ namespace ts {
program.emit(program.getSourceFiles()[1], (p, s, bom) => host.writeFile(p, s, bom), /*cancellationToken*/ undefined, /*onlyDts*/ true, opts.transformers);
return fs.readFileSync("/.src/index.d.ts").toString();
}
// https://github.com/Microsoft/TypeScript/issues/24096
testBaseline("transformAddCommentToArrowReturnValue", () => {
return transpileModule(`const foo = () =>
void 0
`, {
transformers: {
before: [addSyntheticComment],
},
compilerOptions: {
target: ScriptTarget.ES5,
newLine: NewLineKind.CarriageReturnLineFeed,
}
}).outputText;
function addSyntheticComment(context: TransformationContext) {
return (sourceFile: SourceFile): SourceFile => {
return visitNode(sourceFile, rootTransform, isSourceFile);
};
function rootTransform<T extends Node>(node: T): VisitResult<T> {
if (isVoidExpression(node)) {
setEmitFlags(node, EmitFlags.NoLeadingComments);
setSyntheticLeadingComments(node, [{ kind: SyntaxKind.SingleLineCommentTrivia, text: "// comment!", pos: -1, end: -1, hasTrailingNewLine: true }]);
return node;
}
return visitEachChild(node, rootTransform, context);
}
}
});
});
}
@@ -214,9 +214,9 @@ namespace ts.projectSystem {
assert.equal(eventData.triggerFile, triggerFile);
}
assertProjectInfoTelemetryEvent(partial: Partial<server.ProjectInfoTelemetryEventData>, configFile?: string): void {
assertProjectInfoTelemetryEvent(partial: Partial<server.ProjectInfoTelemetryEventData>, configFile = "/tsconfig.json"): void {
assert.deepEqual<server.ProjectInfoTelemetryEventData>(this.getEvent<server.ProjectInfoTelemetryEvent>(server.ProjectInfoTelemetryEvent), {
projectId: Harness.mockHash(configFile || "/tsconfig.json"),
projectId: sys.createSHA256Hash(configFile),
fileStats: fileStats({ ts: 1 }),
compilerOptions: {},
extends: false,
@@ -811,6 +811,10 @@ interface Array<T> {}`
return Harness.mockHash(s);
}
createSHA256Hash(s: string): string {
return sys.createSHA256Hash(s);
}
watchFile(fileName: string, cb: FileWatcherCallback, pollingInterval: number) {
if (this.dynamicPriorityWatchFile) {
return this.dynamicPriorityWatchFile(fileName, cb, pollingInterval);
@@ -3093,6 +3093,9 @@
<Item ItemId=";Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[仅当 "--module" 标志为 "commonjs" 或 "esNext" 时,才支持动态导入。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -5277,6 +5280,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Move_to_a_new_file_95049" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Move to a new file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[移动到新的文件]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
@@ -6543,6 +6555,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unreachable_code_95051" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[删除所有无法访问的代码]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6573,6 +6594,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unreachable_code_95050" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[删除无法访问的代码]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -3093,6 +3093,9 @@
<Item ItemId=";Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[只有當 '--module' 旗標是 'commonjs' 或 'esNext' 時,才支援動態匯入。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -5277,6 +5280,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Move_to_a_new_file_95049" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Move to a new file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[移至新行]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
@@ -6543,6 +6555,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unreachable_code_95051" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[移除所有無法連線的程式碼]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6573,6 +6594,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unreachable_code_95050" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[移除無法連線的程式碼]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -3102,6 +3102,9 @@
<Item ItemId=";Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dynamický import se podporuje jenom tehdy, když je příznak --module nastavený na commonjs nebo esNext.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -5289,6 +5292,9 @@
<Item ItemId=";Move_to_a_new_file_95049" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Move to a new file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Přesunout do nového souboru]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -6558,6 +6564,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unreachable_code_95051" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Odebrat veškerý nedosažitelný kód]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6588,6 +6603,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unreachable_code_95050" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Odebrat nedosažitelný kód]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -3102,6 +3102,9 @@
<Item ItemId=";Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[L'importation dynamique est prise en charge uniquement quand l'indicateur '--module' a la valeur 'commonjs' ou 'esNext'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -5289,6 +5292,9 @@
<Item ItemId=";Move_to_a_new_file_95049" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Move to a new file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Déplacer vers un nouveau fichier]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -6558,6 +6564,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unreachable_code_95051" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Supprimer tout le code inaccessible]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6588,6 +6603,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unreachable_code_95050" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Supprimer le code inaccessible]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -3081,15 +3081,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import cannot be used when targeting ECMAScript 2015 modules.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Non è possibile usare l'importazione dinamica quando come destinazione si impostano moduli ECMAScript 2015.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_import_cannot_have_type_arguments_1326" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import cannot have type arguments]]></Val>
@@ -3099,6 +3090,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[L'importazione dinamica è supportata solo quando il valore del flag '--module' è 'commonjs' o 'esNext'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_import_must_have_one_specifier_as_an_argument_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import must have one specifier as an argument.]]></Val>
@@ -5280,6 +5280,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Move_to_a_new_file_95049" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Move to a new file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Passare a un nuovo file]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
@@ -6546,6 +6555,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unreachable_code_95051" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Rimuovere tutto il codice non eseguibile]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6576,6 +6594,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unreachable_code_95050" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Rimuovere il codice non eseguibile]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -3093,6 +3093,9 @@
<Item ItemId=";Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[動的インポートがサポートされるのは、'--module' フラグが 'commonjs' または 'esNext' の場合のみです。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -5280,6 +5283,9 @@
<Item ItemId=";Move_to_a_new_file_95049" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Move to a new file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[新しいファイルへ移動します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -6549,6 +6555,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unreachable_code_95051" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[到達できないコードをすべて削除します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6579,6 +6594,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unreachable_code_95050" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[到達できないコードを削除します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -3093,6 +3093,9 @@
<Item ItemId=";Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[동적 가져오기는 '--module' 플래그가 'commonjs' 또는 'esNext'인 경우에만 지원됩니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -5280,6 +5283,9 @@
<Item ItemId=";Move_to_a_new_file_95049" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Move to a new file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[새 파일로 이동]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -6549,6 +6555,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unreachable_code_95051" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[접근할 수 없는 코드 모두 제거]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6579,6 +6594,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unreachable_code_95050" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[접근할 수 없는 코드 제거]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -3083,6 +3083,9 @@
<Item ItemId=";Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Import dynamiczny jest obsługiwany tylko wtedy, gdy flaga „--module” to „commonjs” lub „esNext”.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -5267,6 +5270,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Move_to_a_new_file_95049" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Move to a new file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Przenieś do nowego pliku]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
@@ -6530,6 +6542,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unreachable_code_95051" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Usuń cały nieosiągalny kod]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6560,6 +6581,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unreachable_code_95050" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Usuń nieosiągalny kod]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -3083,6 +3083,9 @@
<Item ItemId=";Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Só há suporte para importação dinâmica quando o sinalizador '--module' é 'commonjs' ou 'esNext'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -5267,6 +5270,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Move_to_a_new_file_95049" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Move to a new file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Mover para um novo arquivo]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
@@ -6530,6 +6542,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unreachable_code_95051" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Remover todo o código inacessível]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6560,6 +6581,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unreachable_code_95050" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Remover código inacessível]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -3092,6 +3092,9 @@
<Item ItemId=";Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Динамический импорт поддерживается, только если флаг "--module" имеет значение "commonjs" или "esNext".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -5279,6 +5282,9 @@
<Item ItemId=";Move_to_a_new_file_95049" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Move to a new file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Переместить в новый файл]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -6548,6 +6554,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unreachable_code_95051" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Удалить весь недостижимый код]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6578,6 +6593,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unreachable_code_95050" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unreachable code]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Удалить недостижимый код]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
+2 -2
View File
@@ -1429,12 +1429,12 @@ namespace ts.server {
}
this.seenProjects.set(projectKey, true);
if (!this.eventHandler) {
if (!this.eventHandler || !this.host.createSHA256Hash) {
return;
}
const data: ProjectInfoTelemetryEventData = {
projectId: this.host.createHash(projectKey),
projectId: this.host.createSHA256Hash(projectKey),
fileStats: countEachFileTypes(project.getScriptInfos()),
compilerOptions: convertCompilerOptionsForTelemetry(project.getCompilationSettings()),
typeAcquisition: convertTypeAcquisition(project.getTypeAcquisition()),
+1 -1
View File
@@ -964,7 +964,7 @@ namespace ts.server {
return this.missingFilesMap && this.missingFilesMap.has(path);
}
getScriptInfoForNormalizedPath(fileName: NormalizedPath) {
getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined {
const scriptInfo = this.projectService.getScriptInfoForPath(this.toPath(fileName));
if (scriptInfo && !scriptInfo.isAttached(this)) {
return Errors.ThrowProjectDoesNotContainDocument(fileName, this);
+1
View File
@@ -2682,6 +2682,7 @@ namespace ts.server.protocol {
*/
readonly includeCompletionsWithInsertText?: boolean;
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
readonly allowTextChangesInNewFiles?: boolean;
}
export interface CompilerOptions {
+47 -12
View File
@@ -665,9 +665,8 @@ namespace ts.server {
if (simplifiedResult) {
return this.mapDefinitionInfo(definitions, project);
}
else {
return definitions;
}
return definitions.map(Session.mapToOriginalLocation);
}
private getDefinitionAndBoundSpan(args: protocol.FileLocationRequestArgs, simplifiedResult: boolean): protocol.DefinitionInfoAndBoundSpan | DefinitionInfoAndBoundSpan {
@@ -691,13 +690,37 @@ namespace ts.server {
};
}
return definitionAndBoundSpan;
return {
...definitionAndBoundSpan,
definitions: definitionAndBoundSpan.definitions.map(Session.mapToOriginalLocation)
};
}
private mapDefinitionInfo(definitions: ReadonlyArray<DefinitionInfo>, project: Project): ReadonlyArray<protocol.FileSpan> {
return definitions.map(def => this.toFileSpan(def.fileName, def.textSpan, project));
}
/*
* When we map a .d.ts location to .ts, Visual Studio gets confused because there's no associated Roslyn Document in
* the same project which corresponds to the file. VS Code has no problem with this, and luckily we have two protocols.
* This retains the existing behavior for the "simplified" (VS Code) protocol but stores the .d.ts location in a
* set of additional fields, and does the reverse for VS (store the .d.ts location where
* it used to be and stores the .ts location in the additional fields).
*/
private static mapToOriginalLocation<T extends DocumentSpan>(def: T): T {
if (def.originalFileName) {
Debug.assert(def.originalTextSpan !== undefined, "originalTextSpan should be present if originalFileName is");
return {
...<any>def,
fileName: def.originalFileName,
textSpan: def.originalTextSpan,
targetFileName: def.fileName,
targetTextSpan: def.textSpan
};
}
return def;
}
private toFileSpan(fileName: string, textSpan: TextSpan, project: Project): protocol.FileSpan {
const ls = project.getLanguageService();
const start = ls.toLineColumnOffset(fileName, textSpan.start);
@@ -732,9 +755,8 @@ namespace ts.server {
if (simplifiedResult) {
return implementations.map(({ fileName, textSpan }) => this.toFileSpan(fileName, textSpan, project));
}
else {
return implementations;
}
return implementations.map(Session.mapToOriginalLocation);
}
private getOccurrences(args: protocol.FileLocationRequestArgs): ReadonlyArray<protocol.OccurrencesResponseItem> {
@@ -1744,11 +1766,17 @@ namespace ts.server {
return textChanges.map(change => this.mapTextChangesToCodeEditsUsingScriptinfo(change, project.getScriptInfoForNormalizedPath(toNormalizedPath(change.fileName))));
}
private mapTextChangesToCodeEditsUsingScriptinfo(textChanges: FileTextChanges, scriptInfo: ScriptInfo): protocol.FileCodeEdits {
return {
fileName: textChanges.fileName,
textChanges: textChanges.textChanges.map(textChange => this.convertTextChangeToCodeEdit(textChange, scriptInfo))
};
private mapTextChangesToCodeEditsUsingScriptinfo(textChanges: FileTextChanges, scriptInfo: ScriptInfo | undefined): protocol.FileCodeEdits {
Debug.assert(!!textChanges.isNewFile === !scriptInfo);
if (scriptInfo) {
return {
fileName: textChanges.fileName,
textChanges: textChanges.textChanges.map(textChange => this.convertTextChangeToCodeEdit(textChange, scriptInfo))
};
}
else {
return this.convertNewFileTextChangeToCodeEdit(textChanges);
}
}
private convertTextChangeToCodeEdit(change: TextChange, scriptInfo: ScriptInfo): protocol.CodeEdit {
@@ -1759,6 +1787,13 @@ namespace ts.server {
};
}
private convertNewFileTextChangeToCodeEdit(textChanges: FileTextChanges): protocol.FileCodeEdits {
Debug.assert(textChanges.textChanges.length === 1);
const change = first(textChanges.textChanges);
Debug.assert(change.span.start === 0 && change.span.length === 0);
return { fileName: textChanges.fileName, textChanges: [{ start: { line: 0, offset: 0 }, end: { line: 0, offset: 0 }, newText: change.newText }] };
}
private getBraceMatching(args: protocol.FileLocationRequestArgs, simplifiedResult: boolean): protocol.TextSpan[] | TextSpan[] {
const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);
+1 -1
View File
@@ -233,7 +233,7 @@ namespace ts.codefix {
Debug.assertNever(prop);
}
});
return statements && [statements, true];
return statements && [statements, false];
}
function convertNamedExport(
+19 -8
View File
@@ -32,16 +32,16 @@ namespace ts.codefix {
const token = getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
let declaration!: Declaration;
const changes = textChanges.ChangeTracker.with(context, changes => { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken); });
const changes = textChanges.ChangeTracker.with(context, changes => { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeenseen*/ returnTrue); });
return changes.length === 0 ? undefined
: [createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), getNameOfDeclaration(declaration).getText(sourceFile)], fixId, Diagnostics.Infer_all_types_from_usage)];
},
fixIds: [fixId],
getAllCodeActions(context) {
const { sourceFile, program, cancellationToken } = context;
const seenFunctions = createMap<true>();
const markSeen = nodeSeenTracker();
return codeFixAll(context, errorCodes, (changes, err) => {
doChange(changes, sourceFile, getTokenAtPosition(err.file!, err.start!, /*includeJsDocComment*/ false), err.code, program, cancellationToken, seenFunctions);
doChange(changes, sourceFile, getTokenAtPosition(err.file!, err.start!, /*includeJsDocComment*/ false), err.code, program, cancellationToken, markSeen);
});
},
});
@@ -57,7 +57,7 @@ namespace ts.codefix {
}
}
function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, token: Node, errorCode: number, program: Program, cancellationToken: CancellationToken, seenFunctions?: Map<true>): Declaration | undefined {
function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, token: Node, errorCode: number, program: Program, cancellationToken: CancellationToken, markSeen: NodeSeenTracker): Declaration | undefined {
if (!isParameterPropertyModifier(token.kind) && token.kind !== SyntaxKind.Identifier && token.kind !== SyntaxKind.DotDotDotToken) {
return undefined;
}
@@ -67,7 +67,7 @@ namespace ts.codefix {
// Variable and Property declarations
case Diagnostics.Member_0_implicitly_has_an_1_type.code:
case Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code:
if (isVariableDeclaration(parent) || isPropertyDeclaration(parent) || isPropertySignature(parent)) { // handle bad location
if ((isVariableDeclaration(parent) && markSeen(parent)) || isPropertyDeclaration(parent) || isPropertySignature(parent)) { // handle bad location
annotateVariableDeclaration(changes, sourceFile, parent, program, cancellationToken);
return parent;
}
@@ -75,10 +75,11 @@ namespace ts.codefix {
case Diagnostics.Variable_0_implicitly_has_an_1_type.code: {
const symbol = program.getTypeChecker().getSymbolAtLocation(token);
if (symbol && symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration)) {
if (symbol && symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) {
annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, cancellationToken);
return symbol.valueDeclaration;
}
return undefined;
}
}
@@ -96,7 +97,7 @@ namespace ts.codefix {
}
// falls through
case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code:
if (!seenFunctions || addToSeen(seenFunctions, getNodeId(containingFunction))) {
if (markSeen(containingFunction)) {
const param = cast(parent, isParameter);
annotateParameters(changes, param, containingFunction, sourceFile, program, cancellationToken);
return param;
@@ -318,6 +319,16 @@ namespace ts.codefix {
case SyntaxKind.ElementAccessExpression:
inferTypeFromPropertyElementExpressionContext(<ElementAccessExpression>node.parent, node, checker, usageContext);
break;
case SyntaxKind.VariableDeclaration: {
const { name, initializer } = node.parent as VariableDeclaration;
if (node === name) {
if (initializer) { // This can happen for `let x = null;` which still has an implicit-any error.
addCandidateType(usageContext, checker.getTypeAtLocation(initializer));
}
break;
}
}
// falls through
default:
return inferTypeFromContextualType(node, checker, usageContext);
}
@@ -511,7 +522,7 @@ namespace ts.codefix {
return checker.getStringType();
}
else if (usageContext.candidateTypes) {
return checker.getWidenedType(checker.getUnionType(map(usageContext.candidateTypes, t => checker.getBaseTypeOfLiteralType(t)), UnionReduction.Subtype));
return checker.getWidenedType(checker.getUnionType(usageContext.candidateTypes.map(t => checker.getBaseTypeOfLiteralType(t)), UnionReduction.Subtype));
}
else if (usageContext.properties && hasCallContext(usageContext.properties.get("then" as __String))) {
const paramType = getParameterTypeFromCallContexts(0, usageContext.properties.get("then" as __String).callContexts, /*isRestParameter*/ false, checker);
+37 -6
View File
@@ -32,12 +32,43 @@ namespace ts.JsTyping {
/* @internal */
export const nodeCoreModuleList: ReadonlyArray<string> = [
"buffer", "querystring", "events", "http", "cluster",
"zlib", "os", "https", "punycode", "repl", "readline",
"vm", "child_process", "url", "dns", "net",
"dgram", "fs", "path", "string_decoder", "tls",
"crypto", "stream", "util", "assert", "tty", "domain",
"constants", "process", "v8", "timers", "console"];
"assert",
"async_hooks",
"buffer",
"child_process",
"cluster",
"console",
"constants",
"crypto",
"dgram",
"dns",
"domain",
"events",
"fs",
"http",
"https",
"http2",
"inspector",
"net",
"os",
"path",
"perf_hooks",
"process",
"punycode",
"querystring",
"readline",
"repl",
"stream",
"string_decoder",
"timers",
"tls",
"tty",
"url",
"util",
"v8",
"vm",
"zlib"
];
/* @internal */
export const nodeCoreModules = arrayToSet(nodeCoreModuleList);
@@ -17,6 +17,7 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor {
fieldName: AcceptedNameType;
accessorName: AcceptedNameType;
originalName: AcceptedNameType;
renameAccessor: boolean;
}
function getAvailableActions(context: RefactorContext): ApplicableRefactorInfo[] | undefined {
@@ -43,7 +44,7 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor {
const isJS = isSourceFileJavaScript(file);
const changeTracker = textChanges.ChangeTracker.fromContext(context);
const { isStatic, isReadonly, fieldName, accessorName, originalName, type, container, declaration } = fieldInfo;
const { isStatic, isReadonly, fieldName, accessorName, originalName, type, container, declaration, renameAccessor } = fieldInfo;
suppressLeadingAndTrailingTrivia(fieldName);
suppressLeadingAndTrailingTrivia(declaration);
@@ -80,8 +81,10 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor {
const edits = changeTracker.getChanges();
const renameFilename = file.fileName;
const renameLocationOffset = isIdentifier(fieldName) ? 0 : -1;
const renameLocation = renameLocationOffset + getRenameLocation(edits, renameFilename, fieldName.text, /*preferLastLocation*/ isParameter(declaration));
const nameNeedRename = renameAccessor ? accessorName : fieldName;
const renameLocationOffset = isIdentifier(nameNeedRename) ? 0 : -1;
const renameLocation = renameLocationOffset + getRenameLocation(edits, renameFilename, nameNeedRename.text, /*preferLastLocation*/ isParameter(declaration));
return { renameFilename, renameLocation, edits };
}
@@ -110,6 +113,10 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor {
return modifiers && createNodeArray(modifiers);
}
function startsWithUnderscore(name: string): boolean {
return name.charCodeAt(0) === CharacterCodes._;
}
function getConvertibleFieldAtPosition(file: SourceFile, startPosition: number): Info | undefined {
const node = getTokenAtPosition(file, startPosition, /*includeJsDocComment*/ false);
const declaration = findAncestor(node.parent, isAcceptedDeclaration);
@@ -117,8 +124,10 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor {
const meaning = ModifierFlags.AccessibilityModifier | ModifierFlags.Static | ModifierFlags.Readonly;
if (!declaration || !isConvertableName(declaration.name) || (getModifierFlags(declaration) | meaning) !== meaning) return undefined;
const fieldName = createPropertyName(getUniqueName(`_${declaration.name.text}`, file.text), declaration.name);
const accessorName = createPropertyName(declaration.name.text, declaration.name);
const name = declaration.name.text;
const startWithUnderscore = startsWithUnderscore(name);
const fieldName = createPropertyName(startWithUnderscore ? name : getUniqueName(`_${name}`, file.text), declaration.name);
const accessorName = createPropertyName(startWithUnderscore ? getUniqueName(name.substring(1), file.text) : name, declaration.name);
return {
isStatic: hasStaticModifier(declaration),
isReadonly: hasReadonlyModifier(declaration),
@@ -128,6 +137,7 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor {
declaration,
fieldName,
accessorName,
renameAccessor: startWithUnderscore
};
}
@@ -204,7 +214,9 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor {
function insertAccessor(changeTracker: textChanges.ChangeTracker, file: SourceFile, accessor: AccessorDeclaration, declaration: AcceptedDeclaration, container: ContainerDeclaration) {
isParameterPropertyDeclaration(declaration)
? changeTracker.insertNodeAtClassStart(file, <ClassLikeDeclaration>container, accessor)
: changeTracker.insertNodeAfter(file, declaration, accessor);
: isPropertyAssignment(declaration)
? changeTracker.insertNodeAfterComma(file, declaration, accessor)
: changeTracker.insertNodeAfter(file, declaration, accessor);
}
function updateReadonlyPropertyInitializerStatementConstructor(changeTracker: textChanges.ChangeTracker, context: RefactorContext, constructor: ConstructorDeclaration, fieldName: AcceptedNameType, originalName: AcceptedNameType) {
+12 -8
View File
@@ -1600,10 +1600,10 @@ namespace ts {
function makeGetTargetOfMappedPosition<TIn>(
extract: (original: TIn) => sourcemaps.SourceMappableLocation,
create: (result: sourcemaps.SourceMappableLocation, original: TIn) => TIn
create: (result: sourcemaps.SourceMappableLocation, unmapped: TIn, original: TIn) => TIn
) {
return getTargetOfMappedPosition;
function getTargetOfMappedPosition(input: TIn): TIn {
function getTargetOfMappedPosition(input: TIn, original = input): TIn {
const info = extract(input);
if (endsWith(info.fileName, Extension.Dts)) {
let file: SourceFileLike = program.getSourceFile(info.fileName);
@@ -1617,7 +1617,7 @@ namespace ts {
const mapper = getSourceMapper(info.fileName, file);
const newLoc = mapper.getOriginalPosition(info);
if (newLoc === info) return input;
return getTargetOfMappedPosition(create(newLoc, input));
return getTargetOfMappedPosition(create(newLoc, input, original), original);
}
return input;
}
@@ -1625,7 +1625,7 @@ namespace ts {
const getTargetOfMappedDeclarationInfo = makeGetTargetOfMappedPosition(
(info: DefinitionInfo) => ({ fileName: info.fileName, position: info.textSpan.start }),
(newLoc, info) => ({
(newLoc, info, original) => ({
containerKind: info.containerKind,
containerName: info.containerName,
fileName: newLoc.fileName,
@@ -1634,12 +1634,14 @@ namespace ts {
textSpan: {
start: newLoc.position,
length: info.textSpan.length
}
},
originalFileName: original.fileName,
originalTextSpan: original.textSpan
})
);
function getTargetOfMappedDeclarationFiles(infos: ReadonlyArray<DefinitionInfo>): DefinitionInfo[] {
return map(infos, getTargetOfMappedDeclarationInfo);
return map(infos, d => getTargetOfMappedDeclarationInfo(d));
}
/// Goto definition
@@ -1678,12 +1680,14 @@ namespace ts {
textSpan: {
start: newLoc.position,
length: info.textSpan.length
}
},
originalFileName: info.fileName,
originalTextSpan: info.textSpan
})
);
function getTargetOfMappedImplementationLocations(infos: ReadonlyArray<ImplementationLocation>): ImplementationLocation[] {
return map(infos, getTargetOfMappedImplementationLocation);
return map(infos, d => getTargetOfMappedImplementationLocation(d));
}
function getImplementationAtPosition(fileName: string, position: number): ImplementationLocation[] {
+26 -1
View File
@@ -5,7 +5,9 @@ namespace ts {
const checker = program.getDiagnosticsProducingTypeChecker();
const diags: Diagnostic[] = [];
if (sourceFile.commonJsModuleIndicator && (programContainsEs6Modules(program) || compilerOptionsIndicateEs6Modules(program.getCompilerOptions()))) {
if (sourceFile.commonJsModuleIndicator &&
(programContainsEs6Modules(program) || compilerOptionsIndicateEs6Modules(program.getCompilerOptions())) &&
containsTopLevelCommonjs(sourceFile)) {
diags.push(createDiagnosticForNode(getErrorNodeFromCommonJsIndicator(sourceFile.commonJsModuleIndicator), Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module));
}
@@ -61,6 +63,29 @@ namespace ts {
return diags.concat(checker.getSuggestionDiagnostics(sourceFile));
}
// convertToEs6Module only works on top-level, so don't trigger it if commonjs code only appears in nested scopes.
function containsTopLevelCommonjs(sourceFile: SourceFile): boolean {
return sourceFile.statements.some(statement => {
switch (statement.kind) {
case SyntaxKind.VariableStatement:
return (statement as VariableStatement).declarationList.declarations.some(decl =>
isRequireCall(propertyAccessLeftHandSide(decl.initializer), /*checkArgumentIsStringLiteralLike*/ true));
case SyntaxKind.ExpressionStatement: {
const { expression } = statement as ExpressionStatement;
if (!isBinaryExpression(expression)) return isRequireCall(expression, /*checkArgumentIsStringLiteralLike*/ true);
const kind = getSpecialPropertyAssignmentKind(expression);
return kind === SpecialPropertyAssignmentKind.ExportsProperty || kind === SpecialPropertyAssignmentKind.ModuleExports;
}
default:
return false;
}
});
}
function propertyAccessLeftHandSide(node: Expression): Expression {
return isPropertyAccessExpression(node) ? propertyAccessLeftHandSide(node.expression) : node;
}
function importNameForConvertToDefaultImport(node: AnyValidImportOrReExport): Identifier | undefined {
switch (node.kind) {
case SyntaxKind.ImportDeclaration:
+15 -5
View File
@@ -320,10 +320,14 @@ namespace ts.textChanges {
return this.replaceRangeWithNodes(sourceFile, getAdjustedRange(sourceFile, startNode, endNode, options), newNodes, options);
}
private nextCommaToken (sourceFile: SourceFile, node: Node): Node | undefined {
const next = findNextToken(node, node.parent, sourceFile);
return next && next.kind === SyntaxKind.CommaToken ? next : undefined;
}
public replacePropertyAssignment(sourceFile: SourceFile, oldNode: PropertyAssignment, newNode: PropertyAssignment) {
return this.replaceNode(sourceFile, oldNode, newNode, {
suffix: "," + this.newLineCharacter
});
const suffix = this.nextCommaToken(sourceFile, oldNode) ? "" : ("," + this.newLineCharacter);
return this.replaceNode(sourceFile, oldNode, newNode, { suffix });
}
private insertNodeAt(sourceFile: SourceFile, pos: number, newNode: Node, options: InsertNodeOptions = {}) {
@@ -360,7 +364,8 @@ namespace ts.textChanges {
// Otherwise, add an extra new line immediately before the error span.
const insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);
const token = getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position, /*includeJsDocComment*/ false);
const text = `${insertAtLineStart ? "" : this.newLineCharacter}${sourceFile.text.slice(lineStartPosition, startPosition)}//${commentText}${this.newLineCharacter}`;
const indent = sourceFile.text.slice(lineStartPosition, startPosition);
const text = `${insertAtLineStart ? "" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${indent}`;
this.insertText(sourceFile, token.getStart(sourceFile), text);
}
@@ -464,6 +469,11 @@ namespace ts.textChanges {
}
}
public insertNodeAfterComma(sourceFile: SourceFile, after: Node, newNode: Node): void {
const endPosition = this.insertNodeAfterWorker(sourceFile, this.nextCommaToken(sourceFile, after) || after, newNode);
this.insertNodeAt(sourceFile, endPosition, newNode, this.getInsertNodeAfterOptions(sourceFile, after));
}
public insertNodeAfter(sourceFile: SourceFile, after: Node, newNode: Node): void {
const endPosition = this.insertNodeAfterWorker(sourceFile, after, newNode);
this.insertNodeAt(sourceFile, endPosition, newNode, this.getInsertNodeAfterOptions(sourceFile, after));
@@ -719,7 +729,7 @@ namespace ts.textChanges {
export function newFileChanges(oldFile: SourceFile, fileName: string, statements: ReadonlyArray<Statement>, newLineCharacter: string): FileTextChanges {
const text = statements.map(s => getNonformattedText(s, oldFile, newLineCharacter).text).join(newLineCharacter);
return { fileName, textChanges: [createTextChange(createTextSpan(0, 0), text)] };
return { fileName, textChanges: [createTextChange(createTextSpan(0, 0), text)], isNewFile: true };
}
function computeNewText(change: Change, sourceFile: SourceFile, newLineCharacter: string, formatContext: formatting.FormatContext, validate: ValidateNonFormattedText): string {
+9 -3
View File
@@ -439,6 +439,7 @@ namespace ts {
export interface FileTextChanges {
fileName: string;
textChanges: TextChange[];
isNewFile?: boolean;
}
export interface CodeAction {
@@ -542,6 +543,13 @@ namespace ts {
export interface DocumentSpan {
textSpan: TextSpan;
fileName: string;
/**
* If the span represents a location that was remapped (e.g. via a .d.ts.map file),
* then the original filename and span will be specified here
*/
originalTextSpan?: TextSpan;
originalFileName?: string;
}
export interface RenameLocation extends DocumentSpan {
@@ -654,9 +662,7 @@ namespace ts {
indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean;
}
export interface DefinitionInfo {
fileName: string;
textSpan: TextSpan;
export interface DefinitionInfo extends DocumentSpan {
kind: ScriptElementKind;
name: string;
containerKind: ScriptElementKind;
+2 -1
View File
@@ -1188,7 +1188,8 @@ namespace ts {
}
/** Returns `true` the first time it encounters a node and `false` afterwards. */
export function nodeSeenTracker<T extends Node>(): (node: T) => boolean {
export type NodeSeenTracker<T = Node> = (node: T) => boolean;
export function nodeSeenTracker<T extends Node>(): NodeSeenTracker<T> {
const seen: true[] = [];
return node => {
const id = getNodeId(node);
+16 -5
View File
@@ -2248,6 +2248,7 @@ declare namespace ts {
objectType: Type;
indexType: Type;
constraint?: Type;
simplified?: Type;
}
type TypeVariable = TypeParameter | IndexedAccessType;
interface IndexType extends InstantiableType {
@@ -2980,10 +2981,11 @@ declare namespace ts {
readDirectory(path: string, extensions?: ReadonlyArray<string>, exclude?: ReadonlyArray<string>, include?: ReadonlyArray<string>, depth?: number): string[];
getModifiedTime?(path: string): Date;
/**
* This should be cryptographically secure.
* A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm)
*/
createHash?(data: string): string;
/** This must be cryptographically secure. Only implement this method using `crypto.createHash("sha256")`. */
createSHA256Hash?(data: string): string;
getMemoryUsage?(): number;
exit(exitCode?: number): void;
realpath?(path: string): string;
@@ -3858,6 +3860,7 @@ declare namespace ts {
function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined;
function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[]): T;
function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
function moveSyntheticComments<T extends Node>(node: T, original: Node): T;
/**
* Gets the constant value to emit for an expression.
*/
@@ -4615,6 +4618,7 @@ declare namespace ts {
interface FileTextChanges {
fileName: string;
textChanges: TextChange[];
isNewFile?: boolean;
}
interface CodeAction {
/** Description of the code action to display in the UI of the editor */
@@ -4701,6 +4705,12 @@ declare namespace ts {
interface DocumentSpan {
textSpan: TextSpan;
fileName: string;
/**
* If the span represents a location that was remapped (e.g. via a .d.ts.map file),
* then the original filename and span will be specified here
*/
originalTextSpan?: TextSpan;
originalFileName?: string;
}
interface RenameLocation extends DocumentSpan {
}
@@ -4798,9 +4808,7 @@ declare namespace ts {
insertSpaceBeforeTypeAnnotation?: boolean;
indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean;
}
interface DefinitionInfo {
fileName: string;
textSpan: TextSpan;
interface DefinitionInfo extends DocumentSpan {
kind: ScriptElementKind;
name: string;
containerKind: ScriptElementKind;
@@ -7573,6 +7581,7 @@ declare namespace ts.server.protocol {
*/
readonly includeCompletionsWithInsertText?: boolean;
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
readonly allowTextChangesInNewFiles?: boolean;
}
interface CompilerOptions {
allowJs?: boolean;
@@ -7890,7 +7899,7 @@ declare namespace ts.server {
private detachScriptInfoFromProject;
private addMissingFileWatcher;
private isWatchedMissingFile;
getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo;
getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined;
getScriptInfo(uncheckedFileName: string): ScriptInfo;
filesToString(writeProjectFileNames: boolean): string;
setCompilerOptions(compilerOptions: CompilerOptions): void;
@@ -8410,6 +8419,7 @@ declare namespace ts.server {
private getDefinition;
private getDefinitionAndBoundSpan;
private mapDefinitionInfo;
private static mapToOriginalLocation;
private toFileSpan;
private getTypeDefinition;
private getImplementation;
@@ -8483,6 +8493,7 @@ declare namespace ts.server {
private mapTextChangesToCodeEdits;
private mapTextChangesToCodeEditsUsingScriptinfo;
private convertTextChangeToCodeEdit;
private convertNewFileTextChangeToCodeEdit;
private getBraceMatching;
private getDiagnosticsForProject;
getCanonicalFileName(fileName: string): string;
+12 -4
View File
@@ -2248,6 +2248,7 @@ declare namespace ts {
objectType: Type;
indexType: Type;
constraint?: Type;
simplified?: Type;
}
type TypeVariable = TypeParameter | IndexedAccessType;
interface IndexType extends InstantiableType {
@@ -2980,10 +2981,11 @@ declare namespace ts {
readDirectory(path: string, extensions?: ReadonlyArray<string>, exclude?: ReadonlyArray<string>, include?: ReadonlyArray<string>, depth?: number): string[];
getModifiedTime?(path: string): Date;
/**
* This should be cryptographically secure.
* A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm)
*/
createHash?(data: string): string;
/** This must be cryptographically secure. Only implement this method using `crypto.createHash("sha256")`. */
createSHA256Hash?(data: string): string;
getMemoryUsage?(): number;
exit(exitCode?: number): void;
realpath?(path: string): string;
@@ -3858,6 +3860,7 @@ declare namespace ts {
function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined;
function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[]): T;
function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
function moveSyntheticComments<T extends Node>(node: T, original: Node): T;
/**
* Gets the constant value to emit for an expression.
*/
@@ -4615,6 +4618,7 @@ declare namespace ts {
interface FileTextChanges {
fileName: string;
textChanges: TextChange[];
isNewFile?: boolean;
}
interface CodeAction {
/** Description of the code action to display in the UI of the editor */
@@ -4701,6 +4705,12 @@ declare namespace ts {
interface DocumentSpan {
textSpan: TextSpan;
fileName: string;
/**
* If the span represents a location that was remapped (e.g. via a .d.ts.map file),
* then the original filename and span will be specified here
*/
originalTextSpan?: TextSpan;
originalFileName?: string;
}
interface RenameLocation extends DocumentSpan {
}
@@ -4798,9 +4808,7 @@ declare namespace ts {
insertSpaceBeforeTypeAnnotation?: boolean;
indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean;
}
interface DefinitionInfo {
fileName: string;
textSpan: TextSpan;
interface DefinitionInfo extends DocumentSpan {
kind: ScriptElementKind;
name: string;
containerKind: ScriptElementKind;
@@ -10,18 +10,18 @@
* @param {Opts} opts
*/
function foo(opts) {
>foo : (opts: { x: string; y?: string; z?: string; w?: string; }) => void
>opts : { x: string; y?: string; z?: string; w?: string; }
>foo : (opts: Opts) => void
>opts : Opts
opts.x;
>opts.x : string
>opts : { x: string; y?: string; z?: string; w?: string; }
>opts : Opts
>x : string
}
foo({x: 'abc'});
>foo({x: 'abc'}) : void
>foo : (opts: { x: string; y?: string; z?: string; w?: string; }) => void
>foo : (opts: Opts) => void
>{x: 'abc'} : { x: string; }
>x : string
>'abc' : "abc"
@@ -34,18 +34,18 @@ foo({x: 'abc'});
* @param {AnotherOpts} opts
*/
function foo1(opts) {
>foo1 : (opts: { anotherX: string; anotherY?: string; }) => void
>opts : { anotherX: string; anotherY?: string; }
>foo1 : (opts: AnotherOpts) => void
>opts : AnotherOpts
opts.anotherX;
>opts.anotherX : string
>opts : { anotherX: string; anotherY?: string; }
>opts : AnotherOpts
>anotherX : string
}
foo1({anotherX: "world"});
>foo1({anotherX: "world"}) : void
>foo1 : (opts: { anotherX: string; anotherY?: string; }) => void
>foo1 : (opts: AnotherOpts) => void
>{anotherX: "world"} : { anotherX: string; }
>anotherX : string
>"world" : "world"
@@ -60,17 +60,17 @@ foo1({anotherX: "world"});
* @param {Opts1} opts
*/
function foo2(opts) {
>foo2 : (opts: { x: string; y?: string; z?: string; w?: string; }) => void
>opts : { x: string; y?: string; z?: string; w?: string; }
>foo2 : (opts: Opts1) => void
>opts : Opts1
opts.x;
>opts.x : string
>opts : { x: string; y?: string; z?: string; w?: string; }
>opts : Opts1
>x : string
}
foo2({x: 'abc'});
>foo2({x: 'abc'}) : void
>foo2 : (opts: { x: string; y?: string; z?: string; w?: string; }) => void
>foo2 : (opts: Opts1) => void
>{x: 'abc'} : { x: string; }
>x : string
>'abc' : "abc"
@@ -0,0 +1,6 @@
//// [circularConstrainedMappedTypeNoCrash.ts]
type Loop<T, U extends Loop<T, U>> = {
[P in keyof T]: U[P] extends boolean ? number : string;
};
//// [circularConstrainedMappedTypeNoCrash.js]
@@ -0,0 +1,16 @@
=== tests/cases/compiler/circularConstrainedMappedTypeNoCrash.ts ===
type Loop<T, U extends Loop<T, U>> = {
>Loop : Symbol(Loop, Decl(circularConstrainedMappedTypeNoCrash.ts, 0, 0))
>T : Symbol(T, Decl(circularConstrainedMappedTypeNoCrash.ts, 0, 10))
>U : Symbol(U, Decl(circularConstrainedMappedTypeNoCrash.ts, 0, 12))
>Loop : Symbol(Loop, Decl(circularConstrainedMappedTypeNoCrash.ts, 0, 0))
>T : Symbol(T, Decl(circularConstrainedMappedTypeNoCrash.ts, 0, 10))
>U : Symbol(U, Decl(circularConstrainedMappedTypeNoCrash.ts, 0, 12))
[P in keyof T]: U[P] extends boolean ? number : string;
>P : Symbol(P, Decl(circularConstrainedMappedTypeNoCrash.ts, 1, 5))
>T : Symbol(T, Decl(circularConstrainedMappedTypeNoCrash.ts, 0, 10))
>U : Symbol(U, Decl(circularConstrainedMappedTypeNoCrash.ts, 0, 12))
>P : Symbol(P, Decl(circularConstrainedMappedTypeNoCrash.ts, 1, 5))
};
@@ -0,0 +1,16 @@
=== tests/cases/compiler/circularConstrainedMappedTypeNoCrash.ts ===
type Loop<T, U extends Loop<T, U>> = {
>Loop : Loop<T, U>
>T : T
>U : U
>Loop : Loop<T, U>
>T : T
>U : U
[P in keyof T]: U[P] extends boolean ? number : string;
>P : P
>T : T
>U : U
>P : P
};
@@ -40,6 +40,7 @@
"File '/node_modules/a/node_modules/foo.d.ts' does not exist.",
"'package.json' does not have a 'typings' field.",
"'package.json' does not have a 'types' field.",
"'package.json' does not have a 'main' field.",
"File '/node_modules/a/node_modules/foo/index.ts' does not exist.",
"File '/node_modules/a/node_modules/foo/index.tsx' does not exist.",
"File '/node_modules/a/node_modules/foo/index.d.ts' exist - use it as a name resolution result.",
@@ -40,6 +40,7 @@
"File '/node_modules/a/node_modules/@foo/bar.d.ts' does not exist.",
"'package.json' does not have a 'typings' field.",
"'package.json' does not have a 'types' field.",
"'package.json' does not have a 'main' field.",
"File '/node_modules/a/node_modules/@foo/bar/index.ts' does not exist.",
"File '/node_modules/a/node_modules/@foo/bar/index.tsx' does not exist.",
"File '/node_modules/a/node_modules/@foo/bar/index.d.ts' exist - use it as a name resolution result.",
@@ -0,0 +1,18 @@
=== tests/cases/conformance/salsa/a.js ===
// #24131
const a = {};
>a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0))
a.d = function() {};
>a.d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
>a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0))
>d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
=== tests/cases/conformance/salsa/b.js ===
a.d.prototype = {};
>a.d.prototype : Symbol(d.prototype, Decl(b.js, 0, 0))
>a.d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
>a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0))
>d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
>prototype : Symbol(d.prototype, Decl(b.js, 0, 0))
@@ -0,0 +1,23 @@
=== tests/cases/conformance/salsa/a.js ===
// #24131
const a = {};
>a : { [x: string]: any; d: typeof d; }
>{} : { [x: string]: any; d: typeof d; }
a.d = function() {};
>a.d = function() {} : typeof d
>a.d : typeof d
>a : { [x: string]: any; d: typeof d; }
>d : typeof d
>function() {} : typeof d
=== tests/cases/conformance/salsa/b.js ===
a.d.prototype = {};
>a.d.prototype = {} : { [x: string]: any; }
>a.d.prototype : { [x: string]: any; }
>a.d : typeof d
>a : { [x: string]: any; d: typeof d; }
>d : typeof d
>prototype : { [x: string]: any; }
>{} : { [x: string]: any; }
+2 -134
View File
@@ -41,140 +41,8 @@
"kind": "space"
},
{
"text": "{",
"kind": "punctuation"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": " ",
"kind": "space"
},
{
"text": "x",
"kind": "propertyName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
},
{
"text": ";",
"kind": "punctuation"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": " ",
"kind": "space"
},
{
"text": "y",
"kind": "propertyName"
},
{
"text": "?",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
},
{
"text": ";",
"kind": "punctuation"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": " ",
"kind": "space"
},
{
"text": "z",
"kind": "propertyName"
},
{
"text": "?",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
},
{
"text": ";",
"kind": "punctuation"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": " ",
"kind": "space"
},
{
"text": "w",
"kind": "propertyName"
},
{
"text": "?",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
},
{
"text": ";",
"kind": "punctuation"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "}",
"kind": "punctuation"
"text": "Opts",
"kind": "aliasName"
}
],
"documentation": [],
@@ -79,7 +79,7 @@ z.u = false
*/
/** @type {A} */
const options = { value: null };
>options : { value: any; }
>options : A
>{ value: null } : { value: null; }
>value : null
>null : null
@@ -14,7 +14,7 @@ const t = 0;
/** @type Person */
const person = { name: "" };
>person : { name: string; }
>person : Person
>{ name: "" } : { name: string; }
>name : string
>"" : ""
@@ -6,7 +6,7 @@
/** @type {Foo} */
const x = { foo: 0 };
>x : { foo: any; }
>x : Foo
>{ foo: 0 } : { foo: number; }
>foo : number
>0 : 0
@@ -0,0 +1,25 @@
//// [jsxNestedWithinTernaryParsesCorrectly.tsx]
const emptyMessage = null as any;
const a = (
<div>
{0 ? (
emptyMessage // must be identifier?
) : (
// must be exactly two expression holes
<span>
{0}{0}
</span>
)}
</div>
);
//// [jsxNestedWithinTernaryParsesCorrectly.jsx]
var emptyMessage = null;
var a = (<div>
{0 ? (emptyMessage // must be identifier?
) : (
// must be exactly two expression holes
<span>
{0}{0}
</span>)}
</div>);
@@ -0,0 +1,20 @@
=== tests/cases/compiler/jsxNestedWithinTernaryParsesCorrectly.tsx ===
const emptyMessage = null as any;
>emptyMessage : Symbol(emptyMessage, Decl(jsxNestedWithinTernaryParsesCorrectly.tsx, 0, 5))
const a = (
>a : Symbol(a, Decl(jsxNestedWithinTernaryParsesCorrectly.tsx, 1, 5))
<div>
{0 ? (
emptyMessage // must be identifier?
>emptyMessage : Symbol(emptyMessage, Decl(jsxNestedWithinTernaryParsesCorrectly.tsx, 0, 5))
) : (
// must be exactly two expression holes
<span>
{0}{0}
</span>
)}
</div>
);
@@ -0,0 +1,42 @@
=== tests/cases/compiler/jsxNestedWithinTernaryParsesCorrectly.tsx ===
const emptyMessage = null as any;
>emptyMessage : any
>null as any : any
>null : null
const a = (
>a : any
>( <div> {0 ? ( emptyMessage // must be identifier? ) : ( // must be exactly two expression holes <span> {0}{0} </span> )} </div>) : any
<div>
><div> {0 ? ( emptyMessage // must be identifier? ) : ( // must be exactly two expression holes <span> {0}{0} </span> )} </div> : any
>div : any
{0 ? (
>0 ? ( emptyMessage // must be identifier? ) : ( // must be exactly two expression holes <span> {0}{0} </span> ) : any
>0 : 0
>( emptyMessage // must be identifier? ) : any
emptyMessage // must be identifier?
>emptyMessage : any
) : (
>( // must be exactly two expression holes <span> {0}{0} </span> ) : any
// must be exactly two expression holes
<span>
><span> {0}{0} </span> : any
>span : any
{0}{0}
>0 : 0
>0 : 0
</span>
>span : any
)}
</div>
>div : any
);
@@ -11,6 +11,14 @@
"File '/node_modules/normalize.css.d.ts' does not exist.",
"'package.json' does not have a 'typings' field.",
"'package.json' does not have a 'types' field.",
"'package.json' has 'main' field 'normalize.css' that references '/node_modules/normalize.css/normalize.css'.",
"File '/node_modules/normalize.css/normalize.css' exist - use it as a name resolution result.",
"File '/node_modules/normalize.css/normalize.css' has an unsupported extension, so skipping it.",
"Loading module as file / folder, candidate module location '/node_modules/normalize.css/normalize.css', target file type 'TypeScript'.",
"File '/node_modules/normalize.css/normalize.css.ts' does not exist.",
"File '/node_modules/normalize.css/normalize.css.tsx' does not exist.",
"File '/node_modules/normalize.css/normalize.css.d.ts' does not exist.",
"Directory '/node_modules/normalize.css/normalize.css' does not exist, skipping all lookups in it.",
"File '/node_modules/normalize.css/index.ts' does not exist.",
"File '/node_modules/normalize.css/index.tsx' does not exist.",
"File '/node_modules/normalize.css/index.d.ts' does not exist.",
@@ -0,0 +1,15 @@
//// [tests/cases/compiler/moduleResolution_packageJson_yesAtPackageRoot_mainFieldInSubDirectory.ts] ////
//// [package.json]
{ "name": "foo", "version": "1.2.3", "main": "src/index.js" }
//// [index.d.ts]
export const x: number;
//// [index.ts]
import { x } from "foo";
//// [index.js]
"use strict";
exports.__esModule = true;
@@ -0,0 +1,8 @@
=== /node_modules/foo/src/index.d.ts ===
export const x: number;
>x : Symbol(x, Decl(index.d.ts, 0, 12))
=== /index.ts ===
import { x } from "foo";
>x : Symbol(x, Decl(index.ts, 0, 8))
@@ -0,0 +1,26 @@
[
"======== Resolving module 'foo' from '/index.ts'. ========",
"Module resolution kind is not specified, using 'NodeJs'.",
"Loading module 'foo' from 'node_modules' folder, target file type 'TypeScript'.",
"'package.json' does not have a 'typings' field.",
"'package.json' does not have a 'types' field.",
"'package.json' has 'main' field 'src/index.js' that references '/node_modules/foo/src/index.js'.",
"Found 'package.json' at '/node_modules/foo/package.json'. Package ID is 'foo/src/index.d.ts@1.2.3'.",
"File '/node_modules/foo.ts' does not exist.",
"File '/node_modules/foo.tsx' does not exist.",
"File '/node_modules/foo.d.ts' does not exist.",
"'package.json' does not have a 'typings' field.",
"'package.json' does not have a 'types' field.",
"'package.json' has 'main' field 'src/index.js' that references '/node_modules/foo/src/index.js'.",
"File '/node_modules/foo/src/index.js' does not exist.",
"Loading module as file / folder, candidate module location '/node_modules/foo/src/index.js', target file type 'TypeScript'.",
"File '/node_modules/foo/src/index.js.ts' does not exist.",
"File '/node_modules/foo/src/index.js.tsx' does not exist.",
"File '/node_modules/foo/src/index.js.d.ts' does not exist.",
"File name '/node_modules/foo/src/index.js' has a '.js' extension - stripping it.",
"File '/node_modules/foo/src/index.ts' does not exist.",
"File '/node_modules/foo/src/index.tsx' does not exist.",
"File '/node_modules/foo/src/index.d.ts' exist - use it as a name resolution result.",
"Resolving real path for '/node_modules/foo/src/index.d.ts', result '/node_modules/foo/src/index.d.ts'.",
"======== Module name 'foo' was successfully resolved to '/node_modules/foo/src/index.d.ts'. ========"
]
@@ -0,0 +1,8 @@
=== /node_modules/foo/src/index.d.ts ===
export const x: number;
>x : number
=== /index.ts ===
import { x } from "foo";
>x : number
@@ -11,6 +11,13 @@
"File '/node_modules/foo.d.ts' does not exist.",
"'package.json' does not have a 'typings' field.",
"'package.json' does not have a 'types' field.",
"'package.json' has 'main' field 'oof' that references '/node_modules/foo/oof'.",
"File '/node_modules/foo/oof' does not exist.",
"Loading module as file / folder, candidate module location '/node_modules/foo/oof', target file type 'TypeScript'.",
"File '/node_modules/foo/oof.ts' does not exist.",
"File '/node_modules/foo/oof.tsx' does not exist.",
"File '/node_modules/foo/oof.d.ts' does not exist.",
"Directory '/node_modules/foo/oof' does not exist, skipping all lookups in it.",
"File '/node_modules/foo/index.ts' does not exist.",
"File '/node_modules/foo/index.tsx' does not exist.",
"File '/node_modules/foo/index.d.ts' does not exist.",
@@ -40,6 +47,18 @@
"File '/node_modules/bar.d.ts' does not exist.",
"'package.json' does not have a 'typings' field.",
"'package.json' does not have a 'types' field.",
"'package.json' has 'main' field 'rab.js' that references '/node_modules/bar/rab.js'.",
"File '/node_modules/bar/rab.js' exist - use it as a name resolution result.",
"File '/node_modules/bar/rab.js' has an unsupported extension, so skipping it.",
"Loading module as file / folder, candidate module location '/node_modules/bar/rab.js', target file type 'TypeScript'.",
"File '/node_modules/bar/rab.js.ts' does not exist.",
"File '/node_modules/bar/rab.js.tsx' does not exist.",
"File '/node_modules/bar/rab.js.d.ts' does not exist.",
"File name '/node_modules/bar/rab.js' has a '.js' extension - stripping it.",
"File '/node_modules/bar/rab.ts' does not exist.",
"File '/node_modules/bar/rab.tsx' does not exist.",
"File '/node_modules/bar/rab.d.ts' does not exist.",
"Directory '/node_modules/bar/rab.js' does not exist, skipping all lookups in it.",
"File '/node_modules/bar/index.ts' does not exist.",
"File '/node_modules/bar/index.tsx' does not exist.",
"File '/node_modules/bar/index.d.ts' does not exist.",
@@ -67,6 +86,15 @@
"File '/node_modules/baz.d.ts' does not exist.",
"'package.json' does not have a 'typings' field.",
"'package.json' does not have a 'types' field.",
"'package.json' has 'main' field 'zab' that references '/node_modules/baz/zab'.",
"File '/node_modules/baz/zab' does not exist.",
"Loading module as file / folder, candidate module location '/node_modules/baz/zab', target file type 'TypeScript'.",
"File '/node_modules/baz/zab.ts' does not exist.",
"File '/node_modules/baz/zab.tsx' does not exist.",
"File '/node_modules/baz/zab.d.ts' does not exist.",
"File '/node_modules/baz/zab/index.ts' does not exist.",
"File '/node_modules/baz/zab/index.tsx' does not exist.",
"File '/node_modules/baz/zab/index.d.ts' does not exist.",
"File '/node_modules/baz/index.ts' does not exist.",
"File '/node_modules/baz/index.tsx' does not exist.",
"File '/node_modules/baz/index.d.ts' does not exist.",
@@ -11,6 +11,15 @@
"File '/node_modules/foo.d.ts' does not exist.",
"'package.json' does not have a 'typings' field.",
"'package.json' does not have a 'types' field.",
"'package.json' has 'main' field 'oof' that references '/node_modules/foo/oof'.",
"File '/node_modules/foo/oof' does not exist.",
"Loading module as file / folder, candidate module location '/node_modules/foo/oof', target file type 'TypeScript'.",
"File '/node_modules/foo/oof.ts' does not exist.",
"File '/node_modules/foo/oof.tsx' does not exist.",
"File '/node_modules/foo/oof.d.ts' does not exist.",
"File '/node_modules/foo/oof/index.ts' does not exist.",
"File '/node_modules/foo/oof/index.tsx' does not exist.",
"File '/node_modules/foo/oof/index.d.ts' does not exist.",
"File '/node_modules/foo/index.ts' does not exist.",
"File '/node_modules/foo/index.tsx' does not exist.",
"File '/node_modules/foo/index.d.ts' does not exist.",
@@ -0,0 +1,11 @@
//// [parenthesizedArrowExpressionASI.ts]
const x = (a: any[]) => (
// comment
undefined as number
);
//// [parenthesizedArrowExpressionASI.js]
var x = function (a) { return (
// comment
undefined); };
@@ -0,0 +1,11 @@
=== tests/cases/compiler/parenthesizedArrowExpressionASI.ts ===
const x = (a: any[]) => (
>x : Symbol(x, Decl(parenthesizedArrowExpressionASI.ts, 0, 5))
>a : Symbol(a, Decl(parenthesizedArrowExpressionASI.ts, 0, 11))
// comment
undefined as number
>undefined : Symbol(undefined)
);
@@ -0,0 +1,14 @@
=== tests/cases/compiler/parenthesizedArrowExpressionASI.ts ===
const x = (a: any[]) => (
>x : (a: any[]) => number
>(a: any[]) => ( // comment undefined as number) : (a: any[]) => number
>a : any[]
>( // comment undefined as number) : number
// comment
undefined as number
>undefined as number : number
>undefined : undefined
);
@@ -0,0 +1,4 @@
var foo = function () {
//// comment!
return void 0;
};
@@ -10,7 +10,7 @@ var ex;
/** @type {App} */
const app = {
>app : { name: string; icons: { image32: string; image64: string; }; }
>app : App
>{ name: 'name', icons: { image32: 'x.png', image64: 'y.png', }} : { name: string; icons: { image32: string; image64: string; }; }
name: 'name',
@@ -40,5 +40,5 @@ const app = {
/** @type {Opp} */
var mistake;
>mistake : { name: string; oops: { horrible: string; }; }
>mistake : Opp
@@ -1,13 +1,14 @@
tests/cases/compiler/unusedDestructuring.ts(3,7): error TS6198: All destructured elements are unused.
tests/cases/compiler/unusedDestructuring.ts(4,9): error TS6133: 'c' is declared but its value is never read.
tests/cases/compiler/unusedDestructuring.ts(6,7): error TS6133: 'e' is declared but its value is never read.
tests/cases/compiler/unusedDestructuring.ts(8,1): error TS6133: 'f' is declared but its value is never read.
tests/cases/compiler/unusedDestructuring.ts(8,12): error TS6198: All destructured elements are unused.
tests/cases/compiler/unusedDestructuring.ts(8,24): error TS6133: 'c' is declared but its value is never read.
tests/cases/compiler/unusedDestructuring.ts(8,32): error TS6133: 'e' is declared but its value is never read.
tests/cases/compiler/unusedDestructuring.ts(7,7): error TS6133: 'g' is declared but its value is never read.
tests/cases/compiler/unusedDestructuring.ts(9,1): error TS6133: 'f' is declared but its value is never read.
tests/cases/compiler/unusedDestructuring.ts(9,12): error TS6198: All destructured elements are unused.
tests/cases/compiler/unusedDestructuring.ts(9,24): error TS6133: 'c' is declared but its value is never read.
tests/cases/compiler/unusedDestructuring.ts(9,32): error TS6133: 'e' is declared but its value is never read.
==== tests/cases/compiler/unusedDestructuring.ts (7 errors) ====
==== tests/cases/compiler/unusedDestructuring.ts (8 errors) ====
export {};
declare const o: any;
const { a, b } = o;
@@ -20,6 +21,9 @@ tests/cases/compiler/unusedDestructuring.ts(8,32): error TS6133: 'e' is declared
const { e } = o;
~~~~~
!!! error TS6133: 'e' is declared but its value is never read.
const { f: g } = o;
~~~~~~~~
!!! error TS6133: 'g' is declared but its value is never read.
function f({ a, b }, { c, d }, { e }) {
~~~~~~~~~~
@@ -5,6 +5,7 @@ const { a, b } = o;
const { c, d } = o;
d;
const { e } = o;
const { f: g } = o;
function f({ a, b }, { c, d }, { e }) {
d;
@@ -18,6 +19,7 @@ var a = o.a, b = o.b;
var c = o.c, d = o.d;
d;
var e = o.e;
var g = o.f;
function f(_a, _b, _c) {
var a = _a.a, b = _a.b;
var c = _b.c, d = _b.d;
@@ -20,15 +20,19 @@ const { e } = o;
>e : Symbol(e, Decl(unusedDestructuring.ts, 5, 7))
>o : Symbol(o, Decl(unusedDestructuring.ts, 1, 13))
const { f: g } = o;
>g : Symbol(g, Decl(unusedDestructuring.ts, 6, 7))
>o : Symbol(o, Decl(unusedDestructuring.ts, 1, 13))
function f({ a, b }, { c, d }, { e }) {
>f : Symbol(f, Decl(unusedDestructuring.ts, 5, 16))
>a : Symbol(a, Decl(unusedDestructuring.ts, 7, 12))
>b : Symbol(b, Decl(unusedDestructuring.ts, 7, 15))
>c : Symbol(c, Decl(unusedDestructuring.ts, 7, 22))
>d : Symbol(d, Decl(unusedDestructuring.ts, 7, 25))
>e : Symbol(e, Decl(unusedDestructuring.ts, 7, 32))
>f : Symbol(f, Decl(unusedDestructuring.ts, 6, 19))
>a : Symbol(a, Decl(unusedDestructuring.ts, 8, 12))
>b : Symbol(b, Decl(unusedDestructuring.ts, 8, 15))
>c : Symbol(c, Decl(unusedDestructuring.ts, 8, 22))
>d : Symbol(d, Decl(unusedDestructuring.ts, 8, 25))
>e : Symbol(e, Decl(unusedDestructuring.ts, 8, 32))
d;
>d : Symbol(d, Decl(unusedDestructuring.ts, 7, 25))
>d : Symbol(d, Decl(unusedDestructuring.ts, 8, 25))
}
@@ -20,6 +20,11 @@ const { e } = o;
>e : any
>o : any
const { f: g } = o;
>f : any
>g : any
>o : any
function f({ a, b }, { c, d }, { e }) {
>f : ({ a, b }: { a: any; b: any; }, { c, d }: { c: any; d: any; }, { e }: { e: any; }) => void
>a : any
@@ -146,6 +146,12 @@ node_modules/adonis-framework/src/Session/Drivers/File/index.js(79,15): error TS
node_modules/adonis-framework/src/Session/Drivers/Redis/index.js(23,14): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
node_modules/adonis-framework/src/Session/Drivers/Redis/index.js(59,15): error TS2322: Type 'IterableIterator<any>' is not assignable to type 'boolean'.
node_modules/adonis-framework/src/Session/Drivers/Redis/index.js(72,15): error TS2322: Type 'IterableIterator<any>' is not assignable to type 'boolean'.
node_modules/adonis-framework/src/Session/SessionManager.js(13,21): error TS2307: Cannot find module 'adonis-fold'.
node_modules/adonis-framework/src/Session/SessionManager.js(69,22): error TS2339: Property 'drivers' does not exist on type 'Function'.
node_modules/adonis-framework/src/Session/SessionManager.js(69,49): error TS2339: Property 'drivers' does not exist on type 'Function'.
node_modules/adonis-framework/src/Session/SessionManager.js(71,76): error TS2339: Property 'drivers' does not exist on type 'Function'.
node_modules/adonis-framework/src/Session/Store.js(28,13): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Session/Store.js(80,13): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Session/index.js(10,14): error TS2304: Cannot find name 'SessionDriver'.
node_modules/adonis-framework/src/Session/index.js(11,2): error TS1003: Identifier expected.
node_modules/adonis-framework/src/Session/index.js(11,11): error TS2304: Cannot find name 'Class'.
@@ -173,12 +179,6 @@ node_modules/adonis-framework/src/Session/index.js(249,15): error TS2304: Cannot
node_modules/adonis-framework/src/Session/index.js(267,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Session/index.js(287,15): error TS2322: Type 'IterableIterator<any>' is not assignable to type 'boolean'.
node_modules/adonis-framework/src/Session/index.js(293,12): error TS2532: Object is possibly 'undefined'.
node_modules/adonis-framework/src/Session/SessionManager.js(13,21): error TS2307: Cannot find module 'adonis-fold'.
node_modules/adonis-framework/src/Session/SessionManager.js(69,22): error TS2339: Property 'drivers' does not exist on type 'Function'.
node_modules/adonis-framework/src/Session/SessionManager.js(69,49): error TS2339: Property 'drivers' does not exist on type 'Function'.
node_modules/adonis-framework/src/Session/SessionManager.js(71,76): error TS2339: Property 'drivers' does not exist on type 'Function'.
node_modules/adonis-framework/src/Session/Store.js(28,13): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Session/Store.js(80,13): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/View/Form/index.js(75,11): error TS2532: Object is possibly 'undefined'.
node_modules/adonis-framework/src/View/Form/index.js(115,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/View/Form/index.js(147,63): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'any[]'.
+5 -5
View File
@@ -43,8 +43,8 @@ node_modules/async/auto.js(159,18): error TS2695: Left side of comma operator is
node_modules/async/auto.js(159,50): error TS2695: Left side of comma operator is unused and has no side effects.
node_modules/async/autoInject.js(44,17): error TS2695: Left side of comma operator is unused and has no side effects.
node_modules/async/autoInject.js(134,6): error TS2695: Left side of comma operator is unused and has no side effects.
node_modules/async/autoInject.js(136,25): error TS2532: Object is possibly 'undefined'.
node_modules/async/autoInject.js(136,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/async/autoInject.js(136,25): error TS2532: Object is possibly 'undefined'.
node_modules/async/autoInject.js(136,26): error TS2695: Left side of comma operator is unused and has no side effects.
node_modules/async/autoInject.js(139,14): error TS2695: Left side of comma operator is unused and has no side effects.
node_modules/async/autoInject.js(160,28): error TS2695: Left side of comma operator is unused and has no side effects.
@@ -145,9 +145,9 @@ node_modules/async/dist/async.js(2963,25): error TS2722: Cannot invoke an object
node_modules/async/dist/async.js(2970,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/async/dist/async.js(2971,28): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/async/dist/async.js(3005,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/async/dist/async.js(3008,9): error TS2532: Object is possibly 'undefined'.
node_modules/async/dist/async.js(3008,9): error TS2684: The 'this' context of type 'Function | undefined' is not assignable to method's 'this' of type 'Function'.
Type 'undefined' is not assignable to type 'Function'.
node_modules/async/dist/async.js(3008,9): error TS2532: Object is possibly 'undefined'.
node_modules/async/dist/async.js(3081,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/async/dist/async.js(3086,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/async/dist/async.js(3087,28): error TS2722: Cannot invoke an object which is possibly 'undefined'.
@@ -175,18 +175,18 @@ node_modules/async/dist/async.js(4153,14): error TS2339: Property 'unshift' does
node_modules/async/dist/async.js(4367,5): error TS2322: Type 'any[] | {}' is not assignable to type 'any[]'.
Type '{}' is not assignable to type 'any[]'.
Property 'flatMap' is missing in type '{}'.
node_modules/async/dist/async.js(4603,17): error TS2532: Object is possibly 'undefined'.
node_modules/async/dist/async.js(4603,17): error TS2684: The 'this' context of type 'Function | undefined' is not assignable to method's 'this' of type 'Function'.
Type 'undefined' is not assignable to type 'Function'.
node_modules/async/dist/async.js(4603,17): error TS2532: Object is possibly 'undefined'.
node_modules/async/dist/async.js(4917,19): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/async/dist/async.js(4919,23): error TS2339: Property 'info' does not exist on type 'Error'.
node_modules/async/dist/async.js(5090,9): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/async/dist/async.js(5146,9): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/async/dist/async.js(5165,20): error TS2339: Property 'unmemoized' does not exist on type 'Function'.
node_modules/async/dist/async.js(5208,25): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/async/dist/async.js(5211,9): error TS2532: Object is possibly 'undefined'.
node_modules/async/dist/async.js(5211,9): error TS2684: The 'this' context of type 'Function | undefined' is not assignable to method's 'this' of type 'Function'.
Type 'undefined' is not assignable to type 'Function'.
node_modules/async/dist/async.js(5211,9): error TS2532: Object is possibly 'undefined'.
node_modules/async/dist/async.js(5315,20): error TS2532: Object is possibly 'undefined'.
node_modules/async/dist/async.js(5315,20): error TS2684: The 'this' context of type 'Function | undefined' is not assignable to method's 'this' of type 'Function'.
Type 'undefined' is not assignable to type 'Function'.
@@ -240,8 +240,8 @@ node_modules/async/eachSeries.js(28,12): error TS2304: Cannot find name 'AsyncFu
node_modules/async/eachSeries.js(36,20): error TS2695: Left side of comma operator is unused and has no side effects.
node_modules/async/ensureAsync.js(34,12): error TS2304: Cannot find name 'AsyncFunction'.
node_modules/async/ensureAsync.js(36,14): error TS2304: Cannot find name 'AsyncFunction'.
node_modules/async/ensureAsync.js(56,9): error TS2532: Object is possibly 'undefined'.
node_modules/async/ensureAsync.js(56,9): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/async/ensureAsync.js(56,9): error TS2532: Object is possibly 'undefined'.
node_modules/async/ensureAsync.js(56,10): error TS2695: Left side of comma operator is unused and has no side effects.
node_modules/async/ensureAsync.js(57,13): error TS2695: Left side of comma operator is unused and has no side effects.
node_modules/async/ensureAsync.js(62,18): error TS2695: Left side of comma operator is unused and has no side effects.
+7 -7
View File
@@ -3,13 +3,6 @@ Standard output:
node_modules/bcryptjs/scripts/build.js(1,26): error TS2307: Cannot find module 'metascript'.
node_modules/bcryptjs/scripts/build.js(32,1): error TS2322: Type '{ VERSION: any; }' is not assignable to type '{ [x: string]: any; VERSION: any; ISAAC: boolean; }'.
Property 'ISAAC' is missing in type '{ VERSION: any; }'.
node_modules/bcryptjs/src/bcrypt.js(25,13): error TS2322: Type 'Buffer' is not assignable to type 'number[]'.
Property 'flatMap' is missing in type 'Buffer'.
node_modules/bcryptjs/src/bcrypt.js(94,14): error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
node_modules/bcryptjs/src/bcrypt.js(150,5): error TS2322: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
node_modules/bcryptjs/src/bcrypt.js(160,14): error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
node_modules/bcryptjs/src/bcrypt.js(238,14): error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
node_modules/bcryptjs/src/bcrypt/impl.js(516,22): error TS2345: Argument of type 'Int32Array | number[]' is not assignable to parameter of type 'number[]'.
Type 'Int32Array' is not assignable to type 'number[]'.
Property 'flatMap' is missing in type 'Int32Array'.
@@ -27,6 +20,13 @@ node_modules/bcryptjs/src/bcrypt/prng/accum.js(65,74): error TS2339: Property 'd
node_modules/bcryptjs/src/bcrypt/prng/accum.js(66,22): error TS2339: Property 'detachEvent' does not exist on type 'Document'.
node_modules/bcryptjs/src/bcrypt/prng/accum.js(67,22): error TS2339: Property 'detachEvent' does not exist on type 'Document'.
node_modules/bcryptjs/src/bcrypt/util.js(20,5): error TS2304: Cannot find name 'utfx'.
node_modules/bcryptjs/src/bcrypt.js(25,13): error TS2322: Type 'Buffer' is not assignable to type 'number[]'.
Property 'flatMap' is missing in type 'Buffer'.
node_modules/bcryptjs/src/bcrypt.js(94,14): error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
node_modules/bcryptjs/src/bcrypt.js(150,5): error TS2322: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
node_modules/bcryptjs/src/bcrypt.js(160,14): error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
node_modules/bcryptjs/src/bcrypt.js(238,14): error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
node_modules/bcryptjs/src/wrap.js(37,26): error TS2304: Cannot find name 'define'.
node_modules/bcryptjs/src/wrap.js(37,51): error TS2304: Cannot find name 'define'.
node_modules/bcryptjs/src/wrap.js(38,9): error TS2304: Cannot find name 'define'.
File diff suppressed because it is too large Load Diff
@@ -29,6 +29,12 @@ packages/create-react-app/createReactApp.js(771,20): error TS2345: Argument of t
Type 'undefined' is not assignable to type 'string'.
packages/create-react-app/index.js(45,5): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'.
packages/eslint-config-react-app/index.js(24,33): error TS2307: Cannot find module 'confusing-browser-globals'.
packages/react-dev-utils/FileSizeReporter.js(13,24): error TS2307: Cannot find module 'filesize'.
packages/react-dev-utils/FileSizeReporter.js(14,25): error TS2307: Cannot find module 'recursive-readdir'.
packages/react-dev-utils/FileSizeReporter.js(16,24): error TS2307: Cannot find module 'gzip-size'.
packages/react-dev-utils/WebpackDevServerUtils.js(9,25): error TS2307: Cannot find module 'address'.
packages/react-dev-utils/WebpackDevServerUtils.js(14,24): error TS2307: Cannot find module 'detect-port-alt'.
packages/react-dev-utils/WebpackDevServerUtils.js(15,24): error TS2307: Cannot find module 'is-root'.
packages/react-dev-utils/__tests__/ignoredFiles.test.js(12,1): error TS2304: Cannot find name 'describe'.
packages/react-dev-utils/__tests__/ignoredFiles.test.js(13,3): error TS2304: Cannot find name 'it'.
packages/react-dev-utils/__tests__/ignoredFiles.test.js(18,5): error TS2304: Cannot find name 'expect'.
@@ -49,16 +55,10 @@ packages/react-dev-utils/browsersHelper.js(97,25): error TS2538: Type 'undefined
packages/react-dev-utils/checkRequiredFiles.js(19,34): error TS2339: Property 'F_OK' does not exist on type 'typeof import("fs")'.
packages/react-dev-utils/checkRequiredFiles.js(23,32): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'string'.
packages/react-dev-utils/checkRequiredFiles.js(24,34): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'string'.
packages/react-dev-utils/FileSizeReporter.js(13,24): error TS2307: Cannot find module 'filesize'.
packages/react-dev-utils/FileSizeReporter.js(14,25): error TS2307: Cannot find module 'recursive-readdir'.
packages/react-dev-utils/FileSizeReporter.js(16,24): error TS2307: Cannot find module 'gzip-size'.
packages/react-dev-utils/getProcessForPort.js(29,6): error TS2339: Property 'split' does not exist on type 'Buffer'.
packages/react-dev-utils/getProcessForPort.js(49,21): error TS2339: Property 'replace' does not exist on type 'Buffer'.
packages/react-dev-utils/getProcessForPort.js(63,5): error TS2339: Property 'trim' does not exist on type 'Buffer'.
packages/react-dev-utils/openBrowser.js(13,19): error TS2307: Cannot find module 'opn'.
packages/react-dev-utils/WebpackDevServerUtils.js(9,25): error TS2307: Cannot find module 'address'.
packages/react-dev-utils/WebpackDevServerUtils.js(14,24): error TS2307: Cannot find module 'detect-port-alt'.
packages/react-dev-utils/WebpackDevServerUtils.js(15,24): error TS2307: Cannot find module 'is-root'.
packages/react-dev-utils/webpackHotDevClient.js(19,22): error TS2307: Cannot find module 'sockjs-client'.
packages/react-dev-utils/webpackHotDevClient.js(24,28): error TS2307: Cannot find module 'react-error-overlay'.
packages/react-dev-utils/webpackHotDevClient.js(31,14): error TS2339: Property 'encodeURIComponent' does not exist on type 'Window'.
@@ -16,15 +16,15 @@ node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(209,4): error TS2322:
node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(220,4): error TS2322: Type 'null' is not assignable to type '(path: any) => any'.
node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(224,23): error TS2322: Type 'null' is not assignable to type '(path: any, callback: any) => void'.
node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(227,27): error TS2322: Type 'null' is not assignable to type '(path: any) => any'.
node_modules/enhanced-resolve/lib/concord.js(75,30): error TS2531: Object is possibly 'null'.
node_modules/enhanced-resolve/lib/concord.js(76,17): error TS2531: Object is possibly 'null'.
node_modules/enhanced-resolve/lib/createInnerCallback.js(16,20): error TS2339: Property 'stack' does not exist on type '(...args: any[]) => any'.
node_modules/enhanced-resolve/lib/createInnerCallback.js(17,20): error TS2339: Property 'missing' does not exist on type '(...args: any[]) => any'.
node_modules/enhanced-resolve/lib/Resolver.js(162,17): error TS2339: Property 'push' does not exist on type 'Set<any>'.
node_modules/enhanced-resolve/lib/Resolver.js(178,11): error TS2339: Property 'details' does not exist on type 'Error'.
node_modules/enhanced-resolve/lib/Resolver.js(179,11): error TS2339: Property 'missing' does not exist on type 'Error'.
node_modules/enhanced-resolve/lib/Resolver.js(213,20): error TS2339: Property 'recursion' does not exist on type 'Error'.
node_modules/enhanced-resolve/lib/concord.js(75,30): error TS2531: Object is possibly 'null'.
node_modules/enhanced-resolve/lib/concord.js(76,17): error TS2531: Object is possibly 'null'.
node_modules/enhanced-resolve/lib/createInnerCallback.js(16,20): error TS2339: Property 'stack' does not exist on type '(...args: any[]) => any'.
node_modules/enhanced-resolve/lib/createInnerCallback.js(17,20): error TS2339: Property 'missing' does not exist on type '(...args: any[]) => any'.
Standard error:
+17 -17
View File
@@ -1,5 +1,10 @@
Exit Code: 1
Standard output:
node_modules/lodash/_Hash.js(20,17): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_ListCache.js(20,17): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_MapCache.js(20,17): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_SetCache.js(19,14): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_Stack.js(17,20): error TS2339: Property 'size' does not exist on type 'ListCache'.
node_modules/lodash/_arrayAggregator.js(16,17): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_arrayEach.js(15,18): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_arrayEach.js(19,3): error TS2322: Type 'any[] | undefined' is not assignable to type 'any[]'.
@@ -130,9 +135,8 @@ node_modules/lodash/_equalObjects.js(70,18): error TS2322: Type 'boolean' is not
node_modules/lodash/_getHolder.js(10,17): error TS2339: Property 'placeholder' does not exist on type 'Function'.
node_modules/lodash/_getRawTag.js(36,7): error TS2454: Variable 'unmasked' is used before being assigned.
node_modules/lodash/_getSymbolsIn.js(19,23): error TS2554: Expected 0 arguments, but got 1.
node_modules/lodash/_Hash.js(20,17): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_hashDelete.js(7,20): error TS8024: JSDoc '@param' tag has name 'hash', but there is no parameter with that name.
node_modules/lodash/_hasPath.js(35,50): error TS2454: Variable 'key' is used before being assigned.
node_modules/lodash/_hashDelete.js(7,20): error TS8024: JSDoc '@param' tag has name 'hash', but there is no parameter with that name.
node_modules/lodash/_initCloneArray.js(16,16): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
node_modules/lodash/_initCloneArray.js(20,26): error TS2339: Property 'index' does not exist on type 'any[]'.
node_modules/lodash/_initCloneArray.js(21,26): error TS2339: Property 'input' does not exist on type 'any[]'.
@@ -140,8 +144,6 @@ node_modules/lodash/_insertWrapDetails.js(10,5): error TS1223: 'returns' tag alr
node_modules/lodash/_insertWrapDetails.js(15,5): error TS2322: Type 'string' is not assignable to type 'any[]'.
node_modules/lodash/_insertWrapDetails.js(20,3): error TS2322: Type 'string' is not assignable to type 'any[]'.
node_modules/lodash/_isLaziable.js(24,14): error TS2554: Expected 0 arguments, but got 1.
node_modules/lodash/_ListCache.js(20,17): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_MapCache.js(20,17): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_memoizeCapped.js(22,22): error TS2339: Property 'cache' does not exist on type 'Function'.
node_modules/lodash/_mergeData.js(60,26): error TS2554: Expected 4 arguments, but got 3.
node_modules/lodash/_mergeData.js(67,26): error TS2554: Expected 4 arguments, but got 3.
@@ -155,8 +157,6 @@ node_modules/lodash/_overRest.js(27,27): error TS2532: Object is possibly 'undef
node_modules/lodash/_overRest.js(28,22): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_overRest.js(31,15): error TS2538: Type 'undefined' cannot be used as an index type.
node_modules/lodash/_root.js(4,56): error TS2339: Property 'Object' does not exist on type 'Window'.
node_modules/lodash/_SetCache.js(19,14): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/_Stack.js(17,20): error TS2339: Property 'size' does not exist on type 'ListCache'.
node_modules/lodash/_unicodeWords.js(62,20): error TS8024: JSDoc '@param' tag has name 'The', but there is no parameter with that name.
node_modules/lodash/_updateWrapDetails.js(34,5): error TS1223: 'returns' tag already specified.
node_modules/lodash/ary.js(16,10): error TS1003: Identifier expected.
@@ -181,8 +181,8 @@ node_modules/lodash/core.js(77,82): error TS2339: Property 'nodeType' does not e
node_modules/lodash/core.js(540,19): error TS2322: Type '(value: any) => boolean' is not assignable to type 'boolean | undefined'.
Type '(value: any) => boolean' is not assignable to type 'false'.
node_modules/lodash/core.js(545,24): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/core.js(545,24): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/lodash/core.js(545,24): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Boolean' has no compatible call signatures.
node_modules/lodash/core.js(545,24): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/lodash/core.js(664,42): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'.
node_modules/lodash/core.js(721,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'result' must be of type 'boolean', but here has type 'any'.
node_modules/lodash/core.js(749,18): error TS8024: JSDoc '@param' tag has name 'value', but there is no parameter with that name.
@@ -218,8 +218,8 @@ node_modules/lodash/core.js(1566,33): error TS2554: Expected 1 arguments, but go
node_modules/lodash/core.js(1709,41): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/core.js(1872,12): error TS1003: Identifier expected.
node_modules/lodash/core.js(1872,12): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/core.js(2142,12): error TS1003: Identifier expected.
node_modules/lodash/core.js(2142,12): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/core.js(2142,12): error TS1003: Identifier expected.
node_modules/lodash/core.js(2183,41): error TS8024: JSDoc '@param' tag has name 'iteratees', but there is no parameter with that name.
node_modules/lodash/core.js(2473,21): error TS2554: Expected 0 arguments, but got 1.
node_modules/lodash/core.js(2609,39): error TS2554: Expected 0 arguments, but got 1.
@@ -235,11 +235,11 @@ node_modules/lodash/core.js(3830,45): error TS2304: Cannot find name 'define'.
node_modules/lodash/core.js(3830,71): error TS2304: Cannot find name 'define'.
node_modules/lodash/core.js(3839,5): error TS2304: Cannot find name 'define'.
node_modules/lodash/core.js(3846,35): error TS2339: Property '_' does not exist on type 'typeof lodash'.
node_modules/lodash/curry.js(24,10): error TS1003: Identifier expected.
node_modules/lodash/curry.js(24,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/curry.js(24,10): error TS1003: Identifier expected.
node_modules/lodash/curry.js(50,10): error TS2339: Property 'placeholder' does not exist on type 'Function'.
node_modules/lodash/curryRight.js(21,10): error TS1003: Identifier expected.
node_modules/lodash/curryRight.js(21,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/curryRight.js(21,10): error TS1003: Identifier expected.
node_modules/lodash/curryRight.js(47,10): error TS2339: Property 'placeholder' does not exist on type 'Function'.
node_modules/lodash/debounce.js(83,17): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/debounce.js(84,27): error TS2532: Object is possibly 'undefined'.
@@ -255,22 +255,21 @@ node_modules/lodash/differenceBy.js(40,52): error TS2345: Argument of type '(val
node_modules/lodash/differenceBy.js(40,78): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/differenceWith.js(36,52): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'.
Type '(value: any) => boolean' is not assignable to type 'false'.
node_modules/lodash/drop.js(13,10): error TS1003: Identifier expected.
node_modules/lodash/drop.js(13,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/drop.js(13,10): error TS1003: Identifier expected.
node_modules/lodash/dropRight.js(13,10): error TS1003: Identifier expected.
node_modules/lodash/dropRight.js(13,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/dropRightWhile.js(41,24): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/dropWhile.js(41,24): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/escape.js(39,39): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'.
node_modules/lodash/every.js(23,10): error TS1003: Identifier expected.
node_modules/lodash/every.js(23,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/every.js(23,10): error TS1003: Identifier expected.
node_modules/lodash/every.js(53,27): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/filter.js(45,27): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/findIndex.js(52,31): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/findKey.js(41,30): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/findLastIndex.js(56,31): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/findLastKey.js(41,30): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/fp.js(2,18): error TS2554: Expected 3-4 arguments, but got 2.
node_modules/lodash/fp/_baseConvert.js(144,5): error TS2322: Type 'Function' is not assignable to type '{ cap?: boolean; curry?: boolean; fixed?: boolean; immutable?: boolean; rearg?: boolean; } | unde...'.
Type 'Function' has no properties in common with type '{ cap?: boolean; curry?: boolean; fixed?: boolean; immutable?: boolean; rearg?: boolean; }'.
node_modules/lodash/fp/_baseConvert.js(145,5): error TS2322: Type 'string' is not assignable to type 'Function'.
@@ -326,6 +325,7 @@ node_modules/lodash/fp/object.js(2,26): error TS2345: Argument of type '{ [x: st
node_modules/lodash/fp/seq.js(2,26): error TS2345: Argument of type '{ [x: string]: any; 'at': Function; 'chain': (value: any) => any; 'commit': () => any; 'lodash': ...' is not assignable to parameter of type 'string'.
node_modules/lodash/fp/string.js(2,26): error TS2345: Argument of type '{ [x: string]: any; 'camelCase': Function; 'capitalize': (string?: string | undefined) => string;...' is not assignable to parameter of type 'string'.
node_modules/lodash/fp/util.js(2,26): error TS2345: Argument of type '{ [x: string]: any; 'attempt': Function; 'bindAll': Function; 'cond': (pairs: any[]) => Function;...' is not assignable to parameter of type 'string'.
node_modules/lodash/fp.js(2,18): error TS2554: Expected 3-4 arguments, but got 2.
node_modules/lodash/includes.js(24,10): error TS1003: Identifier expected.
node_modules/lodash/includes.js(24,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/intersectionBy.js(41,32): error TS2554: Expected 0-1 arguments, but got 2.
@@ -371,10 +371,10 @@ node_modules/lodash/remove.js(41,15): error TS2554: Expected 0-1 arguments, but
node_modules/lodash/repeat.js(15,10): error TS1003: Identifier expected.
node_modules/lodash/repeat.js(15,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/replace.js(15,29): error TS8029: JSDoc '@param' tag has name 'replacement', but there is no parameter with that name. It would match 'arguments' if it had an array type.
node_modules/lodash/sampleSize.js(17,10): error TS1003: Identifier expected.
node_modules/lodash/sampleSize.js(17,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/some.js(18,10): error TS1003: Identifier expected.
node_modules/lodash/sampleSize.js(17,10): error TS1003: Identifier expected.
node_modules/lodash/some.js(18,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/some.js(18,10): error TS1003: Identifier expected.
node_modules/lodash/some.js(48,27): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/sortedIndexBy.js(30,42): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/sortedLastIndexBy.js(30,42): error TS2554: Expected 0-1 arguments, but got 2.
@@ -388,8 +388,8 @@ node_modules/lodash/takeRight.js(13,10): error TS1003: Identifier expected.
node_modules/lodash/takeRight.js(13,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/takeRightWhile.js(41,24): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/takeWhile.js(41,24): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/lodash/template.js(65,10): error TS1003: Identifier expected.
node_modules/lodash/template.js(65,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/template.js(65,10): error TS1003: Identifier expected.
node_modules/lodash/template.js(146,34): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/template.js(153,21): error TS2532: Object is possibly 'undefined'.
node_modules/lodash/template.js(158,6): error TS2532: Object is possibly 'undefined'.
@@ -414,8 +414,8 @@ node_modules/lodash/transform.js(59,3): error TS2349: Cannot invoke an expressio
node_modules/lodash/transform.js(60,12): error TS2722: Cannot invoke an object which is possibly 'undefined'.
node_modules/lodash/trim.js(20,10): error TS1003: Identifier expected.
node_modules/lodash/trim.js(20,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/trimEnd.js(19,10): error TS1003: Identifier expected.
node_modules/lodash/trimEnd.js(19,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/trimEnd.js(19,10): error TS1003: Identifier expected.
node_modules/lodash/trimStart.js(19,10): error TS1003: Identifier expected.
node_modules/lodash/trimStart.js(19,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
node_modules/lodash/truncate.js(60,36): error TS2532: Object is possibly 'undefined'.
+12
View File
@@ -0,0 +1,12 @@
Exit Code: 1
Standard output:
node_modules/log4js/types/log4js.d.ts(4,2): error TS7008: Member 'getLogger' implicitly has an 'any' type.
node_modules/log4js/types/log4js.d.ts(5,2): error TS7008: Member 'configure' implicitly has an 'any' type.
node_modules/log4js/types/log4js.d.ts(6,2): error TS7008: Member 'addLayout' implicitly has an 'any' type.
node_modules/log4js/types/log4js.d.ts(7,2): error TS7008: Member 'connectLogger' implicitly has an 'any' type.
node_modules/log4js/types/log4js.d.ts(8,2): error TS7008: Member 'levels' implicitly has an 'any' type.
node_modules/log4js/types/log4js.d.ts(9,2): error TS7008: Member 'shutdown' implicitly has an 'any' type.
Standard error:
+292 -221
View File
@@ -2,28 +2,33 @@ Exit Code: 1
Standard output:
node_modules/npm/bin/npm-cli.js(6,13): error TS2551: Property 'echo' does not exist on type '{ Echo(s: any): void; StdErr: TextStreamWriter; StdOut: TextStreamWriter; Arguments: { length: nu...'. Did you mean 'Echo'?
node_modules/npm/bin/npm-cli.js(13,13): error TS2551: Property 'quit' does not exist on type '{ Echo(s: any): void; StdErr: TextStreamWriter; StdOut: TextStreamWriter; Arguments: { length: nu...'. Did you mean 'Quit'?
node_modules/npm/bin/npm-cli.js(30,23): error TS2307: Cannot find module '../package.json'.
node_modules/npm/bin/npm-cli.js(54,7): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(55,11): error TS2339: Property 'deref' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(55,21): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(55,35): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(55,49): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(59,21): error TS2339: Property 'version' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(64,9): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(66,9): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(69,35): error TS2339: Property 'version' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(74,25): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(75,9): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(75,26): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(76,9): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(82,7): error TS2339: Property 'load' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(84,9): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(84,22): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(84,35): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(86,23): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(86,55): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(86,82): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(86,113): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(47,7): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(48,11): error TS2339: Property 'deref' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(48,21): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(48,35): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(48,49): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(52,21): error TS2339: Property 'version' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(57,9): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(59,9): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(62,35): error TS2339: Property 'version' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(67,25): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(68,9): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(68,26): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(69,9): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(75,7): error TS2339: Property 'load' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(78,27): error TS2307: Cannot find module '../package.json'.
node_modules/npm/bin/npm-cli.js(85,30): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(86,32): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(121,9): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(121,22): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(121,35): error TS2339: Property 'argv' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(125,13): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(126,14): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(127,14): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(128,13): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(132,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(134,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/bin/npm-cli.js(136,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/html/static/toc.js(3,40): error TS2531: Object is possibly 'null'.
node_modules/npm/lib/access.js(58,46): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/access.js(65,18): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
@@ -39,6 +44,16 @@ node_modules/npm/lib/adduser.js(44,9): error TS2339: Property 'config' does not
node_modules/npm/lib/adduser.js(45,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/adduser.js(46,9): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/adduser.js(47,9): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/audit.js(29,23): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/audit.js(47,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/audit.js(49,9): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/audit.js(60,11): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/audit.js(65,11): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/audit.js(75,27): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/audit.js(81,11): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/audit.js(88,61): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/audit.js(89,10): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/audit.js(90,10): error TS2339: Property 'wrapped' does not exist on type 'Error'.
node_modules/npm/lib/auth/legacy.js(12,30): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/auth/legacy.js(35,16): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/auth/legacy.js(69,33): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
@@ -73,40 +88,15 @@ node_modules/npm/lib/ci.js(13,31): error TS2339: Property 'config' does not exis
node_modules/npm/lib/ci.js(14,12): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/ci.js(15,12): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/ci.js(27,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/completion.js(26,24): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
node_modules/npm/lib/completion.js(30,24): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
node_modules/npm/lib/completion.js(51,7): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/completion.js(52,7): error TS2339: Property 'errno' does not exist on type 'Error'.
node_modules/npm/lib/completion.js(129,9): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/completion.js(135,13): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/completion.js(247,23): error TS2339: Property 'fullList' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(72,18): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(81,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(82,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(83,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(85,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(91,25): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(103,37): error TS2339: Property 'defaults' does not exist on type 'typeof import("/npm/node_modules/npm/lib/config/core")'.
node_modules/npm/lib/config.js(105,28): error TS2339: Property 'defaults' does not exist on type 'typeof import("/npm/node_modules/npm/lib/config/core")'.
node_modules/npm/lib/config.js(130,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(131,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(132,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(151,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(153,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(154,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(162,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(181,26): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(182,21): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(205,27): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(218,18): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(220,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(233,52): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(236,21): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(240,45): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(240,75): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(243,47): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(243,79): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(246,21): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(262,26): error TS2339: Property 'defaults' does not exist on type 'typeof import("/npm/node_modules/npm/lib/config/core")'.
node_modules/npm/lib/config.js(268,29): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config/bin-links.js(11,24): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config/bin-links.js(12,16): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config/bin-links.js(13,20): error TS2339: Property 'globalBin' does not exist on type 'EventEmitter'.
@@ -142,19 +132,19 @@ node_modules/npm/lib/config/core.js(144,10): error TS2339: Property 'once' does
node_modules/npm/lib/config/core.js(145,10): error TS2339: Property 'once' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(154,14): error TS2339: Property 'get' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(155,35): error TS2339: Property 'get' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(167,23): error TS2339: Property 'get' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(172,10): error TS2339: Property 'once' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(183,23): error TS2339: Property 'get' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(197,5): error TS2323: Cannot redeclare exported variable 'loaded'.
node_modules/npm/lib/config/core.js(220,28): error TS2339: Property 'defaults' does not exist on type 'typeof import("/npm/node_modules/npm/lib/config/defaults")'.
node_modules/npm/lib/config/core.js(244,21): error TS2339: Property 'sources' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(252,17): error TS2339: Property 'emit' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(286,8): error TS2339: Property '_saving' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(314,8): error TS2339: Property 'sources' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(315,8): error TS2339: Property 'push' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(316,8): error TS2339: Property '_await' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(340,10): error TS2339: Property 'emit' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(416,29): error TS2345: Argument of type '(orig: string, esc: any, name: any) => string | undefined' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'.
node_modules/npm/lib/config/core.js(160,23): error TS2339: Property 'get' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(165,10): error TS2339: Property 'once' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(176,23): error TS2339: Property 'get' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(190,5): error TS2323: Cannot redeclare exported variable 'loaded'.
node_modules/npm/lib/config/core.js(213,28): error TS2339: Property 'defaults' does not exist on type 'typeof import("/npm/node_modules/npm/lib/config/defaults")'.
node_modules/npm/lib/config/core.js(237,21): error TS2339: Property 'sources' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(245,17): error TS2339: Property 'emit' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(279,8): error TS2339: Property '_saving' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(307,8): error TS2339: Property 'sources' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(308,8): error TS2339: Property 'push' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(309,8): error TS2339: Property '_await' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(333,10): error TS2339: Property 'emit' does not exist on type 'Conf'.
node_modules/npm/lib/config/core.js(409,29): error TS2345: Argument of type '(orig: string, esc: any, name: any) => string | undefined' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
node_modules/npm/lib/config/gentle-fs.js(16,11): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
@@ -216,6 +206,35 @@ node_modules/npm/lib/config/pacote.js(84,31): error TS2339: Property 'config' do
node_modules/npm/lib/config/pacote.js(89,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config/pacote.js(90,38): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config/pacote.js(110,60): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(74,18): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(83,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(84,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(85,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(87,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(93,25): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(105,37): error TS2339: Property 'defaults' does not exist on type 'typeof import("/npm/node_modules/npm/lib/config/core")'.
node_modules/npm/lib/config.js(107,28): error TS2339: Property 'defaults' does not exist on type 'typeof import("/npm/node_modules/npm/lib/config/core")'.
node_modules/npm/lib/config.js(135,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(136,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(137,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(156,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(158,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(159,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(167,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(186,26): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(187,21): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(210,27): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(223,18): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(225,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(238,52): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(241,21): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(245,45): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(245,75): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(248,47): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(248,79): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(251,21): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/config.js(267,26): error TS2339: Property 'defaults' does not exist on type 'typeof import("/npm/node_modules/npm/lib/config/core")'.
node_modules/npm/lib/config.js(273,29): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/dedupe.js(35,32): error TS2339: Property 'dir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/dedupe.js(37,11): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
node_modules/npm/lib/dedupe.js(38,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
@@ -253,6 +272,9 @@ node_modules/npm/lib/dist-tag.js(109,11): error TS2339: Property 'registry' does
node_modules/npm/lib/dist-tag.js(142,26): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/dist-tag.js(149,9): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/docs.js(40,38): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/doctor/check-files-permission.js(11,14): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/doctor/check-files-permission.js(11,38): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/doctor/verify-cached-files.js(10,90): error TS2345: Argument of type '2' is not assignable to parameter of type '(string | number)[] | null | undefined'.
node_modules/npm/lib/doctor.js(6,54): error TS2339: Property 'defaults' does not exist on type 'typeof import("/npm/node_modules/npm/lib/config/defaults")'.
node_modules/npm/lib/doctor.js(23,41): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/doctor.js(24,40): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
@@ -262,9 +284,6 @@ node_modules/npm/lib/doctor.js(55,13): error TS2339: Property 'color' does not e
node_modules/npm/lib/doctor.js(88,20): error TS2339: Property 'version' does not exist on type 'EventEmitter'.
node_modules/npm/lib/doctor.js(90,24): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/doctor.js(108,92): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/doctor/check-files-permission.js(11,14): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/doctor/check-files-permission.js(11,38): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/doctor/verify-cached-files.js(10,90): error TS2345: Argument of type '2' is not assignable to parameter of type '(string | number)[] | null | undefined'.
node_modules/npm/lib/edit.js(18,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/edit.js(27,28): error TS2339: Property 'dir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/edit.js(32,11): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
@@ -296,6 +315,7 @@ node_modules/npm/lib/help.js(146,7): error TS2322: Type '"cli"' is not assignabl
node_modules/npm/lib/help.js(149,7): error TS2322: Type '"api"' is not assignable to type 'number'.
node_modules/npm/lib/help.js(152,7): error TS2322: Type '"files"' is not assignable to type 'number'.
node_modules/npm/lib/help.js(155,7): error TS2322: Type '"misc"' is not assignable to type 'number'.
node_modules/npm/lib/help.js(160,55): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
node_modules/npm/lib/help.js(164,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/help.js(170,9): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/help.js(179,18): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
@@ -306,51 +326,9 @@ node_modules/npm/lib/help.js(196,26): error TS2339: Property 'commands' does not
node_modules/npm/lib/help.js(197,22): error TS2339: Property 'deref' does not exist on type 'EventEmitter'.
node_modules/npm/lib/help.js(199,14): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never'.
node_modules/npm/lib/help.js(199,22): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/init.js(16,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/init.js(17,25): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/init.js(31,31): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(181,36): error TS2339: Property 'globalDir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(183,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(185,17): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(189,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(191,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(199,36): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(223,24): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(225,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(226,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(229,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(234,34): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(235,63): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(236,51): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(238,85): error TS2339: Property 'globalDir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(266,26): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(267,9): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(270,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(271,7): error TS2532: Object is possibly 'undefined'.
node_modules/npm/lib/install.js(271,7): error TS2684: The 'this' context of type '((err: any, ...args: any[]) => any) | undefined' is not assignable to method's 'this' of type 'Function'.
Type 'undefined' is not assignable to type 'Function'.
node_modules/npm/lib/install.js(336,25): error TS2339: Property 'failing' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(365,18): error TS2345: Argument of type '"time"' is not assignable to parameter of type '"warning"'.
node_modules/npm/lib/install.js(372,16): error TS2345: Argument of type '"timeEnd"' is not assignable to parameter of type '"warning"'.
node_modules/npm/lib/install.js(523,40): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(601,12): error TS2339: Property 'failing' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(618,12): error TS2339: Property 'failing' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(637,12): error TS2339: Property 'failing' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(678,12): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/install.js(679,12): error TS2339: Property 'errno' does not exist on type 'Error'.
node_modules/npm/lib/install.js(739,32): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(745,12): error TS2339: Property 'failing' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(757,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(759,18): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(877,26): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(884,26): error TS2345: Argument of type '{ [x: string]: any; action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(886,25): error TS2345: Argument of type '{ [x: string]: any; action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(888,27): error TS2345: Argument of type '{ [x: string]: any; action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(890,25): error TS2345: Argument of type '{ [x: string]: any; action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(892,27): error TS2345: Argument of type '{ [x: string]: any; action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(936,8): error TS2454: Variable 'previousPath' is used before being assigned.
node_modules/npm/lib/install.js(974,53): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(996,53): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/init.js(38,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/init.js(39,25): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/init.js(53,31): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/access-error.js(4,18): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/npm/lib/install/action/build.js(10,50): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/action/extract.js(39,40): error TS2339: Property 'limit' does not exist on type 'EventEmitter'.
@@ -366,27 +344,43 @@ node_modules/npm/lib/install/actions.js(126,24): error TS2339: Property 'limit'
node_modules/npm/lib/install/actions.js(168,16): error TS2345: Argument of type '"time"' is not assignable to parameter of type '"warning"'.
node_modules/npm/lib/install/actions.js(171,16): error TS2345: Argument of type '"timeEnd"' is not assignable to parameter of type '"warning"'.
node_modules/npm/lib/install/and-add-parent-to-errors.js(9,10): error TS2339: Property 'parent' does not exist on type 'Error'.
node_modules/npm/lib/install/audit.js(32,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/audit.js(89,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/audit.js(91,23): error TS2339: Property 'projectScope' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/audit.js(100,20): error TS2339: Property 'color' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/audit.js(101,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/audit.js(109,20): error TS2339: Property 'color' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/audit.js(110,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/audit.js(172,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/audit.js(216,26): error TS2339: Property 'version' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/check-permissions.js(36,9): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/decompose-actions.js(35,30): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(243,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(298,14): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(299,29): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(434,27): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(479,14): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(580,9): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/install/deps.js(795,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(796,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(233,26): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(234,34): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(234,62): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(235,33): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(236,33): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(237,52): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/decompose-actions.js(47,30): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(253,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(309,14): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(310,29): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(401,28): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(402,36): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(402,64): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(403,35): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(404,35): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(409,54): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(459,27): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(599,9): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/install/deps.js(814,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/deps.js(815,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(242,26): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(243,26): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(244,34): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(244,62): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(245,33): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(246,33): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/diff-trees.js(247,52): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/exists.js(20,21): error TS2339: Property 'F_OK' does not exist on type 'typeof import("fs")'.
node_modules/npm/lib/install/flatten-tree.js(16,15): error TS2532: Object is possibly 'undefined'.
node_modules/npm/lib/install/flatten-tree.js(18,16): error TS2532: Object is possibly 'undefined'.
node_modules/npm/lib/install/inflate-shrinkwrap.js(29,12): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/inflate-shrinkwrap.js(29,45): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/inflate-shrinkwrap.js(30,12): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/inflate-shrinkwrap.js(30,45): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/inflate-shrinkwrap.js(77,34): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/mutate-into-logical-tree.js(137,86): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/read-shrinkwrap.js(11,46): error TS2339: Property 'lockfileVersion' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install/save.js(48,12): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
@@ -414,6 +408,51 @@ node_modules/npm/lib/install/validate-tree.js(70,25): error TS2339: Property 'co
node_modules/npm/lib/install/validate-tree.js(74,13): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/install/validate-tree.js(89,15): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/install/writable.js(22,21): error TS2339: Property 'W_OK' does not exist on type 'typeof import("fs")'.
node_modules/npm/lib/install.js(182,36): error TS2339: Property 'globalDir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(184,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(186,17): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(190,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(192,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(200,36): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(224,24): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(226,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(227,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(230,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(235,34): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(236,63): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(237,51): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(239,85): error TS2339: Property 'globalDir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(240,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(268,26): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(269,9): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(272,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(273,7): error TS2532: Object is possibly 'undefined'.
node_modules/npm/lib/install.js(273,7): error TS2684: The 'this' context of type '((err: any, ...args: any[]) => any) | undefined' is not assignable to method's 'this' of type 'Function'.
Type 'undefined' is not assignable to type 'Function'.
node_modules/npm/lib/install.js(340,25): error TS2339: Property 'failing' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(369,18): error TS2345: Argument of type '"time"' is not assignable to parameter of type '"warning"'.
node_modules/npm/lib/install.js(376,16): error TS2345: Argument of type '"timeEnd"' is not assignable to parameter of type '"warning"'.
node_modules/npm/lib/install.js(519,40): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(597,12): error TS2339: Property 'failing' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(614,12): error TS2339: Property 'failing' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(634,88): error TS2339: Property 'remove' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(643,12): error TS2339: Property 'failing' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(684,12): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/install.js(685,12): error TS2339: Property 'errno' does not exist on type 'Error'.
node_modules/npm/lib/install.js(745,32): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(751,12): error TS2339: Property 'failing' does not exist on type 'Installer'.
node_modules/npm/lib/install.js(768,13): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(770,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(771,14): error TS2554: Expected 0-1 arguments, but got 2.
node_modules/npm/lib/install.js(890,26): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(897,26): error TS2345: Argument of type '{ [x: string]: any; action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(899,25): error TS2345: Argument of type '{ [x: string]: any; action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(901,27): error TS2345: Argument of type '{ [x: string]: any; action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(903,25): error TS2345: Argument of type '{ [x: string]: any; action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(905,27): error TS2345: Argument of type '{ [x: string]: any; action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
node_modules/npm/lib/install.js(948,8): error TS2454: Variable 'previousPath' is used before being assigned.
node_modules/npm/lib/install.js(985,53): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/install.js(1007,53): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/link.js(25,17): error TS2339: Property 'globalDir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/link.js(39,9): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/link.js(40,9): error TS2339: Property 'errno' does not exist on type 'Error'.
@@ -495,31 +534,31 @@ node_modules/npm/lib/npm.js(228,11): error TS2339: Property 'config' does not ex
node_modules/npm/lib/npm.js(231,30): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(234,19): error TS2345: Argument of type 'true' is not assignable to parameter of type 'string'.
node_modules/npm/lib/npm.js(253,17): error TS2339: Property 'installPrefix' does not exist on type 'Process'.
node_modules/npm/lib/npm.js(343,52): error TS2345: Argument of type 'PropertyDescriptor | undefined' is not assignable to parameter of type 'PropertyDescriptor & ThisType<any>'.
node_modules/npm/lib/npm.js(347,52): error TS2345: Argument of type 'PropertyDescriptor | undefined' is not assignable to parameter of type 'PropertyDescriptor & ThisType<any>'.
Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType<any>'.
Type 'undefined' is not assignable to type 'PropertyDescriptor'.
node_modules/npm/lib/npm.js(346,51): error TS2345: Argument of type 'PropertyDescriptor | undefined' is not assignable to parameter of type 'PropertyDescriptor & ThisType<any>'.
node_modules/npm/lib/npm.js(350,51): error TS2345: Argument of type 'PropertyDescriptor | undefined' is not assignable to parameter of type 'PropertyDescriptor & ThisType<any>'.
Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType<any>'.
Type 'undefined' is not assignable to type 'PropertyDescriptor'.
node_modules/npm/lib/npm.js(373,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(373,47): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(373,66): error TS2339: Property 'localPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(376,21): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(386,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(386,50): error TS2339: Property 'globalBin' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(387,33): error TS2339: Property 'root' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(395,21): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(404,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(404,50): error TS2339: Property 'globalDir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(405,33): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(414,33): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(415,33): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(421,37): error TS2339: Property 'dir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(424,37): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(425,38): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(435,33): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(441,34): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(456,13): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(377,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(377,47): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(377,66): error TS2339: Property 'localPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(380,21): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(390,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(390,50): error TS2339: Property 'globalBin' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(391,33): error TS2339: Property 'root' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(399,21): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(408,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(408,50): error TS2339: Property 'globalDir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(409,33): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(418,33): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(419,33): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(425,37): error TS2339: Property 'dir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(428,37): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(429,38): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(439,33): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(445,34): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/npm.js(460,13): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/outdated.js(36,16): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/outdated.js(71,30): error TS2339: Property 'dir' does not exist on type 'EventEmitter'.
node_modules/npm/lib/outdated.js(74,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
@@ -559,15 +598,22 @@ node_modules/npm/lib/owner.js(223,28): error TS2339: Property 'config' does not
node_modules/npm/lib/owner.js(226,11): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/owner.js(246,37): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/owner.js(254,15): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(87,32): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(95,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(115,36): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(169,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(170,20): error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.
node_modules/npm/lib/pack.js(170,36): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(205,17): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/pack.js(206,17): error TS2339: Property 'signal' does not exist on type 'Error'.
node_modules/npm/lib/pack.js(224,36): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(53,24): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(72,40): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(79,21): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(86,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(88,40): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(102,39): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(119,32): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(127,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(147,36): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(177,25): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(299,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(300,20): error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.
node_modules/npm/lib/pack.js(300,36): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/pack.js(335,17): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/pack.js(336,17): error TS2339: Property 'signal' does not exist on type 'Error'.
node_modules/npm/lib/pack.js(354,36): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/ping.js(13,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/ping.js(15,18): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/ping.js(17,7): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
@@ -592,15 +638,20 @@ node_modules/npm/lib/prune.js(58,22): error TS2339: Property 'idealTree' does no
node_modules/npm/lib/prune.js(61,32): error TS2339: Property 'idealTree' does not exist on type 'Pruner'.
node_modules/npm/lib/prune.js(62,27): error TS2339: Property 'idealTree' does not exist on type 'Pruner'.
node_modules/npm/lib/publish.js(45,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(62,11): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/publish.js(86,36): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(102,34): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(126,9): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(127,9): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(132,25): error TS2339: Property 'version' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(174,13): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(179,15): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(196,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(53,24): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(68,11): error TS2339: Property 'code' does not exist on type 'Error'.
node_modules/npm/lib/publish.js(93,36): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(97,25): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(111,34): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(120,24): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(138,9): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(139,9): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(144,25): error TS2339: Property 'version' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(166,18): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(180,13): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(191,13): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(196,15): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/publish.js(213,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/rebuild.js(20,26): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/rebuild.js(21,21): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/rebuild.js(26,24): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
@@ -623,6 +674,14 @@ node_modules/npm/lib/run-script.js(77,21): error TS2345: Argument of type 'strin
node_modules/npm/lib/run-script.js(94,13): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/run-script.js(99,13): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/run-script.js(148,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/all-package-metadata.js(33,30): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/all-package-metadata.js(36,35): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/all-package-metadata.js(146,7): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/all-package-metadata.js(239,20): error TS2339: Property 'cache' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/esearch.js(15,36): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/esearch.js(35,7): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/format-package-stream.js(130,31): error TS2339: Property 'fd' does not exist on type 'WriteStream'.
node_modules/npm/lib/search/format-package-stream.js(130,63): error TS2339: Property 'getWindowSize' does not exist on type 'WriteStream'.
node_modules/npm/lib/search.js(25,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search.js(26,34): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search.js(27,40): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
@@ -636,33 +695,26 @@ node_modules/npm/lib/search.js(71,20): error TS2339: Property 'config' does not
node_modules/npm/lib/search.js(72,16): error TS2339: Property 'color' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search.js(82,28): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search.js(82,55): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/all-package-metadata.js(33,30): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/all-package-metadata.js(36,35): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/all-package-metadata.js(146,7): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/all-package-metadata.js(239,20): error TS2339: Property 'cache' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/esearch.js(15,36): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/esearch.js(35,7): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/search/format-package-stream.js(130,31): error TS2339: Property 'fd' does not exist on type 'WriteStream'.
node_modules/npm/lib/search/format-package-stream.js(130,63): error TS2339: Property 'getWindowSize' does not exist on type 'WriteStream'.
node_modules/npm/lib/set.js(8,22): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/set.js(12,7): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/shrinkwrap.js(30,29): error TS2339: Property 'lockfileVersion' does not exist on type 'EventEmitter'.
node_modules/npm/lib/shrinkwrap.js(48,22): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/shrinkwrap.js(49,22): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/shrinkwrap.js(53,38): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/shrinkwrap.js(60,34): error TS2339: Property 'localPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/shrinkwrap.js(115,13): error TS2339: Property 'version' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(117,15): error TS2339: Property 'bundled' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(120,17): error TS2339: Property 'resolved' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(126,17): error TS2339: Property 'integrity' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(127,22): error TS2339: Property 'integrity' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(128,19): error TS2339: Property 'integrity' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(132,33): error TS2339: Property 'dev' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(133,40): error TS2339: Property 'optional' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(135,15): error TS2339: Property 'requires' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(138,17): error TS2339: Property 'requires' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(142,15): error TS2339: Property 'dependencies' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(143,30): error TS2339: Property 'dependencies' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(50,22): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/shrinkwrap.js(51,22): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/shrinkwrap.js(55,38): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/shrinkwrap.js(62,34): error TS2339: Property 'localPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/shrinkwrap.js(117,13): error TS2339: Property 'version' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(119,15): error TS2339: Property 'from' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(122,15): error TS2339: Property 'bundled' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(125,17): error TS2339: Property 'resolved' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(131,17): error TS2339: Property 'integrity' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(132,22): error TS2339: Property 'integrity' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(133,19): error TS2339: Property 'integrity' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(137,33): error TS2339: Property 'dev' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(138,40): error TS2339: Property 'optional' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(140,15): error TS2339: Property 'requires' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(143,17): error TS2339: Property 'requires' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(147,15): error TS2339: Property 'dependencies' does not exist on type '{}'.
node_modules/npm/lib/shrinkwrap.js(148,30): error TS2339: Property 'dependencies' does not exist on type '{}'.
node_modules/npm/lib/star.js(24,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/star.js(25,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/star.js(26,21): error TS2339: Property 'command' does not exist on type 'EventEmitter'.
@@ -753,9 +805,9 @@ node_modules/npm/lib/utils/error-handler.js(216,18): error TS2339: Property 'err
node_modules/npm/lib/utils/error-handler.js(216,42): error TS2339: Property 'errno' does not exist on type 'Error'.
node_modules/npm/lib/utils/error-handler.js(231,34): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/utils/error-handler.js(236,7): error TS2322: Type 'string' is not assignable to type 'any[]'.
node_modules/npm/lib/utils/error-message.js(66,37): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/utils/error-message.js(295,24): error TS2339: Property 'version' does not exist on type 'EventEmitter'.
node_modules/npm/lib/utils/error-message.js(296,25): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/utils/error-message.js(77,37): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/utils/error-message.js(300,24): error TS2339: Property 'version' does not exist on type 'EventEmitter'.
node_modules/npm/lib/utils/error-message.js(301,25): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/utils/git.js(9,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/utils/is-windows-bash.js(3,53): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
@@ -782,7 +834,6 @@ node_modules/npm/lib/utils/metrics.js(65,9): error TS2339: Property 'registry' d
node_modules/npm/lib/utils/parse-json.js(7,11): error TS2339: Property 'noExceptions' does not exist on type '(content: any) => any'.
node_modules/npm/lib/utils/perf.js(9,12): error TS2345: Argument of type '"time"' is not assignable to parameter of type 'Signals'.
node_modules/npm/lib/utils/perf.js(10,12): error TS2345: Argument of type '"timeEnd"' is not assignable to parameter of type 'Signals'.
node_modules/npm/lib/utils/perf.js(21,18): error TS2345: Argument of type '"timing"' is not assignable to parameter of type '"removeListener"'.
node_modules/npm/lib/utils/read-local-package.js(7,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/utils/read-local-package.js(9,29): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/utils/spawn.js(26,8): error TS2339: Property 'file' does not exist on type 'Error'.
@@ -814,21 +865,23 @@ node_modules/npm/lib/version.js(297,20): error TS2339: Property 'config' does no
node_modules/npm/lib/version.js(306,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/version.js(324,44): error TS2339: Property 'localPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/version.js(336,19): error TS2339: Property 'localPrefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(26,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(27,47): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(30,9): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(80,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(85,19): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(107,35): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(109,27): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(112,9): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(257,13): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(260,38): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(264,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(267,74): error TS2339: Property 'color' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(269,47): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(272,16): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(281,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(35,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(36,47): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(39,9): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(89,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(94,19): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(116,35): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(118,27): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(121,9): error TS2339: Property 'registry' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(168,14): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(185,23): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(405,13): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(408,38): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(412,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(415,74): error TS2339: Property 'color' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(417,47): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(420,16): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/view.js(429,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/visnup.js(41,14): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/lib/whoami.js(15,22): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
node_modules/npm/lib/whoami.js(18,18): error TS2339: Property 'config' does not exist on type 'EventEmitter'.
@@ -851,9 +904,9 @@ node_modules/npm/test/broken-under-nyc-and-travis/whoami.js(7,20): error TS2307:
node_modules/npm/test/common-tap.js(5,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'.
node_modules/npm/test/common-tap.js(10,3): error TS2322: Type '(...args: any[]) => void' is not assignable to type 'typeof setImmediate'.
Property '__promisify__' is missing in type '(...args: any[]) => void'.
node_modules/npm/test/common-tap.js(170,17): error TS2339: Property '_storage' does not exist on type 'Environment'.
node_modules/npm/test/common-tap.js(176,31): error TS2339: Property '_storage' does not exist on type 'Environment'.
node_modules/npm/test/common-tap.js(187,12): error TS2339: Property '_storage' does not exist on type 'Environment'.
node_modules/npm/test/common-tap.js(175,17): error TS2339: Property '_storage' does not exist on type 'Environment'.
node_modules/npm/test/common-tap.js(181,31): error TS2339: Property '_storage' does not exist on type 'Environment'.
node_modules/npm/test/common-tap.js(192,12): error TS2339: Property '_storage' does not exist on type 'Environment'.
node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(2,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(4,19): error TS2307: Cannot find module '../../lib/npm.js'.
node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(5,22): error TS2307: Cannot find module '../common-tap.js'.
@@ -1133,8 +1186,6 @@ node_modules/npm/test/tap/false-name.js(17,20): error TS2307: Cannot find module
node_modules/npm/test/tap/fetch-package-metadata.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'.
node_modules/npm/test/tap/fetch-package-metadata.js(9,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/fetch-package-metadata.js(36,7): error TS2339: Property 'load' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/files-and-ignores.js(2,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/files-and-ignores.js(12,21): error TS2307: Cannot find module 'tacks'.
node_modules/npm/test/tap/full-warning-messages.js(2,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/gently-rm-cmdshims.js(4,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/gently-rm-cmdshims.js(107,7): error TS2339: Property 'load' does not exist on type 'EventEmitter'.
@@ -1185,6 +1236,14 @@ node_modules/npm/test/tap/graceful-restart.js(7,20): error TS2307: Cannot find m
node_modules/npm/test/tap/help.js(1,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/ignore-install-link.js(6,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/ignore-scripts.js(6,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/init-create.js(2,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/init-create.js(3,29): error TS2307: Cannot find module 'require-inject'.
node_modules/npm/test/tap/init-create.js(25,7): error TS2339: Property 'load' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/init-create.js(42,7): error TS2339: Property 'load' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/init-create.js(47,16): error TS2339: Property 'parseArgs' does not exist on type '() => Promise<void>'.
node_modules/npm/test/tap/init-create.js(53,16): error TS2339: Property 'parseArgs' does not exist on type '() => Promise<void>'.
node_modules/npm/test/tap/init-create.js(68,7): error TS2339: Property 'load' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/init-create.js(74,16): error TS2339: Property 'parseArgs' does not exist on type '() => Promise<void>'.
node_modules/npm/test/tap/init-interrupt.js(3,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/init-interrupt.js(8,29): error TS2307: Cannot find module 'require-inject'.
node_modules/npm/test/tap/init-interrupt.js(28,7): error TS2339: Property 'load' does not exist on type 'EventEmitter'.
@@ -1251,11 +1310,12 @@ node_modules/npm/test/tap/install-scoped-with-bundled-dependency.js(3,20): error
node_modules/npm/test/tap/install-scoped-with-bundled-dependency.js(4,21): error TS2307: Cannot find module 'tacks'.
node_modules/npm/test/tap/install-scoped-with-bundled-dependency.js(7,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'.
node_modules/npm/test/tap/install-scoped-with-peer-dependency.js(7,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/install-shrinkwrapped-git.js(7,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/install-shrinkwrapped-git.js(53,12): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/install-shrinkwrapped-git.js(57,12): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/install-shrinkwrapped-git.js(62,12): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/install-shrinkwrapped-git.js(94,7): error TS2339: Property 'load' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/install-shrinkwrapped-git.js(9,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/install-shrinkwrapped-git.js(56,12): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/install-shrinkwrapped-git.js(60,12): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/install-shrinkwrapped-git.js(65,12): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/install-shrinkwrapped-git.js(106,7): error TS2339: Property 'load' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/install-test-cli-without-package-lock.js(7,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/install-windows-newlines.js(3,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'.
node_modules/npm/test/tap/install-windows-newlines.js(7,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/install-with-dev-dep-duplicate.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'.
@@ -1389,7 +1449,10 @@ node_modules/npm/test/tap/outdated.js(105,15): error TS2339: Property 'outdated'
node_modules/npm/test/tap/override-bundled.js(3,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/owner.js(1,18): error TS2307: Cannot find module 'npm-registry-mock'.
node_modules/npm/test/tap/owner.js(2,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/pack-files-and-ignores.js(2,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/pack-files-and-ignores.js(12,21): error TS2307: Cannot find module 'tacks'.
node_modules/npm/test/tap/pack-scoped.js(2,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/pack.js(5,22): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/peer-deps.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'.
node_modules/npm/test/tap/peer-deps.js(8,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(2,20): error TS2307: Cannot find module 'tap'.
@@ -1449,6 +1512,10 @@ node_modules/npm/test/tap/publish-invalid-semver-tag.js(64,7): error TS2339: Pro
node_modules/npm/test/tap/publish-invalid-semver-tag.js(65,7): error TS2339: Property 'commands' does not exist on type 'EventEmitter'.
node_modules/npm/test/tap/publish-scoped.js(4,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/publish-scoped.js(8,18): error TS2307: Cannot find module 'npm-registry-mock'.
node_modules/npm/test/tap/publish.js(8,33): error TS2307: Cannot find module 'npm-registry-mock'.
node_modules/npm/test/tap/publish.js(11,22): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/publish.js(56,47): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string | RegExp'.
node_modules/npm/test/tap/publish.js(117,45): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string | RegExp'.
node_modules/npm/test/tap/pwd-prefix.js(5,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/referer.js(2,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/repo.js(2,18): error TS2307: Cannot find module 'npm-registry-mock'.
@@ -1463,6 +1530,10 @@ node_modules/npm/test/tap/run-script.js(213,18): error TS2345: Argument of type
Type 'undefined' is not assignable to type 'string'.
node_modules/npm/test/tap/run-script.js(256,18): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
node_modules/npm/test/tap/save-optional.js(3,22): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/save-optional.js(4,20): error TS2307: Cannot find module 'npm-registry-mock'.
node_modules/npm/test/tap/save-optional.js(5,23): error TS2307: Cannot find module 'tacks'.
node_modules/npm/test/tap/save-optional.js(70,30): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'.
node_modules/npm/test/tap/scope-header.js(3,20): error TS2307: Cannot find module 'tap'.
node_modules/npm/test/tap/scope-header.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'.
node_modules/npm/test/tap/scope-header.js(5,21): error TS2307: Cannot find module 'tacks'.
+12 -12
View File
@@ -25,15 +25,6 @@ lib/ExecutionContext.js(19,7): error TS2300: Duplicate identifier 'ExecutionCont
lib/ExecutionContext.js(22,15): error TS2503: Cannot find namespace 'Protocol'.
lib/ExecutionContext.js(132,15): error TS2503: Cannot find namespace 'Protocol'.
lib/ExecutionContext.js(225,19): error TS2300: Duplicate identifier 'ExecutionContext'.
lib/externs.d.ts(2,30): error TS2497: Module '"/puppeteer/puppeteer/lib/Browser"' resolves to a non-module entity and cannot be imported using this construct.
lib/externs.d.ts(3,29): error TS2497: Module '"/puppeteer/puppeteer/lib/Target"' resolves to a non-module entity and cannot be imported using this construct.
lib/externs.d.ts(5,32): error TS2497: Module '"/puppeteer/puppeteer/lib/TaskQueue"' resolves to a non-module entity and cannot be imported using this construct.
lib/externs.d.ts(9,37): error TS2497: Module '"/puppeteer/puppeteer/lib/ElementHandle"' resolves to a non-module entity and cannot be imported using this construct.
lib/externs.d.ts(16,26): error TS2503: Cannot find namespace 'Protocol'.
lib/externs.d.ts(16,69): error TS2503: Cannot find namespace 'Protocol'.
lib/externs.d.ts(17,28): error TS2503: Cannot find namespace 'Protocol'.
lib/externs.d.ts(17,81): error TS2503: Cannot find namespace 'Protocol'.
lib/externs.d.ts(17,121): error TS2503: Cannot find namespace 'Protocol'.
lib/FrameManager.js(25,7): error TS2300: Duplicate identifier 'FrameManager'.
lib/FrameManager.js(28,15): error TS2503: Cannot find namespace 'Protocol'.
lib/FrameManager.js(54,15): error TS2503: Cannot find namespace 'Protocol'.
@@ -41,9 +32,6 @@ lib/FrameManager.js(76,15): error TS2503: Cannot find namespace 'Protocol'.
lib/FrameManager.js(127,15): error TS2503: Cannot find namespace 'Protocol'.
lib/FrameManager.js(773,15): error TS2503: Cannot find namespace 'Protocol'.
lib/FrameManager.js(998,19): error TS2300: Duplicate identifier 'FrameManager'.
lib/helper.js(59,15): error TS2503: Cannot find namespace 'Protocol'.
lib/helper.js(77,15): error TS2503: Cannot find namespace 'Protocol'.
lib/helper.js(101,15): error TS2503: Cannot find namespace 'Protocol'.
lib/Input.js(29,7): error TS2300: Duplicate identifier 'Keyboard'.
lib/Input.js(306,20): error TS2300: Duplicate identifier 'Keyboard'.
lib/NetworkManager.js(129,15): error TS2503: Cannot find namespace 'Protocol'.
@@ -62,6 +50,18 @@ lib/Page.js(185,15): error TS2503: Cannot find namespace 'Protocol'.
lib/Page.js(394,22): error TS2503: Cannot find namespace 'Protocol'.
lib/Page.js(407,15): error TS2503: Cannot find namespace 'Protocol'.
lib/Page.js(731,19): error TS2503: Cannot find namespace 'Protocol'.
lib/externs.d.ts(2,30): error TS2497: Module '"/puppeteer/puppeteer/lib/Browser"' resolves to a non-module entity and cannot be imported using this construct.
lib/externs.d.ts(3,29): error TS2497: Module '"/puppeteer/puppeteer/lib/Target"' resolves to a non-module entity and cannot be imported using this construct.
lib/externs.d.ts(5,32): error TS2497: Module '"/puppeteer/puppeteer/lib/TaskQueue"' resolves to a non-module entity and cannot be imported using this construct.
lib/externs.d.ts(9,37): error TS2497: Module '"/puppeteer/puppeteer/lib/ElementHandle"' resolves to a non-module entity and cannot be imported using this construct.
lib/externs.d.ts(16,26): error TS2503: Cannot find namespace 'Protocol'.
lib/externs.d.ts(16,69): error TS2503: Cannot find namespace 'Protocol'.
lib/externs.d.ts(17,28): error TS2503: Cannot find namespace 'Protocol'.
lib/externs.d.ts(17,81): error TS2503: Cannot find namespace 'Protocol'.
lib/externs.d.ts(17,121): error TS2503: Cannot find namespace 'Protocol'.
lib/helper.js(59,15): error TS2503: Cannot find namespace 'Protocol'.
lib/helper.js(77,15): error TS2503: Cannot find namespace 'Protocol'.
lib/helper.js(101,15): error TS2503: Cannot find namespace 'Protocol'.
node_modules/@types/node/index.d.ts(911,22): error TS2300: Duplicate identifier 'EventEmitter'.
+59 -59
View File
@@ -5,67 +5,67 @@ node_modules/uglify-js/lib/ast.js(329,33): error TS2339: Property 'transform' do
node_modules/uglify-js/lib/ast.js(857,5): error TS2322: Type '{ [x: string]: any; _visit: (node: any, descend: any) => any; parent: (n: any) => any; push: type...' is not assignable to type 'TreeWalker'.
Object literal may only specify known properties, but '_visit' does not exist in type 'TreeWalker'. Did you mean to write 'visit'?
node_modules/uglify-js/lib/compress.js(165,27): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(500,26): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(813,18): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(1061,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(1075,51): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'true | ((node: any) => any)' has no compatible call signatures.
node_modules/uglify-js/lib/compress.js(1139,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(1181,112): error TS2532: Object is possibly 'undefined'.
node_modules/uglify-js/lib/compress.js(1182,29): error TS2532: Object is possibly 'undefined'.
node_modules/uglify-js/lib/compress.js(1191,87): error TS2322: Type 'false' is not assignable to type 'number'.
node_modules/uglify-js/lib/compress.js(1199,29): error TS2322: Type 'false' is not assignable to type 'never'.
node_modules/uglify-js/lib/compress.js(1297,38): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(1390,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(1487,27): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(1519,26): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(1933,44): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(2125,19): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(2385,27): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3125,23): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3138,33): error TS2322: Type '"f"' is not assignable to type 'boolean'.
node_modules/uglify-js/lib/compress.js(3275,18): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3285,33): error TS2339: Property 'add' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3289,32): error TS2339: Property 'add' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3295,40): error TS2339: Property 'add' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3304,41): error TS2339: Property 'add' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3321,14): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3323,40): error TS2339: Property 'get' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3331,33): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(3405,63): error TS2339: Property 'get' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3594,23): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3611,36): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(3617,38): error TS2339: Property 'set' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3621,40): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(3646,22): error TS2339: Property 'each' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3651,30): error TS2339: Property 'del' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3656,30): error TS2339: Property 'set' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3667,41): error TS2339: Property 'has' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3669,48): error TS2339: Property 'get' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(506,26): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(820,18): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(1075,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(1089,51): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'true | ((node: any) => any)' has no compatible call signatures.
node_modules/uglify-js/lib/compress.js(1153,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(1195,112): error TS2532: Object is possibly 'undefined'.
node_modules/uglify-js/lib/compress.js(1196,29): error TS2532: Object is possibly 'undefined'.
node_modules/uglify-js/lib/compress.js(1205,87): error TS2322: Type 'false' is not assignable to type 'number'.
node_modules/uglify-js/lib/compress.js(1213,29): error TS2322: Type 'false' is not assignable to type 'never'.
node_modules/uglify-js/lib/compress.js(1311,38): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(1404,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(1501,27): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(1533,26): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(1947,44): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(2139,19): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(2399,27): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3139,23): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3152,33): error TS2322: Type '"f"' is not assignable to type 'boolean'.
node_modules/uglify-js/lib/compress.js(3289,18): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3299,33): error TS2339: Property 'add' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3303,32): error TS2339: Property 'add' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3309,40): error TS2339: Property 'add' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3318,41): error TS2339: Property 'add' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3335,14): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3337,40): error TS2339: Property 'get' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3345,33): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(3419,63): error TS2339: Property 'get' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3608,23): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3625,36): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(3631,38): error TS2339: Property 'set' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3635,40): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
node_modules/uglify-js/lib/compress.js(3660,22): error TS2339: Property 'each' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3665,30): error TS2339: Property 'del' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3670,30): error TS2339: Property 'set' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3681,41): error TS2339: Property 'has' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3683,48): error TS2339: Property 'get' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3789,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'defs' must be of type 'Dictionary', but here has type 'any'.
node_modules/uglify-js/lib/compress.js(3791,36): error TS2339: Property 'get' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3820,22): error TS2339: Property 'set' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3840,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead.
node_modules/uglify-js/lib/compress.js(3865,30): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(4003,18): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(4302,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'.
node_modules/uglify-js/lib/compress.js(4386,22): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(4734,30): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(4741,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ [x: string]: any; get: () => string; toString: () => string; indent: () => void; indentation: (...'.
node_modules/uglify-js/lib/compress.js(4745,36): error TS2532: Object is possibly 'undefined'.
node_modules/uglify-js/lib/compress.js(4750,41): error TS2339: Property 'get' does not exist on type 'string'.
node_modules/uglify-js/lib/compress.js(5237,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned.
node_modules/uglify-js/lib/compress.js(5676,25): error TS2365: Operator '==' cannot be applied to types 'boolean' and '"f"'.
node_modules/uglify-js/lib/compress.js(5703,32): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(5763,24): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(5835,24): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(5841,26): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(6191,43): error TS2454: Variable 'property' is used before being assigned.
node_modules/uglify-js/lib/compress.js(6205,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'.
node_modules/uglify-js/lib/compress.js(6208,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'.
node_modules/uglify-js/lib/compress.js(6215,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'.
node_modules/uglify-js/lib/compress.js(6268,19): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(3695,41): error TS2339: Property 'has' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3697,48): error TS2339: Property 'get' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3803,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'defs' must be of type 'Dictionary', but here has type 'any'.
node_modules/uglify-js/lib/compress.js(3805,36): error TS2339: Property 'get' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3834,22): error TS2339: Property 'set' does not exist on type 'Dictionary'.
node_modules/uglify-js/lib/compress.js(3854,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead.
node_modules/uglify-js/lib/compress.js(3879,30): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(4017,18): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(4316,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'.
node_modules/uglify-js/lib/compress.js(4400,22): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(4748,30): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(4755,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ [x: string]: any; get: () => string; toString: () => string; indent: () => void; indentation: (...'.
node_modules/uglify-js/lib/compress.js(4759,36): error TS2532: Object is possibly 'undefined'.
node_modules/uglify-js/lib/compress.js(4764,41): error TS2339: Property 'get' does not exist on type 'string'.
node_modules/uglify-js/lib/compress.js(5251,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned.
node_modules/uglify-js/lib/compress.js(5690,25): error TS2365: Operator '==' cannot be applied to types 'boolean' and '"f"'.
node_modules/uglify-js/lib/compress.js(5717,32): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(5777,24): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(5849,24): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(5855,26): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(6205,43): error TS2454: Variable 'property' is used before being assigned.
node_modules/uglify-js/lib/compress.js(6219,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'.
node_modules/uglify-js/lib/compress.js(6222,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'.
node_modules/uglify-js/lib/compress.js(6229,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'.
node_modules/uglify-js/lib/compress.js(6282,19): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/minify.js(166,75): error TS2339: Property 'compress' does not exist on type 'Compressor'.
node_modules/uglify-js/lib/mozilla-ast.js(569,18): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/output.js(481,22): error TS2554: Expected 0 arguments, but got 1.
@@ -0,0 +1,3 @@
type Loop<T, U extends Loop<T, U>> = {
[P in keyof T]: U[P] extends boolean ? number : string;
};
@@ -0,0 +1,14 @@
// @jsx: preserve
const emptyMessage = null as any;
const a = (
<div>
{0 ? (
emptyMessage // must be identifier?
) : (
// must be exactly two expression holes
<span>
{0}{0}
</span>
)}
</div>
);
@@ -0,0 +1,10 @@
// @traceResolution: true
// @Filename: /node_modules/foo/package.json
{ "name": "foo", "version": "1.2.3", "main": "src/index.js" }
// @Filename: /node_modules/foo/src/index.d.ts
export const x: number;
// @Filename: /index.ts
import { x } from "foo";
@@ -0,0 +1,4 @@
const x = (a: any[]) => (
// comment
undefined as number
);
@@ -7,6 +7,7 @@ const { a, b } = o;
const { c, d } = o;
d;
const { e } = o;
const { f: g } = o;
function f({ a, b }, { c, d }, { e }) {
d;
@@ -0,0 +1,10 @@
// @noEmit: true
// @allowJs: true
// @checkJs: true
// #24131
// @Filename: a.js
const a = {};
a.d = function() {};
// @Filename: b.js
a.d.prototype = {};
@@ -1,7 +1,7 @@
/// <reference path='fourslash.ts'/>
////function /*11*/m2f(x: number) { };
////namespace m2f { export interface I { foo(): void } }
////namespace m2f { export interface I { foo(): void } }
////var x: m2f./*1*/
////var /*2*/r = m2f/*3*/;
@@ -18,4 +18,4 @@ verify.quickInfoAt("2", "var r: (x: number) => void");
goTo.marker('3');
edit.insert('(');
verify.currentSignatureHelpIs('m2f(x: number): void');
verify.signatureHelp({ text: "m2f(x: number): void" });
@@ -1,7 +1,7 @@
/// <reference path='fourslash.ts'/>
////function m2g() { };
////module m2g { export class C { foo(x: number) { } } }
////module m2g { export class C { foo(x: number) { } } }
////var x: m2g./*1*/;
////var /*2*/r = m2g/*3*/;
@@ -16,4 +16,4 @@ verify.quickInfoAt("2", "var r: typeof m2g");
goTo.marker('3');
edit.insert('(');
verify.currentSignatureHelpIs('m2g(): void');
verify.signatureHelp({ text: "m2g(): void" });
@@ -13,8 +13,7 @@ edit.insert('I;');
verify.completions({ marker: "2", includes: "m3f" });
goTo.marker('3');
verify.currentSignatureHelpIs('m3f(): m3f');
verify.signatureHelp({ marker: "3", text: "m3f(): m3f" });
verify.quickInfoAt("4", "var r: m3f");
@@ -23,4 +22,4 @@ edit.insert('foo(1)');
verify.completions({ marker: "6", includes: "foo" });
edit.insert('foo(');
verify.currentSignatureHelpIs('foo(): void');
verify.signatureHelp({ text: "foo(): void" });
+1 -2
View File
@@ -6,5 +6,4 @@
////var c: C;
////c(/**/
goTo.marker();
verify.currentSignatureHelpIs('c(): number');
verify.signatureHelp({ marker: "", text: "c(): number" });
@@ -13,6 +13,8 @@
////var i: I;
////i.foo(/**/
goTo.marker();
verify.signatureHelpCountIs(2);
verify.currentParameterSpanIs('x: string');
verify.signatureHelp({
marker: "",
overloadsCount: 2,
parameterSpan: "x: string",
});

Some files were not shown because too many files have changed in this diff Show More