mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into deferIndexedAccess
# Conflicts: # src/compiler/checker.ts # tests/baselines/reference/keyofAndIndexedAccess.js # tests/baselines/reference/keyofAndIndexedAccess.symbols # tests/baselines/reference/keyofAndIndexedAccess.types # tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts
This commit is contained in:
@@ -172,4 +172,45 @@ zhongsp <patrick.zhongsp@gmail.com> # Patrick Zhong
|
||||
T18970237136 <T18970237136@users.noreply.github.com> # @T18970237136
|
||||
JBerger <JBerger@melco.com>
|
||||
bootstraponline <code@bootstraponline.com> # @bootstraponline
|
||||
yortus <yortus@gmail.com> # @yortus
|
||||
yortus <yortus@gmail.com> # @yortus
|
||||
András Parditka <andraaspar@gmail.com>
|
||||
Anton Khlynovskiy <subzey@gmail.com>
|
||||
Charly POLY <cpoly55@gmail.com>
|
||||
Cotton Hou <himcotton@gmail.com>
|
||||
Ethan Resnick <ethan.resnick@gmail.com>
|
||||
Marius Schulz <marius.schulz@me.com>
|
||||
Mattias Buelens <mattias.buelens@gmail.com>
|
||||
Myles Megyesi <mylesmegyesi@users.noreply.github.com>
|
||||
Tim Lancina <tim@ionic.io>
|
||||
Aaron Holmes <aaron@aaronholmes.net> Aaron Holmes <aholmes@bltomato.com>
|
||||
Akshar Patel <akshar.patel.47@gmail.com>
|
||||
Ali Sabzevari <alisabzevari@gmail.com>
|
||||
Aliaksandr Radzivanovich <aradzivanovich@gmail.com>
|
||||
BuildTools <FranklinWhale@users.noreply.github.com> # Franklin Tse
|
||||
ChogyDan <danielhollocher@gmail.com> # Daniel Hollocher
|
||||
Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> Daniel Rosenwasser <drosen@microsoft.com>
|
||||
David Kmenta <david.kmenta@lmc.eu>
|
||||
E020873 <nicolas.henry-partner@arcelormittal.com> # Nicolas Henry
|
||||
Elisée Maurer <elisee@sparklinlabs.com>
|
||||
Emilio García-Pumarino <emili.tfe@gmail.com> dashaus <emili.tfe@gmail.com>
|
||||
Guilherme Oenning <me@goenning.net>
|
||||
Herrington Darkholme <nonamesheep1@gmail.com>
|
||||
Ivo Gabe de Wolff <ivogabe@ivogabe.nl>
|
||||
Joey Wilson <joey.wilson.a@gmail.com>
|
||||
Jonathon Smith <failing@crashdive.co.uk>
|
||||
Juan Luis Boya García <ntrrgc@gmail.com>
|
||||
Kagami Sascha Rosylight <saschanaz@outlook.com>
|
||||
Lucien Greathouse <me@lpghatguy.com>
|
||||
Martin Vseticka <vseticka.martin@gmail.com>
|
||||
Mattias Buelens <mattias.buelens@opentelly.com>
|
||||
Michael Bromley <michael@michaelbromley.co.uk>
|
||||
Paul Jolly <paul@myitcv.org.uk>
|
||||
Perry Jiang <jiangperry@gmail.com>
|
||||
Peter Burns <rictic@google.com>
|
||||
Robert Coie <rac@intrigue.com>
|
||||
Thomas Loubiou <t.loubiou@systonic.fr>
|
||||
Tim Perry <tim.perry@softwire.com>
|
||||
Vidar Tonaas Fauske <vidartf@gmail.com>
|
||||
Viktor Zozulyak <zozulyakviktor@gmail.com>
|
||||
rix <rix@rixs-MacBook-Pro.local> # Richard Sentino
|
||||
rohitverma007 <rohitverma@live.ca> # Rohit Verma
|
||||
+33
@@ -1,17 +1,23 @@
|
||||
TypeScript is authored by:
|
||||
* Aaron Holmes
|
||||
* Abubaker Bashir
|
||||
* Adam Freidin
|
||||
* Adi Dahiya
|
||||
* Ahmad Farid
|
||||
* Akshar Patel
|
||||
* Alex Eagle
|
||||
* Alexander Kuvaev
|
||||
* Alexander Rusakov
|
||||
* Ali Sabzevari
|
||||
* Aliaksandr Radzivanovich
|
||||
* Anatoly Ressin
|
||||
* Anders Hejlsberg
|
||||
* Andrej Baran
|
||||
* Andrew Z Allen
|
||||
* András Parditka
|
||||
* Andy Hanson
|
||||
* Anil Anar
|
||||
* Anton Khlynovskiy
|
||||
* Anton Tolmachev
|
||||
* Arnav Singh
|
||||
* Arthur Ozga
|
||||
@@ -27,16 +33,20 @@ TypeScript is authored by:
|
||||
* Brett Mayen
|
||||
* Bryan Forbes
|
||||
* Caitlin Potter
|
||||
* Charly POLY
|
||||
* Chris Bubernak
|
||||
* Christophe Vidal
|
||||
* Chuck Jazdzewski
|
||||
* Colby Russell
|
||||
* Colin Snover
|
||||
* Cotton Hou
|
||||
* Cyrus Najmabadi
|
||||
* Dafrok Zhang
|
||||
* Dan Corder
|
||||
* Dan Quirk
|
||||
* Daniel Hollocher
|
||||
* Daniel Rosenwasser
|
||||
* David Kmenta
|
||||
* David Li
|
||||
* David Souther
|
||||
* Denis Nedelyaev
|
||||
@@ -45,8 +55,11 @@ TypeScript is authored by:
|
||||
* Dirk Holtwick
|
||||
* Dom Chen
|
||||
* Doug Ilijev
|
||||
* Elisée Maurer
|
||||
* Emilio García-Pumarino
|
||||
* Eric Tsang
|
||||
* Erik Edrosa
|
||||
* Ethan Resnick
|
||||
* Ethan Rubio
|
||||
* Evan Martin
|
||||
* Evan Sebastian
|
||||
@@ -54,12 +67,14 @@ TypeScript is authored by:
|
||||
* Fabian Cook
|
||||
* @falsandtru
|
||||
* Frank Wallis
|
||||
* Franklin Tse
|
||||
* František Žiacik
|
||||
* Gabe Moothart
|
||||
* Gabriel Isenberg
|
||||
* Gilad Peleg
|
||||
* Godfrey Chan
|
||||
* Graeme Wicksted
|
||||
* Guilherme Oenning
|
||||
* Guillaume Salles
|
||||
* Guy Bedford
|
||||
* Harald Niesche
|
||||
@@ -78,12 +93,14 @@ TypeScript is authored by:
|
||||
* Jeffrey Morlan
|
||||
* Jesse Schalken
|
||||
* Jiri Tobisek
|
||||
* Joey Wilson
|
||||
* Johannes Rieken
|
||||
* John Vilk
|
||||
* Jonathan Bond-Caron
|
||||
* Jonathan Park
|
||||
* Jonathan Toland
|
||||
* Jonathan Turner
|
||||
* Jonathon Smith
|
||||
* Josh Abernathy
|
||||
* Josh Kalderimis
|
||||
* Josh Soref
|
||||
@@ -102,15 +119,21 @@ TypeScript is authored by:
|
||||
* Lucien Greathouse
|
||||
* Lukas Elmer
|
||||
* Marin Marinov
|
||||
* Marius Schulz
|
||||
* Martin Vseticka
|
||||
* Masahiro Wakame
|
||||
* Matt McCutchen
|
||||
* Mattias Buelens
|
||||
* Mattias Buelens
|
||||
* Max Deepfield
|
||||
* Micah Zoltu
|
||||
* Michael
|
||||
* Michael Bromley
|
||||
* Mohamed Hegazy
|
||||
* Myles Megyesi
|
||||
* Nathan Shively-Sanders
|
||||
* Nathan Yee
|
||||
* Nicolas Henry
|
||||
* Nima Zahedi
|
||||
* Noah Chen
|
||||
* Noj Vek
|
||||
@@ -119,9 +142,12 @@ TypeScript is authored by:
|
||||
* Omer Sheikh
|
||||
* Oskar Segersva¨rd
|
||||
* Patrick Zhong
|
||||
* Paul Jolly
|
||||
* Paul van Brenk
|
||||
* @pcbro
|
||||
* Pedro Maltez
|
||||
* Perry Jiang
|
||||
* Peter Burns
|
||||
* Philip Bulley
|
||||
* Piero Cangianiello
|
||||
* @piloopin
|
||||
@@ -130,6 +156,9 @@ TypeScript is authored by:
|
||||
* Punya Biswal
|
||||
* Rado Kirov
|
||||
* Richard Knoll
|
||||
* Richard Sentino
|
||||
* Robert Coie
|
||||
* Rohit Verma
|
||||
* Ron Buckton
|
||||
* Rostislav Galimsky
|
||||
* Rowan Wyborn
|
||||
@@ -152,7 +181,9 @@ TypeScript is authored by:
|
||||
* @T18970237136
|
||||
* Tarik Ozket
|
||||
* Tetsuharu Ohzeki
|
||||
* Thomas Loubiou
|
||||
* Tien Hoanhtien
|
||||
* Tim Lancina
|
||||
* Tim Perry
|
||||
* Tim Viiding-Spader
|
||||
* Tingan Ho
|
||||
@@ -161,6 +192,8 @@ TypeScript is authored by:
|
||||
* Tomas Grubliauskas
|
||||
* Torben Fitschen
|
||||
* TruongSinh Tran-Nguyen
|
||||
* Vidar Tonaas Fauske
|
||||
* Viktor Zozulyak
|
||||
* Vilic Vane
|
||||
* Vladimir Matveev
|
||||
* Wesley Wigham
|
||||
|
||||
+36
-24
@@ -2673,7 +2673,7 @@ namespace ts {
|
||||
}
|
||||
Debug.assert(bindingElement.kind === SyntaxKind.BindingElement);
|
||||
if (bindingElement.propertyName) {
|
||||
writer.writeSymbol(getTextOfNode(bindingElement.propertyName), bindingElement.symbol);
|
||||
writer.writeProperty(getTextOfNode(bindingElement.propertyName));
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
writeSpace(writer);
|
||||
}
|
||||
@@ -6065,6 +6065,9 @@ namespace ts {
|
||||
if (maybeTypeOfKind(indexType, TypeFlags.TypeVariable | TypeFlags.Index) ||
|
||||
maybeTypeOfKind(objectType, TypeFlags.TypeVariable) && !(accessNode && accessNode.kind === SyntaxKind.ElementAccessExpression) ||
|
||||
isGenericMappedType(objectType)) {
|
||||
if (objectType.flags & TypeFlags.Any) {
|
||||
return objectType;
|
||||
}
|
||||
// We first check that the index type is assignable to 'keyof T' for the object type.
|
||||
if (accessNode) {
|
||||
if (!isTypeAssignableTo(indexType, getIndexType(objectType))) {
|
||||
@@ -10450,6 +10453,29 @@ namespace ts {
|
||||
return baseConstructorType === nullWideningType;
|
||||
}
|
||||
|
||||
function checkThisBeforeSuper(node: Node, container: Node, diagnosticMessage: DiagnosticMessage) {
|
||||
const containingClassDecl = <ClassDeclaration>container.parent;
|
||||
const baseTypeNode = getClassExtendsHeritageClauseElement(containingClassDecl);
|
||||
|
||||
// If a containing class does not have extends clause or the class extends null
|
||||
// skip checking whether super statement is called before "this" accessing.
|
||||
if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
|
||||
const superCall = getSuperCallInConstructor(<ConstructorDeclaration>container);
|
||||
|
||||
// We should give an error in the following cases:
|
||||
// - No super-call
|
||||
// - "this" is accessing before super-call.
|
||||
// i.e super(this)
|
||||
// this.x; super();
|
||||
// We want to make sure that super-call is done before accessing "this" so that
|
||||
// "this" is not accessed as a parameter of the super-call.
|
||||
if (!superCall || superCall.end > node.pos) {
|
||||
// In ES6, super inside constructor of class-declaration has to precede "this" accessing
|
||||
error(node, diagnosticMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkThisExpression(node: Node): Type {
|
||||
// Stop at the first arrow function so that we can
|
||||
// tell whether 'this' needs to be captured.
|
||||
@@ -10457,26 +10483,7 @@ namespace ts {
|
||||
let needToCaptureLexicalThis = false;
|
||||
|
||||
if (container.kind === SyntaxKind.Constructor) {
|
||||
const containingClassDecl = <ClassDeclaration>container.parent;
|
||||
const baseTypeNode = getClassExtendsHeritageClauseElement(containingClassDecl);
|
||||
|
||||
// If a containing class does not have extends clause or the class extends null
|
||||
// skip checking whether super statement is called before "this" accessing.
|
||||
if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
|
||||
const superCall = getSuperCallInConstructor(<ConstructorDeclaration>container);
|
||||
|
||||
// We should give an error in the following cases:
|
||||
// - No super-call
|
||||
// - "this" is accessing before super-call.
|
||||
// i.e super(this)
|
||||
// this.x; super();
|
||||
// We want to make sure that super-call is done before accessing "this" so that
|
||||
// "this" is not accessed as a parameter of the super-call.
|
||||
if (!superCall || superCall.end > node.pos) {
|
||||
// In ES6, super inside constructor of class-declaration has to precede "this" accessing
|
||||
error(node, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
|
||||
}
|
||||
}
|
||||
checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
|
||||
}
|
||||
|
||||
// Now skip arrow functions to get the "real" owner of 'this'.
|
||||
@@ -10624,6 +10631,10 @@ namespace ts {
|
||||
return unknownType;
|
||||
}
|
||||
|
||||
if (!isCallExpression && container.kind === SyntaxKind.Constructor) {
|
||||
checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
|
||||
}
|
||||
|
||||
if ((getModifierFlags(container) & ModifierFlags.Static) || isCallExpression) {
|
||||
nodeCheckFlag = NodeCheckFlags.SuperStatic;
|
||||
}
|
||||
@@ -13512,13 +13523,14 @@ namespace ts {
|
||||
const containingClass = getContainingClass(node);
|
||||
if (containingClass) {
|
||||
const containingType = getTypeOfNode(containingClass);
|
||||
const baseTypes = getBaseTypes(<InterfaceType>containingType);
|
||||
if (baseTypes.length) {
|
||||
let baseTypes = getBaseTypes(containingType as InterfaceType);
|
||||
while (baseTypes.length) {
|
||||
const baseType = baseTypes[0];
|
||||
if (modifiers & ModifierFlags.Protected &&
|
||||
baseType.symbol === declaration.parent.symbol) {
|
||||
return true;
|
||||
}
|
||||
baseTypes = getBaseTypes(baseType as InterfaceType);
|
||||
}
|
||||
}
|
||||
if (modifiers & ModifierFlags.Private) {
|
||||
@@ -16244,7 +16256,7 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const onfulfilledParameterType = getTypeWithFacts(getUnionType(map(thenSignatures, getTypeOfFirstParameterOfSignature)), TypeFacts.NEUndefined);
|
||||
const onfulfilledParameterType = getTypeWithFacts(getUnionType(map(thenSignatures, getTypeOfFirstParameterOfSignature)), TypeFacts.NEUndefinedOrNull);
|
||||
if (isTypeAny(onfulfilledParameterType)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -549,14 +549,7 @@ namespace ts {
|
||||
|
||||
/* @internal */
|
||||
export function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) {
|
||||
const key = trimString((value || "")).toLowerCase();
|
||||
const map = opt.type;
|
||||
if (key in map) {
|
||||
return map[key];
|
||||
}
|
||||
else {
|
||||
errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
|
||||
}
|
||||
return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
|
||||
@@ -863,24 +863,6 @@ namespace ts {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduce the properties defined on a map-like (but not from its prototype chain).
|
||||
*
|
||||
* NOTE: This is intended for use with MapLike<T> objects. For Map<T> objects, use
|
||||
* reduceProperties instead as it offers better performance.
|
||||
*
|
||||
* @param map The map-like to reduce
|
||||
* @param callback An aggregation function that is called for each entry in the map
|
||||
* @param initial The initial value for the reduction.
|
||||
*/
|
||||
export function reduceOwnProperties<T, U>(map: MapLike<T>, callback: (aggregate: U, value: T, key: string) => U, initial: U): U {
|
||||
let result = initial;
|
||||
for (const key in map) if (hasOwnProperty.call(map, key)) {
|
||||
result = callback(result, map[key], String(key));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a shallow equality comparison of the contents of two map-likes.
|
||||
*
|
||||
|
||||
@@ -194,6 +194,7 @@ namespace ts {
|
||||
writer.writeSpace = writer.write;
|
||||
writer.writeStringLiteral = writer.writeLiteral;
|
||||
writer.writeParameter = writer.write;
|
||||
writer.writeProperty = writer.write;
|
||||
writer.writeSymbol = writer.write;
|
||||
setWriter(writer);
|
||||
}
|
||||
|
||||
@@ -3165,6 +3165,10 @@
|
||||
"category": "Error",
|
||||
"code": 17010
|
||||
},
|
||||
"'super' must be called before accessing a property of 'super' in the constructor of a derived class.": {
|
||||
"category": "Error",
|
||||
"code": 17011
|
||||
},
|
||||
|
||||
"Circularity detected while resolving configuration: {0}": {
|
||||
"category": "Error",
|
||||
|
||||
@@ -427,7 +427,7 @@ namespace ts {
|
||||
|
||||
encodeLastRecordedSourceMapSpan();
|
||||
|
||||
return stringify({
|
||||
return JSON.stringify({
|
||||
version: 3,
|
||||
file: sourceMapData.sourceMapFile,
|
||||
sourceRoot: sourceMapData.sourceMapSourceRoot,
|
||||
|
||||
@@ -2837,7 +2837,6 @@ namespace ts {
|
||||
// _super.call(this, a)
|
||||
// _super.m.call(this, a)
|
||||
// _super.prototype.m.call(this, a)
|
||||
|
||||
resultingCall = createFunctionCall(
|
||||
visitNode(target, visitor, isExpression),
|
||||
visitNode(thisArg, visitor, isExpression),
|
||||
|
||||
@@ -1223,11 +1223,12 @@ namespace ts {
|
||||
}
|
||||
|
||||
const { firstAccessor, secondAccessor, setAccessor } = getAllAccessorDeclarations(node.members, accessor);
|
||||
if (accessor !== firstAccessor) {
|
||||
const firstAccessorWithDecorators = firstAccessor.decorators ? firstAccessor : secondAccessor && secondAccessor.decorators ? secondAccessor : undefined;
|
||||
if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const decorators = firstAccessor.decorators || (secondAccessor && secondAccessor.decorators);
|
||||
const decorators = firstAccessorWithDecorators.decorators;
|
||||
const parameters = getDecoratorsOfParameters(setAccessor);
|
||||
if (!decorators && !parameters) {
|
||||
return undefined;
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
"stripInternal": true,
|
||||
"target": "es5",
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true
|
||||
"noUnusedParameters": true,
|
||||
"types": [ ]
|
||||
},
|
||||
"files": [
|
||||
"core.ts",
|
||||
|
||||
@@ -2407,6 +2407,7 @@ namespace ts {
|
||||
writeSpace(text: string): void;
|
||||
writeStringLiteral(text: string): void;
|
||||
writeParameter(text: string): void;
|
||||
writeProperty(text: string): void;
|
||||
writeSymbol(text: string, symbol: Symbol): void;
|
||||
writeLine(): void;
|
||||
increaseIndent(): void;
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace ts {
|
||||
writeSpace: writeText,
|
||||
writeStringLiteral: writeText,
|
||||
writeParameter: writeText,
|
||||
writeProperty: writeText,
|
||||
writeSymbol: writeText,
|
||||
|
||||
// Completely ignore indentation for string writers. And map newlines to
|
||||
@@ -3188,55 +3189,6 @@ namespace ts {
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize an object graph into a JSON string. This is intended only for use on an acyclic graph
|
||||
* as the fallback implementation does not check for circular references by default.
|
||||
*/
|
||||
export const stringify: (value: any) => string = typeof JSON !== "undefined" && JSON.stringify
|
||||
? JSON.stringify
|
||||
: stringifyFallback;
|
||||
|
||||
/**
|
||||
* Serialize an object graph into a JSON string.
|
||||
*/
|
||||
function stringifyFallback(value: any): string {
|
||||
// JSON.stringify returns `undefined` here, instead of the string "undefined".
|
||||
return value === undefined ? undefined : stringifyValue(value);
|
||||
}
|
||||
|
||||
function stringifyValue(value: any): string {
|
||||
return typeof value === "string" ? `"${escapeString(value)}"`
|
||||
: typeof value === "number" ? isFinite(value) ? String(value) : "null"
|
||||
: typeof value === "boolean" ? value ? "true" : "false"
|
||||
: typeof value === "object" && value ? isArray(value) ? cycleCheck(stringifyArray, value) : cycleCheck(stringifyObject, value)
|
||||
: /*fallback*/ "null";
|
||||
}
|
||||
|
||||
function cycleCheck(cb: (value: any) => string, value: any) {
|
||||
Debug.assert(!value.hasOwnProperty("__cycle"), "Converting circular structure to JSON");
|
||||
value.__cycle = true;
|
||||
const result = cb(value);
|
||||
delete value.__cycle;
|
||||
return result;
|
||||
}
|
||||
|
||||
function stringifyArray(value: any) {
|
||||
return `[${reduceLeft(value, stringifyElement, "")}]`;
|
||||
}
|
||||
|
||||
function stringifyElement(memo: string, value: any) {
|
||||
return (memo ? memo + "," : memo) + stringifyValue(value);
|
||||
}
|
||||
|
||||
function stringifyObject(value: any) {
|
||||
return `{${reduceOwnProperties(value, stringifyProperty, "")}}`;
|
||||
}
|
||||
|
||||
function stringifyProperty(memo: string, value: any, key: string) {
|
||||
return value === undefined || typeof value === "function" || key === "__cycle" ? memo
|
||||
: (memo ? memo + "," : memo) + `"${escapeString(key)}":${stringifyValue(value)}`;
|
||||
}
|
||||
|
||||
const base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
||||
|
||||
/**
|
||||
|
||||
@@ -607,23 +607,13 @@ namespace FourSlash {
|
||||
});
|
||||
}
|
||||
|
||||
public verifyMemberListContains(symbol: string, text?: string, documentation?: string, kind?: string) {
|
||||
const members = this.getMemberListAtCaret();
|
||||
if (members) {
|
||||
this.assertItemInCompletionList(members.entries, symbol, text, documentation, kind);
|
||||
}
|
||||
else {
|
||||
this.raiseError("Expected a member list, but none was provided");
|
||||
}
|
||||
}
|
||||
|
||||
public verifyMemberListCount(expectedCount: number, negative: boolean) {
|
||||
public verifyCompletionListCount(expectedCount: number, negative: boolean) {
|
||||
if (expectedCount === 0 && negative) {
|
||||
this.verifyMemberListIsEmpty(/*negative*/ false);
|
||||
this.verifyCompletionListIsEmpty(/*negative*/ false);
|
||||
return;
|
||||
}
|
||||
|
||||
const members = this.getMemberListAtCaret();
|
||||
const members = this.getCompletionListAtCaret();
|
||||
|
||||
if (members) {
|
||||
const match = members.entries.length === expectedCount;
|
||||
@@ -637,13 +627,6 @@ namespace FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyMemberListDoesNotContain(symbol: string) {
|
||||
const members = this.getMemberListAtCaret();
|
||||
if (members && members.entries.filter(e => e.name === symbol).length !== 0) {
|
||||
this.raiseError(`Member list did contain ${symbol}`);
|
||||
}
|
||||
}
|
||||
|
||||
public verifyCompletionListItemsCountIsGreaterThan(count: number, negative: boolean) {
|
||||
const completions = this.getCompletionListAtCaret();
|
||||
const itemsCount = completions.entries.length;
|
||||
@@ -685,16 +668,6 @@ namespace FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyMemberListIsEmpty(negative: boolean) {
|
||||
const members = this.getMemberListAtCaret();
|
||||
if ((!members || members.entries.length === 0) && negative) {
|
||||
this.raiseError("Member list is empty at Caret");
|
||||
}
|
||||
else if ((members && members.entries.length !== 0) && !negative) {
|
||||
this.raiseError(`Member list is not empty at Caret:\nMember List contains: ${stringify(members.entries.map(e => e.name))}`);
|
||||
}
|
||||
}
|
||||
|
||||
public verifyCompletionListIsEmpty(negative: boolean) {
|
||||
const completions = this.getCompletionListAtCaret();
|
||||
if ((!completions || completions.entries.length === 0) && negative) {
|
||||
@@ -892,10 +865,6 @@ namespace FourSlash {
|
||||
this.raiseError(`verifyReferencesAtPositionListContains failed - could not find the item: ${stringify(missingItem)} in the returned list: (${stringify(references)})`);
|
||||
}
|
||||
|
||||
private getMemberListAtCaret() {
|
||||
return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
}
|
||||
|
||||
private getCompletionListAtCaret() {
|
||||
return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
}
|
||||
@@ -1353,11 +1322,6 @@ namespace FourSlash {
|
||||
Harness.IO.log(stringify(sigHelp));
|
||||
}
|
||||
|
||||
public printMemberListMembers() {
|
||||
const members = this.getMemberListAtCaret();
|
||||
this.printMembersOrCompletions(members);
|
||||
}
|
||||
|
||||
public printCompletionListMembers() {
|
||||
const completions = this.getCompletionListAtCaret();
|
||||
this.printMembersOrCompletions(completions);
|
||||
@@ -3061,19 +3025,8 @@ namespace FourSlashInterface {
|
||||
}
|
||||
}
|
||||
|
||||
// Verifies the member list contains the specified symbol. The
|
||||
// member list is brought up if necessary
|
||||
public memberListContains(symbol: string, text?: string, documentation?: string, kind?: string) {
|
||||
if (this.negative) {
|
||||
this.state.verifyMemberListDoesNotContain(symbol);
|
||||
}
|
||||
else {
|
||||
this.state.verifyMemberListContains(symbol, text, documentation, kind);
|
||||
}
|
||||
}
|
||||
|
||||
public memberListCount(expectedCount: number) {
|
||||
this.state.verifyMemberListCount(expectedCount, this.negative);
|
||||
public completionListCount(expectedCount: number) {
|
||||
this.state.verifyCompletionListCount(expectedCount, this.negative);
|
||||
}
|
||||
|
||||
// Verifies the completion list contains the specified symbol. The
|
||||
@@ -3109,10 +3062,6 @@ namespace FourSlashInterface {
|
||||
this.state.verifyCompletionListAllowsNewIdentifier(this.negative);
|
||||
}
|
||||
|
||||
public memberListIsEmpty() {
|
||||
this.state.verifyMemberListIsEmpty(this.negative);
|
||||
}
|
||||
|
||||
public signatureHelpPresent() {
|
||||
this.state.verifySignatureHelpPresent(!this.negative);
|
||||
}
|
||||
@@ -3514,10 +3463,6 @@ namespace FourSlashInterface {
|
||||
this.state.printCurrentSignatureHelp();
|
||||
}
|
||||
|
||||
public printMemberListMembers() {
|
||||
this.state.printMemberListMembers();
|
||||
}
|
||||
|
||||
public printCompletionListMembers() {
|
||||
this.state.printCompletionListMembers();
|
||||
}
|
||||
|
||||
@@ -727,6 +727,66 @@ namespace ts.projectSystem {
|
||||
checkNumberOfInferredProjects(projectService, 1);
|
||||
});
|
||||
|
||||
it("remove not-listed external projects", () => {
|
||||
const f1 = {
|
||||
path: "/a/app.ts",
|
||||
content: "let x = 1"
|
||||
};
|
||||
const f2 = {
|
||||
path: "/b/app.ts",
|
||||
content: "let x = 1"
|
||||
};
|
||||
const f3 = {
|
||||
path: "/c/app.ts",
|
||||
content: "let x = 1"
|
||||
};
|
||||
const makeProject = (f: FileOrFolder) => ({ projectFileName: f.path + ".csproj", rootFiles: [toExternalFile(f.path)], options: {} });
|
||||
const p1 = makeProject(f1);
|
||||
const p2 = makeProject(f2);
|
||||
const p3 = makeProject(f3);
|
||||
|
||||
const host = createServerHost([f1, f2, f3]);
|
||||
const session = createSession(host);
|
||||
|
||||
session.executeCommand(<protocol.OpenExternalProjectsRequest>{
|
||||
seq: 1,
|
||||
type: "request",
|
||||
command: "openExternalProjects",
|
||||
arguments: { projects: [p1, p2] }
|
||||
});
|
||||
|
||||
const projectService = session.getProjectService();
|
||||
checkNumberOfProjects(projectService, { externalProjects: 2 });
|
||||
assert.equal(projectService.externalProjects[0].getProjectName(), p1.projectFileName);
|
||||
assert.equal(projectService.externalProjects[1].getProjectName(), p2.projectFileName);
|
||||
|
||||
session.executeCommand(<protocol.OpenExternalProjectsRequest>{
|
||||
seq: 2,
|
||||
type: "request",
|
||||
command: "openExternalProjects",
|
||||
arguments: { projects: [p1, p3] }
|
||||
});
|
||||
checkNumberOfProjects(projectService, { externalProjects: 2 });
|
||||
assert.equal(projectService.externalProjects[0].getProjectName(), p1.projectFileName);
|
||||
assert.equal(projectService.externalProjects[1].getProjectName(), p3.projectFileName);
|
||||
|
||||
session.executeCommand(<protocol.OpenExternalProjectsRequest>{
|
||||
seq: 3,
|
||||
type: "request",
|
||||
command: "openExternalProjects",
|
||||
arguments: { projects: [] }
|
||||
});
|
||||
checkNumberOfProjects(projectService, { externalProjects: 0 });
|
||||
|
||||
session.executeCommand(<protocol.OpenExternalProjectsRequest>{
|
||||
seq: 3,
|
||||
type: "request",
|
||||
command: "openExternalProjects",
|
||||
arguments: { projects: [p2] }
|
||||
});
|
||||
assert.equal(projectService.externalProjects[0].getProjectName(), p2.projectFileName);
|
||||
});
|
||||
|
||||
it("handle recreated files correctly", () => {
|
||||
const configFile: FileOrFolder = {
|
||||
path: "/a/b/tsconfig.json",
|
||||
|
||||
Vendored
+9
@@ -7,6 +7,15 @@ interface Array<T> {
|
||||
includes(searchElement: T, fromIndex?: number): boolean;
|
||||
}
|
||||
|
||||
interface ReadonlyArray<T> {
|
||||
/**
|
||||
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
||||
* @param searchElement The element to search for.
|
||||
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
||||
*/
|
||||
includes(searchElement: T, fromIndex?: number): boolean;
|
||||
}
|
||||
|
||||
interface Int8Array {
|
||||
/**
|
||||
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
||||
|
||||
@@ -1327,7 +1327,28 @@ namespace ts.server {
|
||||
}
|
||||
}
|
||||
|
||||
openExternalProject(proj: protocol.ExternalProject): void {
|
||||
openExternalProjects(projects: protocol.ExternalProject[]): void {
|
||||
// record project list before the update
|
||||
const projectsToClose = arrayToMap(this.externalProjects, p => p.getProjectName(), _ => true);
|
||||
for (const externalProjectName in this.externalProjectToConfiguredProjectMap) {
|
||||
projectsToClose[externalProjectName] = true;
|
||||
}
|
||||
|
||||
for (const externalProject of projects) {
|
||||
this.openExternalProject(externalProject, /*suppressRefreshOfInferredProjects*/ true);
|
||||
// delete project that is present in input list
|
||||
delete projectsToClose[externalProject.projectFileName];
|
||||
}
|
||||
|
||||
// close projects that were missing in the input list
|
||||
for (const externalProjectName in projectsToClose) {
|
||||
this.closeExternalProject(externalProjectName, /*suppressRefresh*/ true)
|
||||
}
|
||||
|
||||
this.refreshInferredProjects();
|
||||
}
|
||||
|
||||
openExternalProject(proj: protocol.ExternalProject, suppressRefreshOfInferredProjects = false): void {
|
||||
// typingOptions has been deprecated and is only supported for backward compatibility
|
||||
// purposes. It should be removed in future releases - use typeAcquisition instead.
|
||||
if (proj.typingOptions && !proj.typeAcquisition) {
|
||||
@@ -1420,7 +1441,9 @@ namespace ts.server {
|
||||
delete this.externalProjectToConfiguredProjectMap[proj.projectFileName];
|
||||
this.createAndAddExternalProject(proj.projectFileName, rootFiles, proj.options, proj.typeAcquisition);
|
||||
}
|
||||
this.refreshInferredProjects();
|
||||
if (!suppressRefreshOfInferredProjects) {
|
||||
this.refreshInferredProjects();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+26
-19
@@ -20,34 +20,41 @@ namespace ts.server {
|
||||
} = require("os");
|
||||
|
||||
function getGlobalTypingsCacheLocation() {
|
||||
let basePath: string;
|
||||
switch (process.platform) {
|
||||
case "win32":
|
||||
basePath = process.env.LOCALAPPDATA ||
|
||||
case "win32": {
|
||||
const basePath = process.env.LOCALAPPDATA ||
|
||||
process.env.APPDATA ||
|
||||
(os.homedir && os.homedir()) ||
|
||||
process.env.USERPROFILE ||
|
||||
(process.env.HOMEDRIVE && process.env.HOMEPATH && normalizeSlashes(process.env.HOMEDRIVE + process.env.HOMEPATH)) ||
|
||||
os.tmpdir();
|
||||
break;
|
||||
case "linux":
|
||||
case "android":
|
||||
basePath = (os.homedir && os.homedir()) ||
|
||||
process.env.HOME ||
|
||||
((process.env.LOGNAME || process.env.USER) && `/home/${process.env.LOGNAME || process.env.USER}`) ||
|
||||
os.tmpdir();
|
||||
break;
|
||||
return combinePaths(normalizeSlashes(basePath), "Microsoft/TypeScript");
|
||||
}
|
||||
case "darwin":
|
||||
const homeDir = (os.homedir && os.homedir()) ||
|
||||
process.env.HOME ||
|
||||
((process.env.LOGNAME || process.env.USER) && `/Users/${process.env.LOGNAME || process.env.USER}`) ||
|
||||
os.tmpdir();
|
||||
basePath = combinePaths(homeDir, "Library/Application Support/");
|
||||
break;
|
||||
case "linux":
|
||||
case "android": {
|
||||
const cacheLocation = getNonWindowsCacheLocation(process.platform === "darwin");
|
||||
return combinePaths(cacheLocation, "typescript");
|
||||
}
|
||||
default:
|
||||
Debug.fail(`unsupported platform '${process.platform}'`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Debug.assert(basePath !== undefined);
|
||||
return combinePaths(normalizeSlashes(basePath), "Microsoft/TypeScript");
|
||||
function getNonWindowsCacheLocation(platformIsDarwin: boolean) {
|
||||
if (process.env.XDG_CACHE_HOME) {
|
||||
return process.env.XDG_CACHE_HOME;
|
||||
}
|
||||
const usersDir = platformIsDarwin ? "Users" : "home"
|
||||
const homePath = (os.homedir && os.homedir()) ||
|
||||
process.env.HOME ||
|
||||
((process.env.LOGNAME || process.env.USER) && `/${usersDir}/${process.env.LOGNAME || process.env.USER}`) ||
|
||||
os.tmpdir();
|
||||
const cacheFolder = platformIsDarwin
|
||||
? "Library/Caches"
|
||||
: ".cache"
|
||||
return combinePaths(normalizeSlashes(homePath), cacheFolder);
|
||||
}
|
||||
|
||||
interface NodeChildProcess {
|
||||
|
||||
@@ -1365,14 +1365,12 @@ namespace ts.server {
|
||||
|
||||
private handlers = createMap<(request: protocol.Request) => { response?: any, responseRequired?: boolean }>({
|
||||
[CommandNames.OpenExternalProject]: (request: protocol.OpenExternalProjectRequest) => {
|
||||
this.projectService.openExternalProject(request.arguments);
|
||||
this.projectService.openExternalProject(request.arguments, /*suppressRefreshOfInferredProjects*/ false);
|
||||
// TODO: report errors
|
||||
return this.requiredResponse(true);
|
||||
},
|
||||
[CommandNames.OpenExternalProjects]: (request: protocol.OpenExternalProjectsRequest) => {
|
||||
for (const proj of request.arguments.projects) {
|
||||
this.projectService.openExternalProject(proj);
|
||||
}
|
||||
this.projectService.openExternalProjects(request.arguments.projects);
|
||||
// TODO: report errors
|
||||
return this.requiredResponse(true);
|
||||
},
|
||||
|
||||
@@ -1137,6 +1137,7 @@ namespace ts {
|
||||
writeSpace: text => writeKind(text, SymbolDisplayPartKind.space),
|
||||
writeStringLiteral: text => writeKind(text, SymbolDisplayPartKind.stringLiteral),
|
||||
writeParameter: text => writeKind(text, SymbolDisplayPartKind.parameterName),
|
||||
writeProperty: text => writeKind(text, SymbolDisplayPartKind.propertyName),
|
||||
writeSymbol,
|
||||
writeLine,
|
||||
increaseIndent: () => { indent++; },
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
//// [awaitInheritedPromise_es2017.ts]
|
||||
interface A extends Promise<string> {}
|
||||
declare var a: A;
|
||||
async function f() {
|
||||
await a;
|
||||
}
|
||||
|
||||
//// [awaitInheritedPromise_es2017.js]
|
||||
async function f() {
|
||||
await a;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
=== tests/cases/conformance/async/es2017/awaitInheritedPromise_es2017.ts ===
|
||||
interface A extends Promise<string> {}
|
||||
>A : Symbol(A, Decl(awaitInheritedPromise_es2017.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
|
||||
declare var a: A;
|
||||
>a : Symbol(a, Decl(awaitInheritedPromise_es2017.ts, 1, 11))
|
||||
>A : Symbol(A, Decl(awaitInheritedPromise_es2017.ts, 0, 0))
|
||||
|
||||
async function f() {
|
||||
>f : Symbol(f, Decl(awaitInheritedPromise_es2017.ts, 1, 17))
|
||||
|
||||
await a;
|
||||
>a : Symbol(a, Decl(awaitInheritedPromise_es2017.ts, 1, 11))
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
=== tests/cases/conformance/async/es2017/awaitInheritedPromise_es2017.ts ===
|
||||
interface A extends Promise<string> {}
|
||||
>A : A
|
||||
>Promise : Promise<T>
|
||||
|
||||
declare var a: A;
|
||||
>a : A
|
||||
>A : A
|
||||
|
||||
async function f() {
|
||||
>f : () => Promise<void>
|
||||
|
||||
await a;
|
||||
>await a : string
|
||||
>a : A
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor7.ts(26,5): error TS1207: Decorators cannot be applied to multiple get/set accessors of the same name.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor7.ts(31,5): error TS1207: Decorators cannot be applied to multiple get/set accessors of the same name.
|
||||
|
||||
|
||||
==== tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor7.ts (2 errors) ====
|
||||
declare function dec1<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
declare function dec2<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
|
||||
class A {
|
||||
@dec1 get x() { return 0; }
|
||||
set x(value: number) { }
|
||||
}
|
||||
|
||||
class B {
|
||||
get x() { return 0; }
|
||||
@dec2 set x(value: number) { }
|
||||
}
|
||||
|
||||
class C {
|
||||
@dec1 set x(value: number) { }
|
||||
get x() { return 0; }
|
||||
}
|
||||
|
||||
class D {
|
||||
set x(value: number) { }
|
||||
@dec2 get x() { return 0; }
|
||||
}
|
||||
|
||||
class E {
|
||||
@dec1 get x() { return 0; }
|
||||
@dec2 set x(value: number) { }
|
||||
~
|
||||
!!! error TS1207: Decorators cannot be applied to multiple get/set accessors of the same name.
|
||||
}
|
||||
|
||||
class F {
|
||||
@dec1 set x(value: number) { }
|
||||
@dec2 get x() { return 0; }
|
||||
~
|
||||
!!! error TS1207: Decorators cannot be applied to multiple get/set accessors of the same name.
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
//// [decoratorOnClassAccessor7.ts]
|
||||
declare function dec1<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
declare function dec2<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
|
||||
class A {
|
||||
@dec1 get x() { return 0; }
|
||||
set x(value: number) { }
|
||||
}
|
||||
|
||||
class B {
|
||||
get x() { return 0; }
|
||||
@dec2 set x(value: number) { }
|
||||
}
|
||||
|
||||
class C {
|
||||
@dec1 set x(value: number) { }
|
||||
get x() { return 0; }
|
||||
}
|
||||
|
||||
class D {
|
||||
set x(value: number) { }
|
||||
@dec2 get x() { return 0; }
|
||||
}
|
||||
|
||||
class E {
|
||||
@dec1 get x() { return 0; }
|
||||
@dec2 set x(value: number) { }
|
||||
}
|
||||
|
||||
class F {
|
||||
@dec1 set x(value: number) { }
|
||||
@dec2 get x() { return 0; }
|
||||
}
|
||||
|
||||
//// [decoratorOnClassAccessor7.js]
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
Object.defineProperty(A.prototype, "x", {
|
||||
get: function () { return 0; },
|
||||
set: function (value) { },
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return A;
|
||||
}());
|
||||
__decorate([
|
||||
dec1
|
||||
], A.prototype, "x", null);
|
||||
var B = (function () {
|
||||
function B() {
|
||||
}
|
||||
Object.defineProperty(B.prototype, "x", {
|
||||
get: function () { return 0; },
|
||||
set: function (value) { },
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return B;
|
||||
}());
|
||||
__decorate([
|
||||
dec2
|
||||
], B.prototype, "x", null);
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
Object.defineProperty(C.prototype, "x", {
|
||||
get: function () { return 0; },
|
||||
set: function (value) { },
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return C;
|
||||
}());
|
||||
__decorate([
|
||||
dec1
|
||||
], C.prototype, "x", null);
|
||||
var D = (function () {
|
||||
function D() {
|
||||
}
|
||||
Object.defineProperty(D.prototype, "x", {
|
||||
get: function () { return 0; },
|
||||
set: function (value) { },
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return D;
|
||||
}());
|
||||
__decorate([
|
||||
dec2
|
||||
], D.prototype, "x", null);
|
||||
var E = (function () {
|
||||
function E() {
|
||||
}
|
||||
Object.defineProperty(E.prototype, "x", {
|
||||
get: function () { return 0; },
|
||||
set: function (value) { },
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return E;
|
||||
}());
|
||||
__decorate([
|
||||
dec1
|
||||
], E.prototype, "x", null);
|
||||
var F = (function () {
|
||||
function F() {
|
||||
}
|
||||
Object.defineProperty(F.prototype, "x", {
|
||||
get: function () { return 0; },
|
||||
set: function (value) { },
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return F;
|
||||
}());
|
||||
__decorate([
|
||||
dec1
|
||||
], F.prototype, "x", null);
|
||||
@@ -7,6 +7,7 @@ tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(26,9): error T
|
||||
tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(30,16): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors.
|
||||
tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(34,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors.
|
||||
tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(38,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors.
|
||||
tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(46,9): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(46,14): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(58,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors.
|
||||
tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(62,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors.
|
||||
@@ -14,7 +15,7 @@ tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(67,9): error T
|
||||
tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(71,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts (14 errors) ====
|
||||
==== tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts (15 errors) ====
|
||||
//super call in class constructor with no base type
|
||||
class NoBase {
|
||||
constructor() {
|
||||
@@ -79,6 +80,8 @@ tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts(71,9): error T
|
||||
//super call with type arguments
|
||||
constructor() {
|
||||
super<string>();
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
super();
|
||||
|
||||
@@ -402,6 +402,17 @@ declare class Component2<Data, Computed> {
|
||||
get<K extends keyof Data | keyof Computed>(key: K): (Data & Computed)[K];
|
||||
}
|
||||
|
||||
// Repro from #12641
|
||||
|
||||
interface R {
|
||||
p: number;
|
||||
}
|
||||
|
||||
function f<K extends keyof R>(p: K) {
|
||||
let a: any;
|
||||
a[p].add; // any
|
||||
}
|
||||
|
||||
// Repro from #12651
|
||||
|
||||
type MethodDescriptor = {
|
||||
@@ -697,6 +708,10 @@ var c1 = new Component1({
|
||||
}
|
||||
});
|
||||
c1.get("hello");
|
||||
function f(p) {
|
||||
var a;
|
||||
a[p].add; // any
|
||||
}
|
||||
var result = dispatchMethod("someMethod", ["hello", 35]);
|
||||
|
||||
|
||||
@@ -889,6 +904,10 @@ declare class Component2<Data, Computed> {
|
||||
constructor(options: Options2<Data, Computed>);
|
||||
get<K extends keyof Data | keyof Computed>(key: K): (Data & Computed)[K];
|
||||
}
|
||||
interface R {
|
||||
p: number;
|
||||
}
|
||||
declare function f<K extends keyof R>(p: K): void;
|
||||
declare type MethodDescriptor = {
|
||||
name: string;
|
||||
args: any[];
|
||||
|
||||
@@ -1509,46 +1509,70 @@ declare class Component2<Data, Computed> {
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 400, 8))
|
||||
}
|
||||
|
||||
// Repro from #12641
|
||||
|
||||
interface R {
|
||||
>R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 401, 1))
|
||||
|
||||
p: number;
|
||||
>p : Symbol(R.p, Decl(keyofAndIndexedAccess.ts, 405, 13))
|
||||
}
|
||||
|
||||
function f<K extends keyof R>(p: K) {
|
||||
>f : Symbol(f, Decl(keyofAndIndexedAccess.ts, 407, 1))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 409, 11))
|
||||
>R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 401, 1))
|
||||
>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 409, 30))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 409, 11))
|
||||
|
||||
let a: any;
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 410, 7))
|
||||
|
||||
a[p].add; // any
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 410, 7))
|
||||
>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 409, 30))
|
||||
}
|
||||
|
||||
// Repro from #12651
|
||||
|
||||
type MethodDescriptor = {
|
||||
>MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 401, 1))
|
||||
>MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 412, 1))
|
||||
|
||||
name: string;
|
||||
>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 405, 25))
|
||||
>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 416, 25))
|
||||
|
||||
args: any[];
|
||||
>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 406, 14))
|
||||
>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 417, 14))
|
||||
|
||||
returnValue: any;
|
||||
>returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 407, 13))
|
||||
>returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 418, 13))
|
||||
}
|
||||
|
||||
declare function dispatchMethod<M extends MethodDescriptor>(name: M['name'], args: M['args']): M['returnValue'];
|
||||
>dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 409, 1))
|
||||
>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 411, 32))
|
||||
>MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 401, 1))
|
||||
>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 411, 60))
|
||||
>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 411, 32))
|
||||
>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 411, 76))
|
||||
>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 411, 32))
|
||||
>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 411, 32))
|
||||
>dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 420, 1))
|
||||
>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 422, 32))
|
||||
>MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 412, 1))
|
||||
>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 422, 60))
|
||||
>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 422, 32))
|
||||
>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 422, 76))
|
||||
>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 422, 32))
|
||||
>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 422, 32))
|
||||
|
||||
type SomeMethodDescriptor = {
|
||||
>SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 411, 112))
|
||||
>SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 422, 112))
|
||||
|
||||
name: "someMethod";
|
||||
>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 413, 29))
|
||||
>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 424, 29))
|
||||
|
||||
args: [string, number];
|
||||
>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 414, 20))
|
||||
>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 425, 20))
|
||||
|
||||
returnValue: string[];
|
||||
>returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 415, 24))
|
||||
>returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 426, 24))
|
||||
}
|
||||
|
||||
let result = dispatchMethod<SomeMethodDescriptor>("someMethod", ["hello", 35]);
|
||||
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 419, 3))
|
||||
>dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 409, 1))
|
||||
>SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 411, 112))
|
||||
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 430, 3))
|
||||
>dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 420, 1))
|
||||
>SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 422, 112))
|
||||
|
||||
|
||||
@@ -1800,6 +1800,33 @@ declare class Component2<Data, Computed> {
|
||||
>K : K
|
||||
}
|
||||
|
||||
// Repro from #12641
|
||||
|
||||
interface R {
|
||||
>R : R
|
||||
|
||||
p: number;
|
||||
>p : number
|
||||
}
|
||||
|
||||
function f<K extends keyof R>(p: K) {
|
||||
>f : <K extends "p">(p: K) => void
|
||||
>K : K
|
||||
>R : R
|
||||
>p : K
|
||||
>K : K
|
||||
|
||||
let a: any;
|
||||
>a : any
|
||||
|
||||
a[p].add; // any
|
||||
>a[p].add : any
|
||||
>a[p] : any
|
||||
>a : any
|
||||
>p : K
|
||||
>add : any
|
||||
}
|
||||
|
||||
// Repro from #12651
|
||||
|
||||
type MethodDescriptor = {
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
//// [subSubClassCanAccessProtectedConstructor.ts]
|
||||
class Base {
|
||||
protected constructor() { }
|
||||
public instance1 = new Base(); // allowed
|
||||
}
|
||||
|
||||
class Subclass extends Base {
|
||||
public instance1_1 = new Base(); // allowed
|
||||
public instance1_2 = new Subclass(); // allowed
|
||||
}
|
||||
|
||||
class SubclassOfSubclass extends Subclass {
|
||||
public instance2_1 = new Base(); // allowed
|
||||
public instance2_2 = new Subclass(); // allowed
|
||||
public instance2_3 = new SubclassOfSubclass(); // allowed
|
||||
}
|
||||
|
||||
|
||||
//// [subSubClassCanAccessProtectedConstructor.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
var Base = (function () {
|
||||
function Base() {
|
||||
this.instance1 = new Base(); // allowed
|
||||
}
|
||||
return Base;
|
||||
}());
|
||||
var Subclass = (function (_super) {
|
||||
__extends(Subclass, _super);
|
||||
function Subclass() {
|
||||
var _this = _super.apply(this, arguments) || this;
|
||||
_this.instance1_1 = new Base(); // allowed
|
||||
_this.instance1_2 = new Subclass(); // allowed
|
||||
return _this;
|
||||
}
|
||||
return Subclass;
|
||||
}(Base));
|
||||
var SubclassOfSubclass = (function (_super) {
|
||||
__extends(SubclassOfSubclass, _super);
|
||||
function SubclassOfSubclass() {
|
||||
var _this = _super.apply(this, arguments) || this;
|
||||
_this.instance2_1 = new Base(); // allowed
|
||||
_this.instance2_2 = new Subclass(); // allowed
|
||||
_this.instance2_3 = new SubclassOfSubclass(); // allowed
|
||||
return _this;
|
||||
}
|
||||
return SubclassOfSubclass;
|
||||
}(Subclass));
|
||||
@@ -0,0 +1,40 @@
|
||||
=== tests/cases/compiler/subSubClassCanAccessProtectedConstructor.ts ===
|
||||
class Base {
|
||||
>Base : Symbol(Base, Decl(subSubClassCanAccessProtectedConstructor.ts, 0, 0))
|
||||
|
||||
protected constructor() { }
|
||||
public instance1 = new Base(); // allowed
|
||||
>instance1 : Symbol(Base.instance1, Decl(subSubClassCanAccessProtectedConstructor.ts, 1, 31))
|
||||
>Base : Symbol(Base, Decl(subSubClassCanAccessProtectedConstructor.ts, 0, 0))
|
||||
}
|
||||
|
||||
class Subclass extends Base {
|
||||
>Subclass : Symbol(Subclass, Decl(subSubClassCanAccessProtectedConstructor.ts, 3, 1))
|
||||
>Base : Symbol(Base, Decl(subSubClassCanAccessProtectedConstructor.ts, 0, 0))
|
||||
|
||||
public instance1_1 = new Base(); // allowed
|
||||
>instance1_1 : Symbol(Subclass.instance1_1, Decl(subSubClassCanAccessProtectedConstructor.ts, 5, 29))
|
||||
>Base : Symbol(Base, Decl(subSubClassCanAccessProtectedConstructor.ts, 0, 0))
|
||||
|
||||
public instance1_2 = new Subclass(); // allowed
|
||||
>instance1_2 : Symbol(Subclass.instance1_2, Decl(subSubClassCanAccessProtectedConstructor.ts, 6, 36))
|
||||
>Subclass : Symbol(Subclass, Decl(subSubClassCanAccessProtectedConstructor.ts, 3, 1))
|
||||
}
|
||||
|
||||
class SubclassOfSubclass extends Subclass {
|
||||
>SubclassOfSubclass : Symbol(SubclassOfSubclass, Decl(subSubClassCanAccessProtectedConstructor.ts, 8, 1))
|
||||
>Subclass : Symbol(Subclass, Decl(subSubClassCanAccessProtectedConstructor.ts, 3, 1))
|
||||
|
||||
public instance2_1 = new Base(); // allowed
|
||||
>instance2_1 : Symbol(SubclassOfSubclass.instance2_1, Decl(subSubClassCanAccessProtectedConstructor.ts, 10, 43))
|
||||
>Base : Symbol(Base, Decl(subSubClassCanAccessProtectedConstructor.ts, 0, 0))
|
||||
|
||||
public instance2_2 = new Subclass(); // allowed
|
||||
>instance2_2 : Symbol(SubclassOfSubclass.instance2_2, Decl(subSubClassCanAccessProtectedConstructor.ts, 11, 36))
|
||||
>Subclass : Symbol(Subclass, Decl(subSubClassCanAccessProtectedConstructor.ts, 3, 1))
|
||||
|
||||
public instance2_3 = new SubclassOfSubclass(); // allowed
|
||||
>instance2_3 : Symbol(SubclassOfSubclass.instance2_3, Decl(subSubClassCanAccessProtectedConstructor.ts, 12, 40))
|
||||
>SubclassOfSubclass : Symbol(SubclassOfSubclass, Decl(subSubClassCanAccessProtectedConstructor.ts, 8, 1))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
=== tests/cases/compiler/subSubClassCanAccessProtectedConstructor.ts ===
|
||||
class Base {
|
||||
>Base : Base
|
||||
|
||||
protected constructor() { }
|
||||
public instance1 = new Base(); // allowed
|
||||
>instance1 : Base
|
||||
>new Base() : Base
|
||||
>Base : typeof Base
|
||||
}
|
||||
|
||||
class Subclass extends Base {
|
||||
>Subclass : Subclass
|
||||
>Base : Base
|
||||
|
||||
public instance1_1 = new Base(); // allowed
|
||||
>instance1_1 : Base
|
||||
>new Base() : Base
|
||||
>Base : typeof Base
|
||||
|
||||
public instance1_2 = new Subclass(); // allowed
|
||||
>instance1_2 : Subclass
|
||||
>new Subclass() : Subclass
|
||||
>Subclass : typeof Subclass
|
||||
}
|
||||
|
||||
class SubclassOfSubclass extends Subclass {
|
||||
>SubclassOfSubclass : SubclassOfSubclass
|
||||
>Subclass : Subclass
|
||||
|
||||
public instance2_1 = new Base(); // allowed
|
||||
>instance2_1 : Base
|
||||
>new Base() : Base
|
||||
>Base : typeof Base
|
||||
|
||||
public instance2_2 = new Subclass(); // allowed
|
||||
>instance2_2 : Subclass
|
||||
>new Subclass() : Subclass
|
||||
>Subclass : typeof Subclass
|
||||
|
||||
public instance2_3 = new SubclassOfSubclass(); // allowed
|
||||
>instance2_3 : SubclassOfSubclass
|
||||
>new SubclassOfSubclass() : SubclassOfSubclass
|
||||
>SubclassOfSubclass : typeof SubclassOfSubclass
|
||||
}
|
||||
|
||||
@@ -2,10 +2,13 @@ tests/cases/compiler/superAccess2.ts(7,15): error TS1034: 'super' must be follow
|
||||
tests/cases/compiler/superAccess2.ts(8,17): error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.
|
||||
tests/cases/compiler/superAccess2.ts(8,22): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
tests/cases/compiler/superAccess2.ts(11,28): error TS2336: 'super' cannot be referenced in constructor arguments.
|
||||
tests/cases/compiler/superAccess2.ts(11,28): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
tests/cases/compiler/superAccess2.ts(11,33): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
tests/cases/compiler/superAccess2.ts(11,40): error TS2336: 'super' cannot be referenced in constructor arguments.
|
||||
tests/cases/compiler/superAccess2.ts(11,40): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
tests/cases/compiler/superAccess2.ts(11,45): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
tests/cases/compiler/superAccess2.ts(11,59): error TS2336: 'super' cannot be referenced in constructor arguments.
|
||||
tests/cases/compiler/superAccess2.ts(11,59): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
tests/cases/compiler/superAccess2.ts(11,64): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
tests/cases/compiler/superAccess2.ts(15,19): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
tests/cases/compiler/superAccess2.ts(17,15): error TS2339: Property 'y' does not exist on type 'P'.
|
||||
@@ -13,7 +16,7 @@ tests/cases/compiler/superAccess2.ts(20,26): error TS1034: 'super' must be follo
|
||||
tests/cases/compiler/superAccess2.ts(21,15): error TS2339: Property 'x' does not exist on type 'typeof P'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/superAccess2.ts (13 errors) ====
|
||||
==== tests/cases/compiler/superAccess2.ts (16 errors) ====
|
||||
class P {
|
||||
x() { }
|
||||
static y() { }
|
||||
@@ -33,14 +36,20 @@ tests/cases/compiler/superAccess2.ts(21,15): error TS2339: Property 'x' does not
|
||||
constructor(public z = super, zz = super, zzz = () => super) {
|
||||
~~~~~
|
||||
!!! error TS2336: 'super' cannot be referenced in constructor arguments.
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2336: 'super' cannot be referenced in constructor arguments.
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2336: 'super' cannot be referenced in constructor arguments.
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
super();
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
tests/cases/compiler/superInConstructorParam1.ts(8,3): error TS2377: Constructors for derived classes must contain a 'super' call.
|
||||
tests/cases/compiler/superInConstructorParam1.ts(8,19): error TS2336: 'super' cannot be referenced in constructor arguments.
|
||||
tests/cases/compiler/superInConstructorParam1.ts(8,19): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
|
||||
|
||||
==== tests/cases/compiler/superInConstructorParam1.ts (2 errors) ====
|
||||
==== tests/cases/compiler/superInConstructorParam1.ts (3 errors) ====
|
||||
class B {
|
||||
public foo(): number {
|
||||
return 0;
|
||||
@@ -14,6 +15,8 @@ tests/cases/compiler/superInConstructorParam1.ts(8,19): error TS2336: 'super' ca
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2336: 'super' cannot be referenced in constructor arguments.
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
}
|
||||
~~~
|
||||
!!! error TS2377: Constructors for derived classes must contain a 'super' call.
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
tests/cases/compiler/superNewCall1.ts(9,5): error TS2377: Constructors for derived classes must contain a 'super' call.
|
||||
tests/cases/compiler/superNewCall1.ts(10,9): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
tests/cases/compiler/superNewCall1.ts(10,13): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
|
||||
|
||||
==== tests/cases/compiler/superNewCall1.ts (2 errors) ====
|
||||
==== tests/cases/compiler/superNewCall1.ts (3 errors) ====
|
||||
|
||||
class A<T1, T2> {
|
||||
constructor(private map: (value: T1) => T2) {
|
||||
@@ -17,6 +18,8 @@ tests/cases/compiler/superNewCall1.ts(10,9): error TS2351: Cannot use 'new' with
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
}
|
||||
~~~~~
|
||||
!!! error TS2377: Constructors for derived classes must contain a 'super' call.
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
tests/cases/conformance/classes/constructorDeclarations/superCalls/superPropertyInConstructorBeforeSuperCall.ts(7,9): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
tests/cases/conformance/classes/constructorDeclarations/superCalls/superPropertyInConstructorBeforeSuperCall.ts(13,15): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/constructorDeclarations/superCalls/superPropertyInConstructorBeforeSuperCall.ts (2 errors) ====
|
||||
class B {
|
||||
constructor(x?: string) {}
|
||||
x(): string { return ""; }
|
||||
}
|
||||
class C1 extends B {
|
||||
constructor() {
|
||||
super.x();
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
super();
|
||||
}
|
||||
}
|
||||
class C2 extends B {
|
||||
constructor() {
|
||||
super(super.x());
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
//// [superPropertyInConstructorBeforeSuperCall.ts]
|
||||
class B {
|
||||
constructor(x?: string) {}
|
||||
x(): string { return ""; }
|
||||
}
|
||||
class C1 extends B {
|
||||
constructor() {
|
||||
super.x();
|
||||
super();
|
||||
}
|
||||
}
|
||||
class C2 extends B {
|
||||
constructor() {
|
||||
super(super.x());
|
||||
}
|
||||
}
|
||||
|
||||
//// [superPropertyInConstructorBeforeSuperCall.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
var B = (function () {
|
||||
function B(x) {
|
||||
}
|
||||
B.prototype.x = function () { return ""; };
|
||||
return B;
|
||||
}());
|
||||
var C1 = (function (_super) {
|
||||
__extends(C1, _super);
|
||||
function C1() {
|
||||
var _this;
|
||||
_super.prototype.x.call(_this);
|
||||
_this = _super.call(this) || this;
|
||||
return _this;
|
||||
}
|
||||
return C1;
|
||||
}(B));
|
||||
var C2 = (function (_super) {
|
||||
__extends(C2, _super);
|
||||
function C2() {
|
||||
return _super.call(this, _super.x.call(_this)) || this;
|
||||
}
|
||||
return C2;
|
||||
}(B));
|
||||
@@ -1,8 +1,9 @@
|
||||
tests/cases/compiler/superWithTypeArgument.ts(6,5): error TS2377: Constructors for derived classes must contain a 'super' call.
|
||||
tests/cases/compiler/superWithTypeArgument.ts(7,9): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
tests/cases/compiler/superWithTypeArgument.ts(7,14): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
|
||||
|
||||
==== tests/cases/compiler/superWithTypeArgument.ts (2 errors) ====
|
||||
==== tests/cases/compiler/superWithTypeArgument.ts (3 errors) ====
|
||||
class C {
|
||||
|
||||
}
|
||||
@@ -12,6 +13,8 @@ tests/cases/compiler/superWithTypeArgument.ts(7,14): error TS1034: 'super' must
|
||||
~~~~~~~~~~~~~~~
|
||||
super<T>();
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
tests/cases/compiler/superWithTypeArgument2.ts(6,5): error TS2377: Constructors for derived classes must contain a 'super' call.
|
||||
tests/cases/compiler/superWithTypeArgument2.ts(7,9): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
tests/cases/compiler/superWithTypeArgument2.ts(7,14): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
|
||||
|
||||
==== tests/cases/compiler/superWithTypeArgument2.ts (2 errors) ====
|
||||
==== tests/cases/compiler/superWithTypeArgument2.ts (3 errors) ====
|
||||
class C<T> {
|
||||
foo: T;
|
||||
}
|
||||
@@ -12,6 +13,8 @@ tests/cases/compiler/superWithTypeArgument2.ts(7,14): error TS1034: 'super' must
|
||||
~~~~~~~~~~~~~~~~
|
||||
super<T>(x);
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
tests/cases/compiler/superWithTypeArgument3.ts(7,5): error TS2377: Constructors for derived classes must contain a 'super' call.
|
||||
tests/cases/compiler/superWithTypeArgument3.ts(8,9): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
tests/cases/compiler/superWithTypeArgument3.ts(8,14): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
|
||||
|
||||
==== tests/cases/compiler/superWithTypeArgument3.ts (2 errors) ====
|
||||
==== tests/cases/compiler/superWithTypeArgument3.ts (3 errors) ====
|
||||
class C<T> {
|
||||
foo: T;
|
||||
bar<U>(x: U) { }
|
||||
@@ -13,6 +14,8 @@ tests/cases/compiler/superWithTypeArgument3.ts(8,14): error TS1034: 'super' must
|
||||
~~~~~~~~~~~~~~~
|
||||
super<T>();
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class.
|
||||
~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
class Base {
|
||||
protected constructor() { }
|
||||
public instance1 = new Base(); // allowed
|
||||
}
|
||||
|
||||
class Subclass extends Base {
|
||||
public instance1_1 = new Base(); // allowed
|
||||
public instance1_2 = new Subclass(); // allowed
|
||||
}
|
||||
|
||||
class SubclassOfSubclass extends Subclass {
|
||||
public instance2_1 = new Base(); // allowed
|
||||
public instance2_2 = new Subclass(); // allowed
|
||||
public instance2_3 = new SubclassOfSubclass(); // allowed
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// @target: es2017
|
||||
// @strictNullChecks: true
|
||||
interface A extends Promise<string> {}
|
||||
declare var a: A;
|
||||
async function f() {
|
||||
await a;
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
class B {
|
||||
constructor(x?: string) {}
|
||||
x(): string { return ""; }
|
||||
}
|
||||
class C1 extends B {
|
||||
constructor() {
|
||||
super.x();
|
||||
super();
|
||||
}
|
||||
}
|
||||
class C2 extends B {
|
||||
constructor() {
|
||||
super(super.x());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// @target:es5
|
||||
// @experimentaldecorators: true
|
||||
declare function dec1<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
declare function dec2<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
|
||||
class A {
|
||||
@dec1 get x() { return 0; }
|
||||
set x(value: number) { }
|
||||
}
|
||||
|
||||
class B {
|
||||
get x() { return 0; }
|
||||
@dec2 set x(value: number) { }
|
||||
}
|
||||
|
||||
class C {
|
||||
@dec1 set x(value: number) { }
|
||||
get x() { return 0; }
|
||||
}
|
||||
|
||||
class D {
|
||||
set x(value: number) { }
|
||||
@dec2 get x() { return 0; }
|
||||
}
|
||||
|
||||
class E {
|
||||
@dec1 get x() { return 0; }
|
||||
@dec2 set x(value: number) { }
|
||||
}
|
||||
|
||||
class F {
|
||||
@dec1 set x(value: number) { }
|
||||
@dec2 get x() { return 0; }
|
||||
}
|
||||
@@ -403,6 +403,17 @@ declare class Component2<Data, Computed> {
|
||||
get<K extends keyof Data | keyof Computed>(key: K): (Data & Computed)[K];
|
||||
}
|
||||
|
||||
// Repro from #12641
|
||||
|
||||
interface R {
|
||||
p: number;
|
||||
}
|
||||
|
||||
function f<K extends keyof R>(p: K) {
|
||||
let a: any;
|
||||
a[p].add; // any
|
||||
}
|
||||
|
||||
// Repro from #12651
|
||||
|
||||
type MethodDescriptor = {
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
|
||||
goTo.eof();
|
||||
edit.insert('t.');
|
||||
verify.memberListContains('x');
|
||||
verify.memberListContains('y');
|
||||
verify.not.memberListContains('z');
|
||||
verify.completionListContains('x');
|
||||
verify.completionListContains('y');
|
||||
verify.not.completionListContains('z');
|
||||
|
||||
@@ -139,18 +139,18 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('4');
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.memberListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.memberListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.memberListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.memberListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.memberListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.completionListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.completionListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.completionListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.completionListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.completionListContains("b", "(parameter) b: number", "number to add");
|
||||
@@ -158,18 +158,18 @@ verify.completionListContains("b", "(parameter) b: number", "number to add");
|
||||
verify.quickInfoAt("6", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.memberListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.memberListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.memberListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.memberListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.memberListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.completionListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.completionListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.completionListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.completionListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.currentSignatureHelpDocCommentIs("sum with property");
|
||||
@@ -177,48 +177,48 @@ verify.currentParameterHelpArgumentDocCommentIs("number to add");
|
||||
verify.quickInfoAt("8q", "(method) c1.p2(b: number): number", "sum with property");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.memberListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.memberListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.memberListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.memberListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.memberListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.completionListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.completionListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.completionListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.completionListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
|
||||
verify.quickInfoAt("10", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.memberListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.memberListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.memberListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.memberListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.memberListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.completionListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.completionListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.completionListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.completionListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.memberListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.memberListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.memberListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.memberListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.memberListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.completionListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.completionListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.completionListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.completionListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.currentSignatureHelpDocCommentIs("sum with property");
|
||||
@@ -232,18 +232,18 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('16');
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.memberListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.memberListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.memberListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.memberListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.memberListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.completionListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.completionListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.completionListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.completionListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
|
||||
goTo.marker('17');
|
||||
verify.completionListContains("b", "(parameter) b: number", "number to add");
|
||||
@@ -251,18 +251,18 @@ verify.completionListContains("b", "(parameter) b: number", "number to add");
|
||||
verify.quickInfoAt("18", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
|
||||
goTo.marker('19');
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.memberListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.memberListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.memberListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.memberListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.memberListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.completionListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.completionListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.completionListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.completionListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
|
||||
goTo.marker('20');
|
||||
verify.currentSignatureHelpDocCommentIs("sum with property");
|
||||
@@ -270,48 +270,48 @@ verify.currentParameterHelpArgumentDocCommentIs("number to add");
|
||||
verify.quickInfoAt("20q", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
|
||||
goTo.marker('21');
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.memberListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.memberListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.memberListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.memberListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.memberListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.completionListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.completionListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.completionListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.completionListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
|
||||
verify.quickInfoAt("22", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
|
||||
goTo.marker('23');
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.memberListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.memberListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.memberListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.memberListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.memberListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.completionListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.completionListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.completionListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.completionListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
|
||||
goTo.marker('24');
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.memberListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.memberListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.memberListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.memberListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.memberListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("pp1", "(property) c1.pp1: number", "pp1 is property of c1");
|
||||
verify.completionListContains("pp2", "(method) c1.pp2(b: number): number", "sum with property");
|
||||
verify.completionListContains("pp3", "(property) c1.pp3: number", "getter property 2\nsetter property 2");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("nc_pp1", "(property) c1.nc_pp1: number", "");
|
||||
verify.completionListContains("nc_pp2", "(method) c1.nc_pp2(b: number): number", "");
|
||||
verify.completionListContains("nc_pp3", "(property) c1.nc_pp3: number", "");
|
||||
|
||||
goTo.marker('25');
|
||||
verify.currentSignatureHelpDocCommentIs("sum with property");
|
||||
@@ -329,12 +329,12 @@ goTo.marker('29');
|
||||
verify.completionListContains("c1", "class c1", "This is comment for c1");
|
||||
|
||||
goTo.marker('30');
|
||||
verify.memberListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.memberListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.memberListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.memberListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.memberListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.memberListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
verify.completionListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.completionListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.completionListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.completionListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.completionListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.completionListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
|
||||
goTo.marker('31');
|
||||
verify.completionListContains("b", "(parameter) b: number", "number to add");
|
||||
@@ -345,12 +345,12 @@ goTo.marker('33');
|
||||
verify.completionListContains("c1", "class c1", "This is comment for c1");
|
||||
|
||||
goTo.marker('34');
|
||||
verify.memberListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.memberListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.memberListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.memberListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.memberListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.memberListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
verify.completionListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.completionListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.completionListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.completionListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.completionListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.completionListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
|
||||
goTo.marker('35');
|
||||
verify.currentSignatureHelpDocCommentIs("static sum with property");
|
||||
@@ -359,12 +359,12 @@ verify.completionListContains("c1", "class c1", "This is comment for c1");
|
||||
verify.quickInfoAt("35q", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
|
||||
goTo.marker('36');
|
||||
verify.memberListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.memberListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.memberListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.memberListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.memberListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.memberListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
verify.completionListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.completionListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.completionListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.completionListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.completionListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.completionListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
|
||||
verify.quickInfoAt("37", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
|
||||
@@ -372,23 +372,23 @@ goTo.marker('38');
|
||||
verify.completionListContains("c1", "class c1", "This is comment for c1");
|
||||
|
||||
goTo.marker('39');
|
||||
verify.memberListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.memberListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.memberListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.memberListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.memberListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.memberListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
verify.completionListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.completionListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.completionListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.completionListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.completionListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.completionListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
|
||||
goTo.marker('40');
|
||||
verify.completionListContains("c1", "class c1", "This is comment for c1");
|
||||
|
||||
goTo.marker('41');
|
||||
verify.memberListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.memberListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.memberListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.memberListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.memberListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.memberListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
verify.completionListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.completionListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.completionListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.completionListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.completionListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.completionListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
|
||||
goTo.marker('42');
|
||||
verify.currentSignatureHelpDocCommentIs("static sum with property");
|
||||
@@ -477,12 +477,12 @@ verify.quickInfos({
|
||||
|
||||
goTo.marker("67");
|
||||
verify.quickInfoIs("(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.memberListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.memberListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.memberListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "p1 is property of c1");
|
||||
verify.completionListContains("p2", "(method) c1.p2(b: number): number", "sum with property");
|
||||
verify.completionListContains("p3", "(property) c1.p3: number", "getter property 1\nsetter property 1");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(method) c1.nc_p2(b: number): number", "");
|
||||
verify.completionListContains("nc_p3", "(property) c1.nc_p3: number", "");
|
||||
|
||||
verify.quickInfos({
|
||||
68: "var i1_f: (b: number) => number",
|
||||
@@ -526,12 +526,12 @@ verify.completionListContains("c1", "class c1", "This is comment for c1");
|
||||
|
||||
goTo.marker('88');
|
||||
verify.quickInfoIs("(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.memberListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.memberListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.memberListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.memberListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.memberListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.memberListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
verify.completionListContains("s1", "(property) c1.s1: number", "s1 is static property of c1");
|
||||
verify.completionListContains("s2", "(method) c1.s2(b: number): number", "static sum with property");
|
||||
verify.completionListContains("s3", "(property) c1.s3: number", "static getter property\nsetter property 3");
|
||||
verify.completionListContains("nc_s1", "(property) c1.nc_s1: number", "");
|
||||
verify.completionListContains("nc_s2", "(method) c1.nc_s2(b: number): number", "");
|
||||
verify.completionListContains("nc_s3", "(property) c1.nc_s3: number", "");
|
||||
|
||||
verify.quickInfos({
|
||||
89: "var i1_s_f: (b: number) => number",
|
||||
@@ -593,10 +593,10 @@ verify.completionListContains("i1_c", "var i1_c: typeof c1", "");
|
||||
|
||||
goTo.marker('110');
|
||||
verify.quickInfoIs("(property) cProperties.p2: number", "setter only property");
|
||||
verify.memberListContains("p1", "(property) cProperties.p1: number", "getter only property");
|
||||
verify.memberListContains("p2", "(property) cProperties.p2: number", "setter only property");
|
||||
verify.memberListContains("nc_p1", "(property) cProperties.nc_p1: number", "");
|
||||
verify.memberListContains("nc_p2", "(property) cProperties.nc_p2: number", "");
|
||||
verify.completionListContains("p1", "(property) cProperties.p1: number", "getter only property");
|
||||
verify.completionListContains("p2", "(property) cProperties.p2: number", "setter only property");
|
||||
verify.completionListContains("nc_p1", "(property) cProperties.nc_p1: number", "");
|
||||
verify.completionListContains("nc_p2", "(property) cProperties.nc_p2: number", "");
|
||||
|
||||
verify.quickInfos({
|
||||
111: ["(property) cProperties.p1: number", "getter only property"],
|
||||
@@ -605,7 +605,7 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('114');
|
||||
verify.memberListContains("a", "(property) cWithConstructorProperty.a: number", "this is first parameter a\nmore info about a");
|
||||
verify.completionListContains("a", "(property) cWithConstructorProperty.a: number", "this is first parameter a\nmore info about a");
|
||||
verify.quickInfoIs("(property) cWithConstructorProperty.a: number", "this is first parameter a\nmore info about a");
|
||||
|
||||
goTo.marker('115');
|
||||
|
||||
@@ -22,11 +22,11 @@ verify.completionListContains("Colors", "enum Colors", "Enum of colors");
|
||||
verify.quickInfoIs("enum Colors", "Enum of colors");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.memberListContains("Cornflower", "(enum member) Colors.Cornflower = 0", "Fancy name for 'blue'");
|
||||
verify.memberListContains("FancyPink", "(enum member) Colors.FancyPink = 1", "Fancy name for 'pink'");
|
||||
verify.completionListContains("Cornflower", "(enum member) Colors.Cornflower = 0", "Fancy name for 'blue'");
|
||||
verify.completionListContains("FancyPink", "(enum member) Colors.FancyPink = 1", "Fancy name for 'pink'");
|
||||
verify.quickInfoIs("(enum member) Colors.Cornflower = 0", "Fancy name for 'blue'");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.memberListContains("Cornflower", "(enum member) Colors.Cornflower = 0", "Fancy name for 'blue'");
|
||||
verify.memberListContains("FancyPink", "(enum member) Colors.FancyPink = 1", "Fancy name for 'pink'");
|
||||
verify.completionListContains("Cornflower", "(enum member) Colors.Cornflower = 0", "Fancy name for 'blue'");
|
||||
verify.completionListContains("FancyPink", "(enum member) Colors.FancyPink = 1", "Fancy name for 'pink'");
|
||||
verify.quickInfoIs("(enum member) Colors.FancyPink = 1", "Fancy name for 'pink'");
|
||||
@@ -46,9 +46,9 @@ goTo.marker('4');
|
||||
verify.completionListContains("m1", "namespace m1", "Namespace comment");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.memberListContains("b", "var m1.b: number", "b's comment");
|
||||
verify.memberListContains("fooExport", "function m1.fooExport(): number", "exported function");
|
||||
verify.memberListContains("m2", "namespace m1.m2");
|
||||
verify.completionListContains("b", "var m1.b: number", "b's comment");
|
||||
verify.completionListContains("fooExport", "function m1.fooExport(): number", "exported function");
|
||||
verify.completionListContains("m2", "namespace m1.m2");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.currentSignatureHelpDocCommentIs("exported function");
|
||||
@@ -57,8 +57,8 @@ verify.quickInfoAt("6q", "function m1.fooExport(): number", "exported function")
|
||||
verify.quickInfoAt("7", "var myvar: m1.m2.c");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.memberListContains("c", "constructor m1.m2.c(): m1.m2.c", "");
|
||||
verify.memberListContains("i", "var m1.m2.i: m1.m2.c", "i");
|
||||
verify.completionListContains("c", "constructor m1.m2.c(): m1.m2.c", "");
|
||||
verify.completionListContains("i", "var m1.m2.i: m1.m2.c", "i");
|
||||
|
||||
goTo.file("commentsExternalModules_file1.ts");
|
||||
verify.quickInfoAt("9", 'import extMod = require("./commentsExternalModules_file0")', "This is on import declaration");
|
||||
@@ -67,12 +67,12 @@ goTo.marker('10');
|
||||
verify.completionListContains("extMod", 'import extMod = require("./commentsExternalModules_file0")', "This is on import declaration");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.memberListContains("m1", "namespace extMod.m1");
|
||||
verify.completionListContains("m1", "namespace extMod.m1");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.memberListContains("b", "var extMod.m1.b: number", "b's comment");
|
||||
verify.memberListContains("fooExport", "function extMod.m1.fooExport(): number", "exported function");
|
||||
verify.memberListContains("m2", "namespace extMod.m1.m2");
|
||||
verify.completionListContains("b", "var extMod.m1.b: number", "b's comment");
|
||||
verify.completionListContains("fooExport", "function extMod.m1.fooExport(): number", "exported function");
|
||||
verify.completionListContains("m2", "namespace extMod.m1.m2");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.currentSignatureHelpDocCommentIs("exported function");
|
||||
@@ -81,5 +81,5 @@ verify.quickInfoAt("13q", "function extMod.m1.fooExport(): number", "exported fu
|
||||
verify.quickInfoAt("14", "var newVar: extMod.m1.m2.c");
|
||||
|
||||
goTo.marker('15');
|
||||
verify.memberListContains("c", "constructor extMod.m1.m2.c(): extMod.m1.m2.c", "");
|
||||
verify.memberListContains("i", "var extMod.m1.m2.i: extMod.m1.m2.c", "i");
|
||||
verify.completionListContains("c", "constructor extMod.m1.m2.c(): extMod.m1.m2.c", "");
|
||||
verify.completionListContains("i", "var extMod.m1.m2.i: extMod.m1.m2.c", "i");
|
||||
|
||||
@@ -30,12 +30,12 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('6');
|
||||
verify.memberListContains("m1", "namespace extMod.m1");
|
||||
verify.completionListContains("m1", "namespace extMod.m1");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.memberListContains("b", "var extMod.m1.b: number", "b's comment");
|
||||
verify.memberListContains("fooExport", "function extMod.m1.fooExport(): number", "exported function");
|
||||
verify.memberListContains("m2", "namespace extMod.m1.m2");
|
||||
verify.completionListContains("b", "var extMod.m1.b: number", "b's comment");
|
||||
verify.completionListContains("fooExport", "function extMod.m1.fooExport(): number", "exported function");
|
||||
verify.completionListContains("m2", "namespace extMod.m1.m2");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.currentSignatureHelpDocCommentIs("exported function");
|
||||
@@ -45,5 +45,5 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('10');
|
||||
verify.memberListContains("c", "constructor extMod.m1.m2.c(): extMod.m1.m2.c", "");
|
||||
verify.memberListContains("i", "var extMod.m1.m2.i: extMod.m1.m2.c", "i");
|
||||
verify.completionListContains("c", "constructor extMod.m1.m2.c(): extMod.m1.m2.c", "");
|
||||
verify.completionListContains("i", "var extMod.m1.m2.i: extMod.m1.m2.c", "i");
|
||||
|
||||
@@ -221,18 +221,18 @@
|
||||
////}
|
||||
|
||||
goTo.marker('1');
|
||||
verify.memberListContains("i1_p1", "(property) i1.i1_p1: number", "i1_p1");
|
||||
verify.memberListContains("i1_f1", "(method) i1.i1_f1(): void", "i1_f1");
|
||||
verify.memberListContains("i1_l1", "(property) i1.i1_l1: () => void", "");
|
||||
verify.memberListContains("i1_nc_p1", "(property) i1.i1_nc_p1: number", "");
|
||||
verify.memberListContains("i1_nc_f1", "(method) i1.i1_nc_f1(): void", "");
|
||||
verify.memberListContains("i1_nc_l1", "(property) i1.i1_nc_l1: () => void", "");
|
||||
verify.memberListContains("p1", "(property) i1.p1: number", "");
|
||||
verify.memberListContains("f1", "(method) i1.f1(): void", "");
|
||||
verify.memberListContains("l1", "(property) i1.l1: () => void", "");
|
||||
verify.memberListContains("nc_p1", "(property) i1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_f1", "(method) i1.nc_f1(): void", "");
|
||||
verify.memberListContains("nc_l1", "(property) i1.nc_l1: () => void", "");
|
||||
verify.completionListContains("i1_p1", "(property) i1.i1_p1: number", "i1_p1");
|
||||
verify.completionListContains("i1_f1", "(method) i1.i1_f1(): void", "i1_f1");
|
||||
verify.completionListContains("i1_l1", "(property) i1.i1_l1: () => void", "");
|
||||
verify.completionListContains("i1_nc_p1", "(property) i1.i1_nc_p1: number", "");
|
||||
verify.completionListContains("i1_nc_f1", "(method) i1.i1_nc_f1(): void", "");
|
||||
verify.completionListContains("i1_nc_l1", "(property) i1.i1_nc_l1: () => void", "");
|
||||
verify.completionListContains("p1", "(property) i1.p1: number", "");
|
||||
verify.completionListContains("f1", "(method) i1.f1(): void", "");
|
||||
verify.completionListContains("l1", "(property) i1.l1: () => void", "");
|
||||
verify.completionListContains("nc_p1", "(property) i1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_f1", "(method) i1.nc_f1(): void", "");
|
||||
verify.completionListContains("nc_l1", "(property) i1.nc_l1: () => void", "");
|
||||
goTo.marker('2');
|
||||
verify.currentSignatureHelpDocCommentIs("i1_f1");
|
||||
goTo.marker('3');
|
||||
@@ -263,18 +263,18 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('6');
|
||||
verify.memberListContains("i1_p1", "(property) c1.i1_p1: number", "");
|
||||
verify.memberListContains("i1_f1", "(method) c1.i1_f1(): void", "");
|
||||
verify.memberListContains("i1_l1", "(property) c1.i1_l1: () => void", "");
|
||||
verify.memberListContains("i1_nc_p1", "(property) c1.i1_nc_p1: number", "");
|
||||
verify.memberListContains("i1_nc_f1", "(method) c1.i1_nc_f1(): void", "");
|
||||
verify.memberListContains("i1_nc_l1", "(property) c1.i1_nc_l1: () => void", "");
|
||||
verify.memberListContains("p1", "(property) c1.p1: number", "c1_p1");
|
||||
verify.memberListContains("f1", "(method) c1.f1(): void", "c1_f1");
|
||||
verify.memberListContains("l1", "(property) c1.l1: () => void", "");
|
||||
verify.memberListContains("nc_p1", "(property) c1.nc_p1: number", "c1_nc_p1");
|
||||
verify.memberListContains("nc_f1", "(method) c1.nc_f1(): void", "c1_nc_f1");
|
||||
verify.memberListContains("nc_l1", "(property) c1.nc_l1: () => void", "");
|
||||
verify.completionListContains("i1_p1", "(property) c1.i1_p1: number", "");
|
||||
verify.completionListContains("i1_f1", "(method) c1.i1_f1(): void", "");
|
||||
verify.completionListContains("i1_l1", "(property) c1.i1_l1: () => void", "");
|
||||
verify.completionListContains("i1_nc_p1", "(property) c1.i1_nc_p1: number", "");
|
||||
verify.completionListContains("i1_nc_f1", "(method) c1.i1_nc_f1(): void", "");
|
||||
verify.completionListContains("i1_nc_l1", "(property) c1.i1_nc_l1: () => void", "");
|
||||
verify.completionListContains("p1", "(property) c1.p1: number", "c1_p1");
|
||||
verify.completionListContains("f1", "(method) c1.f1(): void", "c1_f1");
|
||||
verify.completionListContains("l1", "(property) c1.l1: () => void", "");
|
||||
verify.completionListContains("nc_p1", "(property) c1.nc_p1: number", "c1_nc_p1");
|
||||
verify.completionListContains("nc_f1", "(method) c1.nc_f1(): void", "c1_nc_f1");
|
||||
verify.completionListContains("nc_l1", "(property) c1.nc_l1: () => void", "");
|
||||
goTo.marker('7');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('8');
|
||||
@@ -305,18 +305,18 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('11');
|
||||
verify.memberListContains("i1_p1", "(property) i1.i1_p1: number", "i1_p1");
|
||||
verify.memberListContains("i1_f1", "(method) i1.i1_f1(): void", "i1_f1");
|
||||
verify.memberListContains("i1_l1", "(property) i1.i1_l1: () => void", "");
|
||||
verify.memberListContains("i1_nc_p1", "(property) i1.i1_nc_p1: number", "");
|
||||
verify.memberListContains("i1_nc_f1", "(method) i1.i1_nc_f1(): void", "");
|
||||
verify.memberListContains("i1_nc_l1", "(property) i1.i1_nc_l1: () => void", "");
|
||||
verify.memberListContains("p1", "(property) i1.p1: number", "");
|
||||
verify.memberListContains("f1", "(method) i1.f1(): void", "");
|
||||
verify.memberListContains("l1", "(property) i1.l1: () => void", "");
|
||||
verify.memberListContains("nc_p1", "(property) i1.nc_p1: number", "");
|
||||
verify.memberListContains("nc_f1", "(method) i1.nc_f1(): void", "");
|
||||
verify.memberListContains("nc_l1", "(property) i1.nc_l1: () => void", "");
|
||||
verify.completionListContains("i1_p1", "(property) i1.i1_p1: number", "i1_p1");
|
||||
verify.completionListContains("i1_f1", "(method) i1.i1_f1(): void", "i1_f1");
|
||||
verify.completionListContains("i1_l1", "(property) i1.i1_l1: () => void", "");
|
||||
verify.completionListContains("i1_nc_p1", "(property) i1.i1_nc_p1: number", "");
|
||||
verify.completionListContains("i1_nc_f1", "(method) i1.i1_nc_f1(): void", "");
|
||||
verify.completionListContains("i1_nc_l1", "(property) i1.i1_nc_l1: () => void", "");
|
||||
verify.completionListContains("p1", "(property) i1.p1: number", "");
|
||||
verify.completionListContains("f1", "(method) i1.f1(): void", "");
|
||||
verify.completionListContains("l1", "(property) i1.l1: () => void", "");
|
||||
verify.completionListContains("nc_p1", "(property) i1.nc_p1: number", "");
|
||||
verify.completionListContains("nc_f1", "(method) i1.nc_f1(): void", "");
|
||||
verify.completionListContains("nc_l1", "(property) i1.nc_l1: () => void", "");
|
||||
goTo.marker('12');
|
||||
verify.currentSignatureHelpDocCommentIs("i1_f1");
|
||||
goTo.marker('13');
|
||||
@@ -376,18 +376,18 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('19');
|
||||
verify.memberListContains("c2_p1", "(property) c2.c2_p1: number", "c2 c2_p1");
|
||||
verify.memberListContains("c2_f1", "(method) c2.c2_f1(): void", "c2 c2_f1");
|
||||
verify.memberListContains("c2_prop", "(property) c2.c2_prop: number", "c2 c2_prop");
|
||||
verify.memberListContains("c2_nc_p1", "(property) c2.c2_nc_p1: number", "");
|
||||
verify.memberListContains("c2_nc_f1", "(method) c2.c2_nc_f1(): void", "");
|
||||
verify.memberListContains("c2_nc_prop", "(property) c2.c2_nc_prop: number", "");
|
||||
verify.memberListContains("p1", "(property) c2.p1: number", "c2 p1");
|
||||
verify.memberListContains("f1", "(method) c2.f1(): void", "c2 f1");
|
||||
verify.memberListContains("prop", "(property) c2.prop: number", "c2 prop");
|
||||
verify.memberListContains("nc_p1", "(property) c2.nc_p1: number", "");
|
||||
verify.memberListContains("nc_f1", "(method) c2.nc_f1(): void", "");
|
||||
verify.memberListContains("nc_prop", "(property) c2.nc_prop: number", "");
|
||||
verify.completionListContains("c2_p1", "(property) c2.c2_p1: number", "c2 c2_p1");
|
||||
verify.completionListContains("c2_f1", "(method) c2.c2_f1(): void", "c2 c2_f1");
|
||||
verify.completionListContains("c2_prop", "(property) c2.c2_prop: number", "c2 c2_prop");
|
||||
verify.completionListContains("c2_nc_p1", "(property) c2.c2_nc_p1: number", "");
|
||||
verify.completionListContains("c2_nc_f1", "(method) c2.c2_nc_f1(): void", "");
|
||||
verify.completionListContains("c2_nc_prop", "(property) c2.c2_nc_prop: number", "");
|
||||
verify.completionListContains("p1", "(property) c2.p1: number", "c2 p1");
|
||||
verify.completionListContains("f1", "(method) c2.f1(): void", "c2 f1");
|
||||
verify.completionListContains("prop", "(property) c2.prop: number", "c2 prop");
|
||||
verify.completionListContains("nc_p1", "(property) c2.nc_p1: number", "");
|
||||
verify.completionListContains("nc_f1", "(method) c2.nc_f1(): void", "");
|
||||
verify.completionListContains("nc_prop", "(property) c2.nc_prop: number", "");
|
||||
goTo.marker('20');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 c2_f1");
|
||||
goTo.marker('21');
|
||||
@@ -405,18 +405,18 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('24');
|
||||
verify.memberListContains("c2_p1", "(property) c2.c2_p1: number", "c2 c2_p1");
|
||||
verify.memberListContains("c2_f1", "(method) c2.c2_f1(): void", "c2 c2_f1");
|
||||
verify.memberListContains("c2_prop", "(property) c2.c2_prop: number", "c2 c2_prop");
|
||||
verify.memberListContains("c2_nc_p1", "(property) c2.c2_nc_p1: number", "");
|
||||
verify.memberListContains("c2_nc_f1", "(method) c2.c2_nc_f1(): void", "");
|
||||
verify.memberListContains("c2_nc_prop", "(property) c2.c2_nc_prop: number", "");
|
||||
verify.memberListContains("p1", "(property) c3.p1: number", "c3 p1");
|
||||
verify.memberListContains("f1", "(method) c3.f1(): void", "c3 f1");
|
||||
verify.memberListContains("prop", "(property) c3.prop: number", "c3 prop");
|
||||
verify.memberListContains("nc_p1", "(property) c3.nc_p1: number", "");
|
||||
verify.memberListContains("nc_f1", "(method) c3.nc_f1(): void", "");
|
||||
verify.memberListContains("nc_prop", "(property) c3.nc_prop: number", "");
|
||||
verify.completionListContains("c2_p1", "(property) c2.c2_p1: number", "c2 c2_p1");
|
||||
verify.completionListContains("c2_f1", "(method) c2.c2_f1(): void", "c2 c2_f1");
|
||||
verify.completionListContains("c2_prop", "(property) c2.c2_prop: number", "c2 c2_prop");
|
||||
verify.completionListContains("c2_nc_p1", "(property) c2.c2_nc_p1: number", "");
|
||||
verify.completionListContains("c2_nc_f1", "(method) c2.c2_nc_f1(): void", "");
|
||||
verify.completionListContains("c2_nc_prop", "(property) c2.c2_nc_prop: number", "");
|
||||
verify.completionListContains("p1", "(property) c3.p1: number", "c3 p1");
|
||||
verify.completionListContains("f1", "(method) c3.f1(): void", "c3 f1");
|
||||
verify.completionListContains("prop", "(property) c3.prop: number", "c3 prop");
|
||||
verify.completionListContains("nc_p1", "(property) c3.nc_p1: number", "");
|
||||
verify.completionListContains("nc_f1", "(method) c3.nc_f1(): void", "");
|
||||
verify.completionListContains("nc_prop", "(property) c3.nc_prop: number", "");
|
||||
goTo.marker('25');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 c2_f1");
|
||||
goTo.marker('26');
|
||||
@@ -434,18 +434,18 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('29');
|
||||
verify.memberListContains("c2_p1", "(property) c2.c2_p1: number", "c2 c2_p1");
|
||||
verify.memberListContains("c2_f1", "(method) c2.c2_f1(): void", "c2 c2_f1");
|
||||
verify.memberListContains("c2_prop", "(property) c2.c2_prop: number", "c2 c2_prop");
|
||||
verify.memberListContains("c2_nc_p1", "(property) c2.c2_nc_p1: number", "");
|
||||
verify.memberListContains("c2_nc_f1", "(method) c2.c2_nc_f1(): void", "");
|
||||
verify.memberListContains("c2_nc_prop", "(property) c2.c2_nc_prop: number");
|
||||
verify.memberListContains("p1", "(property) c2.p1: number", "c2 p1");
|
||||
verify.memberListContains("f1", "(method) c2.f1(): void", "c2 f1");
|
||||
verify.memberListContains("prop", "(property) c2.prop: number", "c2 prop");
|
||||
verify.memberListContains("nc_p1", "(property) c2.nc_p1: number", "");
|
||||
verify.memberListContains("nc_f1", "(method) c2.nc_f1(): void", "");
|
||||
verify.memberListContains("nc_prop", "(property) c2.nc_prop: number", "");
|
||||
verify.completionListContains("c2_p1", "(property) c2.c2_p1: number", "c2 c2_p1");
|
||||
verify.completionListContains("c2_f1", "(method) c2.c2_f1(): void", "c2 c2_f1");
|
||||
verify.completionListContains("c2_prop", "(property) c2.c2_prop: number", "c2 c2_prop");
|
||||
verify.completionListContains("c2_nc_p1", "(property) c2.c2_nc_p1: number", "");
|
||||
verify.completionListContains("c2_nc_f1", "(method) c2.c2_nc_f1(): void", "");
|
||||
verify.completionListContains("c2_nc_prop", "(property) c2.c2_nc_prop: number");
|
||||
verify.completionListContains("p1", "(property) c2.p1: number", "c2 p1");
|
||||
verify.completionListContains("f1", "(method) c2.f1(): void", "c2 f1");
|
||||
verify.completionListContains("prop", "(property) c2.prop: number", "c2 prop");
|
||||
verify.completionListContains("nc_p1", "(property) c2.nc_p1: number", "");
|
||||
verify.completionListContains("nc_f1", "(method) c2.nc_f1(): void", "");
|
||||
verify.completionListContains("nc_prop", "(property) c2.nc_prop: number", "");
|
||||
goTo.marker('30');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 c2_f1");
|
||||
goTo.marker('31');
|
||||
@@ -478,18 +478,18 @@ verify.completionListContains("c4", "class c4", "");
|
||||
verify.completionListContains("c4_i", "var c4_i: c4", "");
|
||||
|
||||
goTo.marker('36');
|
||||
verify.memberListContains("i2_p1", "(property) i2.i2_p1: number", "i2_p1");
|
||||
verify.memberListContains("i2_f1", "(method) i2.i2_f1(): void", "i2_f1");
|
||||
verify.memberListContains("i2_l1", "(property) i2.i2_l1: () => void", "");
|
||||
verify.memberListContains("i2_nc_p1", "(property) i2.i2_nc_p1: number", "");
|
||||
verify.memberListContains("i2_nc_f1", "(method) i2.i2_nc_f1(): void", "");
|
||||
verify.memberListContains("i2_nc_l1", "(property) i2.i2_nc_l1: () => void", "");
|
||||
verify.memberListContains("p1", "(property) i2.p1: number", "i2 p1");
|
||||
verify.memberListContains("f1", "(method) i2.f1(): void", "i2 f1");
|
||||
verify.memberListContains("l1", "(property) i2.l1: () => void", "");
|
||||
verify.memberListContains("nc_p1", "(property) i2.nc_p1: number", "");
|
||||
verify.memberListContains("nc_f1", "(method) i2.nc_f1(): void", "");
|
||||
verify.memberListContains("nc_l1", "(property) i2.nc_l1: () => void", "");
|
||||
verify.completionListContains("i2_p1", "(property) i2.i2_p1: number", "i2_p1");
|
||||
verify.completionListContains("i2_f1", "(method) i2.i2_f1(): void", "i2_f1");
|
||||
verify.completionListContains("i2_l1", "(property) i2.i2_l1: () => void", "");
|
||||
verify.completionListContains("i2_nc_p1", "(property) i2.i2_nc_p1: number", "");
|
||||
verify.completionListContains("i2_nc_f1", "(method) i2.i2_nc_f1(): void", "");
|
||||
verify.completionListContains("i2_nc_l1", "(property) i2.i2_nc_l1: () => void", "");
|
||||
verify.completionListContains("p1", "(property) i2.p1: number", "i2 p1");
|
||||
verify.completionListContains("f1", "(method) i2.f1(): void", "i2 f1");
|
||||
verify.completionListContains("l1", "(property) i2.l1: () => void", "");
|
||||
verify.completionListContains("nc_p1", "(property) i2.nc_p1: number", "");
|
||||
verify.completionListContains("nc_f1", "(method) i2.nc_f1(): void", "");
|
||||
verify.completionListContains("nc_l1", "(property) i2.nc_l1: () => void", "");
|
||||
goTo.marker('37');
|
||||
verify.currentSignatureHelpDocCommentIs("i2_f1");
|
||||
goTo.marker('38');
|
||||
@@ -521,18 +521,18 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('41');
|
||||
verify.memberListContains("i2_p1", "(property) i2.i2_p1: number", "i2_p1");
|
||||
verify.memberListContains("i2_f1", "(method) i2.i2_f1(): void", "i2_f1");
|
||||
verify.memberListContains("i2_l1", "(property) i2.i2_l1: () => void", "");
|
||||
verify.memberListContains("i2_nc_p1", "(property) i2.i2_nc_p1: number", "");
|
||||
verify.memberListContains("i2_nc_f1", "(method) i2.i2_nc_f1(): void", "");
|
||||
verify.memberListContains("i2_nc_l1", "(property) i2.i2_nc_l1: () => void", "");
|
||||
verify.memberListContains("p1", "(property) i3.p1: number", "i3 p1");
|
||||
verify.memberListContains("f1", "(method) i3.f1(): void", "i3 f1");
|
||||
verify.memberListContains("l1", "(property) i3.l1: () => void", "");
|
||||
verify.memberListContains("nc_p1", "(property) i3.nc_p1: number", "");
|
||||
verify.memberListContains("nc_f1", "(method) i3.nc_f1(): void", "");
|
||||
verify.memberListContains("nc_l1", "(property) i3.nc_l1: () => void", "");
|
||||
verify.completionListContains("i2_p1", "(property) i2.i2_p1: number", "i2_p1");
|
||||
verify.completionListContains("i2_f1", "(method) i2.i2_f1(): void", "i2_f1");
|
||||
verify.completionListContains("i2_l1", "(property) i2.i2_l1: () => void", "");
|
||||
verify.completionListContains("i2_nc_p1", "(property) i2.i2_nc_p1: number", "");
|
||||
verify.completionListContains("i2_nc_f1", "(method) i2.i2_nc_f1(): void", "");
|
||||
verify.completionListContains("i2_nc_l1", "(property) i2.i2_nc_l1: () => void", "");
|
||||
verify.completionListContains("p1", "(property) i3.p1: number", "i3 p1");
|
||||
verify.completionListContains("f1", "(method) i3.f1(): void", "i3 f1");
|
||||
verify.completionListContains("l1", "(property) i3.l1: () => void", "");
|
||||
verify.completionListContains("nc_p1", "(property) i3.nc_p1: number", "");
|
||||
verify.completionListContains("nc_f1", "(method) i3.nc_f1(): void", "");
|
||||
verify.completionListContains("nc_l1", "(property) i3.nc_l1: () => void", "");
|
||||
goTo.marker('42');
|
||||
verify.currentSignatureHelpDocCommentIs("i2_f1");
|
||||
goTo.marker('43');
|
||||
@@ -562,18 +562,18 @@ verify.quickInfos({
|
||||
});
|
||||
|
||||
goTo.marker('46');
|
||||
verify.memberListContains("i2_p1", "(property) i2.i2_p1: number", "i2_p1");
|
||||
verify.memberListContains("i2_f1", "(method) i2.i2_f1(): void", "i2_f1");
|
||||
verify.memberListContains("i2_l1", "(property) i2.i2_l1: () => void", "");
|
||||
verify.memberListContains("i2_nc_p1", "(property) i2.i2_nc_p1: number", "");
|
||||
verify.memberListContains("i2_nc_f1", "(method) i2.i2_nc_f1(): void", "");
|
||||
verify.memberListContains("i2_nc_l1", "(property) i2.i2_nc_l1: () => void", "");
|
||||
verify.memberListContains("p1", "(property) i2.p1: number", "i2 p1");
|
||||
verify.memberListContains("f1", "(method) i2.f1(): void", "i2 f1");
|
||||
verify.memberListContains("l1", "(property) i2.l1: () => void", "");
|
||||
verify.memberListContains("nc_p1", "(property) i2.nc_p1: number", "");
|
||||
verify.memberListContains("nc_f1", "(method) i2.nc_f1(): void", "");
|
||||
verify.memberListContains("nc_l1", "(property) i2.nc_l1: () => void", "");
|
||||
verify.completionListContains("i2_p1", "(property) i2.i2_p1: number", "i2_p1");
|
||||
verify.completionListContains("i2_f1", "(method) i2.i2_f1(): void", "i2_f1");
|
||||
verify.completionListContains("i2_l1", "(property) i2.i2_l1: () => void", "");
|
||||
verify.completionListContains("i2_nc_p1", "(property) i2.i2_nc_p1: number", "");
|
||||
verify.completionListContains("i2_nc_f1", "(method) i2.i2_nc_f1(): void", "");
|
||||
verify.completionListContains("i2_nc_l1", "(property) i2.i2_nc_l1: () => void", "");
|
||||
verify.completionListContains("p1", "(property) i2.p1: number", "i2 p1");
|
||||
verify.completionListContains("f1", "(method) i2.f1(): void", "i2 f1");
|
||||
verify.completionListContains("l1", "(property) i2.l1: () => void", "");
|
||||
verify.completionListContains("nc_p1", "(property) i2.nc_p1: number", "");
|
||||
verify.completionListContains("nc_f1", "(method) i2.nc_f1(): void", "");
|
||||
verify.completionListContains("nc_l1", "(property) i2.nc_l1: () => void", "");
|
||||
goTo.marker('47');
|
||||
verify.currentSignatureHelpDocCommentIs("i2_f1");
|
||||
goTo.marker('48');
|
||||
|
||||
@@ -80,12 +80,12 @@ verify.quickInfos({
|
||||
|
||||
goTo.marker('8');
|
||||
verify.quickInfoIs("(property) i2.x: number", "this is x");
|
||||
verify.memberListContains("x", "(property) i2.x: number", "this is x");
|
||||
verify.memberListContains("foo", "(property) i2.foo: (b: number) => string", "this is foo");
|
||||
verify.memberListContains("nc_x", "(property) i2.nc_x: number", "");
|
||||
verify.memberListContains("nc_foo", "(property) i2.nc_foo: (b: number) => string", "");
|
||||
verify.memberListContains("fnfoo", "(method) i2.fnfoo(b: number): string", "this is fnfoo");
|
||||
verify.memberListContains("nc_fnfoo", "(method) i2.nc_fnfoo(b: number): string", "");
|
||||
verify.completionListContains("x", "(property) i2.x: number", "this is x");
|
||||
verify.completionListContains("foo", "(property) i2.foo: (b: number) => string", "this is foo");
|
||||
verify.completionListContains("nc_x", "(property) i2.nc_x: number", "");
|
||||
verify.completionListContains("nc_foo", "(property) i2.nc_foo: (b: number) => string", "");
|
||||
verify.completionListContains("fnfoo", "(method) i2.fnfoo(b: number): string", "this is fnfoo");
|
||||
verify.completionListContains("nc_fnfoo", "(method) i2.nc_fnfoo(b: number): string", "");
|
||||
|
||||
verify.quickInfos({
|
||||
9: "var i2_i_foo: (b: number) => string",
|
||||
@@ -199,12 +199,12 @@ verify.completionListContains("i3_i", "var i3_i: i3", "");
|
||||
|
||||
goTo.marker('41');
|
||||
verify.quickInfoIs("(method) i3.f(a: number): string", "Function i3 f");
|
||||
verify.memberListContains("f", "(method) i3.f(a: number): string", "Function i3 f");
|
||||
verify.memberListContains("l", "(property) i3.l: (b: number) => string", "");
|
||||
verify.memberListContains("x", "(property) i3.x: number", "Comment i3 x");
|
||||
verify.memberListContains("nc_f", "(method) i3.nc_f(a: number): string", "");
|
||||
verify.memberListContains("nc_l", "(property) i3.nc_l: (b: number) => string", "");
|
||||
verify.memberListContains("nc_x", "(property) i3.nc_x: number", "");
|
||||
verify.completionListContains("f", "(method) i3.f(a: number): string", "Function i3 f");
|
||||
verify.completionListContains("l", "(property) i3.l: (b: number) => string", "");
|
||||
verify.completionListContains("x", "(property) i3.x: number", "Comment i3 x");
|
||||
verify.completionListContains("nc_f", "(method) i3.nc_f(a: number): string", "");
|
||||
verify.completionListContains("nc_l", "(property) i3.nc_l: (b: number) => string", "");
|
||||
verify.completionListContains("nc_x", "(property) i3.nc_x: number", "");
|
||||
|
||||
goTo.marker('42');
|
||||
verify.currentSignatureHelpDocCommentIs("Function i3 f");
|
||||
|
||||
@@ -110,9 +110,9 @@ goTo.marker('4');
|
||||
verify.completionListContains("m1", "namespace m1", "Namespace comment");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.memberListContains("b", "var m1.b: number", "b's comment");
|
||||
verify.memberListContains("fooExport", "function m1.fooExport(): number", "exported function");
|
||||
verify.memberListContains("m2", "namespace m1.m2");
|
||||
verify.completionListContains("b", "var m1.b: number", "b's comment");
|
||||
verify.completionListContains("fooExport", "function m1.fooExport(): number", "exported function");
|
||||
verify.completionListContains("m2", "namespace m1.m2");
|
||||
verify.quickInfoIs("function m1.fooExport(): number", "exported function");
|
||||
|
||||
goTo.marker('6');
|
||||
@@ -122,55 +122,55 @@ verify.quickInfoAt("7", "var myvar: m1.m2.c");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.quickInfoIs("constructor m1.m2.c(): m1.m2.c");
|
||||
verify.memberListContains("c", "constructor m1.m2.c(): m1.m2.c", "");
|
||||
verify.memberListContains("i", "var m1.m2.i: m1.m2.c", "i");
|
||||
verify.completionListContains("c", "constructor m1.m2.c(): m1.m2.c", "");
|
||||
verify.completionListContains("i", "var m1.m2.i: m1.m2.c", "i");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.completionListContains("m2", "namespace m2", "namespace comment of m2.m3");
|
||||
verify.quickInfoIs("namespace m2", "namespace comment of m2.m3");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.memberListContains("m3", "namespace m2.m3");
|
||||
verify.completionListContains("m3", "namespace m2.m3");
|
||||
verify.quickInfoIs("namespace m2.m3", "namespace comment of m2.m3");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.quickInfoIs("constructor m2.m3.c(): m2.m3.c");
|
||||
verify.memberListContains("c", "constructor m2.m3.c(): m2.m3.c", "");
|
||||
verify.completionListContains("c", "constructor m2.m3.c(): m2.m3.c", "");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.completionListContains("m3", "namespace m3", "namespace comment of m3.m4.m5");
|
||||
verify.quickInfoIs("namespace m3", "namespace comment of m3.m4.m5");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.memberListContains("m4", "namespace m3.m4", "namespace comment of m3.m4.m5");
|
||||
verify.completionListContains("m4", "namespace m3.m4", "namespace comment of m3.m4.m5");
|
||||
verify.quickInfoIs("namespace m3.m4", "namespace comment of m3.m4.m5");
|
||||
|
||||
goTo.marker('14');
|
||||
verify.memberListContains("m5", "namespace m3.m4.m5");
|
||||
verify.completionListContains("m5", "namespace m3.m4.m5");
|
||||
verify.quickInfoIs("namespace m3.m4.m5", "namespace comment of m3.m4.m5");
|
||||
|
||||
goTo.marker('15');
|
||||
verify.quickInfoIs("constructor m3.m4.m5.c(): m3.m4.m5.c");
|
||||
verify.memberListContains("c", "constructor m3.m4.m5.c(): m3.m4.m5.c", "");
|
||||
verify.completionListContains("c", "constructor m3.m4.m5.c(): m3.m4.m5.c", "");
|
||||
|
||||
goTo.marker('16');
|
||||
verify.completionListContains("m4", "namespace m4", "namespace comment of m4.m5.m6");
|
||||
verify.quickInfoIs("namespace m4", "namespace comment of m4.m5.m6");
|
||||
|
||||
goTo.marker('17');
|
||||
verify.memberListContains("m5", "namespace m4.m5", "namespace comment of m4.m5.m6");
|
||||
verify.completionListContains("m5", "namespace m4.m5", "namespace comment of m4.m5.m6");
|
||||
verify.quickInfoIs("namespace m4.m5", "namespace comment of m4.m5.m6");
|
||||
|
||||
goTo.marker('18');
|
||||
verify.memberListContains("m6", "namespace m4.m5.m6");
|
||||
verify.completionListContains("m6", "namespace m4.m5.m6");
|
||||
verify.quickInfoIs("namespace m4.m5.m6", "namespace comment of m4.m5.m6");
|
||||
|
||||
goTo.marker('19');
|
||||
verify.memberListContains("m7", "namespace m4.m5.m6.m7");
|
||||
verify.completionListContains("m7", "namespace m4.m5.m6.m7");
|
||||
verify.quickInfoIs("namespace m4.m5.m6.m7");
|
||||
|
||||
goTo.marker('20');
|
||||
verify.memberListContains("c", "constructor m4.m5.m6.m7.c(): m4.m5.m6.m7.c", "");
|
||||
verify.completionListContains("c", "constructor m4.m5.m6.m7.c(): m4.m5.m6.m7.c", "");
|
||||
verify.quickInfoIs("constructor m4.m5.m6.m7.c(): m4.m5.m6.m7.c");
|
||||
|
||||
goTo.marker('21');
|
||||
@@ -178,19 +178,19 @@ verify.completionListContains("m5", "namespace m5");
|
||||
verify.quickInfoIs("namespace m5", "namespace comment of m5.m6.m7");
|
||||
|
||||
goTo.marker('22');
|
||||
verify.memberListContains("m6", "namespace m5.m6");
|
||||
verify.completionListContains("m6", "namespace m5.m6");
|
||||
verify.quickInfoIs("namespace m5.m6", "namespace comment of m5.m6.m7");
|
||||
|
||||
goTo.marker('23');
|
||||
verify.memberListContains("m7", "namespace m5.m6.m7");
|
||||
verify.completionListContains("m7", "namespace m5.m6.m7");
|
||||
verify.quickInfoIs("namespace m5.m6.m7", "namespace comment of m5.m6.m7");
|
||||
|
||||
goTo.marker('24');
|
||||
verify.memberListContains("m8", "namespace m5.m6.m7.m8");
|
||||
verify.completionListContains("m8", "namespace m5.m6.m7.m8");
|
||||
verify.quickInfoIs("namespace m5.m6.m7.m8", "namespace m8 comment");
|
||||
|
||||
goTo.marker('25');
|
||||
verify.memberListContains("c", "constructor m5.m6.m7.m8.c(): m5.m6.m7.m8.c", "");
|
||||
verify.completionListContains("c", "constructor m5.m6.m7.m8.c(): m5.m6.m7.m8.c", "");
|
||||
verify.quickInfoIs("constructor m5.m6.m7.m8.c(): m5.m6.m7.m8.c");
|
||||
|
||||
goTo.marker('26');
|
||||
@@ -198,15 +198,15 @@ verify.completionListContains("m6", "namespace m6");
|
||||
verify.quickInfoIs("namespace m6");
|
||||
|
||||
goTo.marker('27');
|
||||
verify.memberListContains("m7", "namespace m6.m7");
|
||||
verify.completionListContains("m7", "namespace m6.m7");
|
||||
verify.quickInfoIs("namespace m6.m7");
|
||||
|
||||
goTo.marker('28');
|
||||
verify.memberListContains("m8", "namespace m6.m7.m8");
|
||||
verify.completionListContains("m8", "namespace m6.m7.m8");
|
||||
verify.quickInfoIs("namespace m6.m7.m8");
|
||||
|
||||
goTo.marker('29');
|
||||
verify.memberListContains("c", "constructor m6.m7.m8.c(): m6.m7.m8.c", "");
|
||||
verify.completionListContains("c", "constructor m6.m7.m8.c(): m6.m7.m8.c", "");
|
||||
verify.quickInfoIs("constructor m6.m7.m8.c(): m6.m7.m8.c");
|
||||
|
||||
goTo.marker('30');
|
||||
@@ -214,15 +214,15 @@ verify.completionListContains("m7", "namespace m7");
|
||||
verify.quickInfoIs("namespace m7");
|
||||
|
||||
goTo.marker('31');
|
||||
verify.memberListContains("m8", "namespace m7.m8");
|
||||
verify.completionListContains("m8", "namespace m7.m8");
|
||||
verify.quickInfoIs("namespace m7.m8");
|
||||
|
||||
goTo.marker('32');
|
||||
verify.memberListContains("m9", "namespace m7.m8.m9");
|
||||
verify.completionListContains("m9", "namespace m7.m8.m9");
|
||||
verify.quickInfoIs("namespace m7.m8.m9", "namespace m9 comment");
|
||||
|
||||
goTo.marker('33');
|
||||
verify.memberListContains("c", "constructor m7.m8.m9.c(): m7.m8.m9.c", "");
|
||||
verify.completionListContains("c", "constructor m7.m8.m9.c(): m7.m8.m9.c", "");
|
||||
verify.quickInfoIs("constructor m7.m8.m9.c(): m7.m8.m9.c");
|
||||
|
||||
goTo.marker('34');
|
||||
|
||||
@@ -326,10 +326,10 @@ goTo.marker('22q');
|
||||
verify.quickInfoAt("22q", "var i1_i: i1(b: string) => number (+1 overload)", "this is signature 2");
|
||||
|
||||
goTo.marker('23');
|
||||
verify.memberListContains('foo', '(method) i1.foo(a: number): number (+1 overload)', 'foo 1');
|
||||
verify.memberListContains('foo2', '(method) i1.foo2(a: number): number (+1 overload)', '');
|
||||
verify.memberListContains('foo3', '(method) i1.foo3(a: number): number (+1 overload)', '');
|
||||
verify.memberListContains('foo4', '(method) i1.foo4(a: number): number (+1 overload)', 'foo4 1');
|
||||
verify.completionListContains('foo', '(method) i1.foo(a: number): number (+1 overload)', 'foo 1');
|
||||
verify.completionListContains('foo2', '(method) i1.foo2(a: number): number (+1 overload)', '');
|
||||
verify.completionListContains('foo3', '(method) i1.foo3(a: number): number (+1 overload)', '');
|
||||
verify.completionListContains('foo4', '(method) i1.foo4(a: number): number (+1 overload)', 'foo4 1');
|
||||
|
||||
goTo.marker('24');
|
||||
verify.currentSignatureHelpDocCommentIs("foo 1");
|
||||
@@ -432,11 +432,11 @@ verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
verify.quickInfoAt("43q", "var i4_i: i4(b: string) => number (+1 overload)");
|
||||
|
||||
goTo.marker('44');
|
||||
verify.memberListContains('prop1', '(method) c.prop1(a: number): number (+1 overload)', '');
|
||||
verify.memberListContains('prop2', '(method) c.prop2(a: number): number (+1 overload)', 'prop2 1');
|
||||
verify.memberListContains('prop3', '(method) c.prop3(a: number): number (+1 overload)', '');
|
||||
verify.memberListContains('prop4', '(method) c.prop4(a: number): number (+1 overload)', 'prop4 1');
|
||||
verify.memberListContains('prop5', '(method) c.prop5(a: number): number (+1 overload)', 'prop5 1');
|
||||
verify.completionListContains('prop1', '(method) c.prop1(a: number): number (+1 overload)', '');
|
||||
verify.completionListContains('prop2', '(method) c.prop2(a: number): number (+1 overload)', 'prop2 1');
|
||||
verify.completionListContains('prop3', '(method) c.prop3(a: number): number (+1 overload)', '');
|
||||
verify.completionListContains('prop4', '(method) c.prop4(a: number): number (+1 overload)', 'prop4 1');
|
||||
verify.completionListContains('prop5', '(method) c.prop5(a: number): number (+1 overload)', 'prop5 1');
|
||||
|
||||
goTo.marker('45');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
////x./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("commonProperty", "(property) commonProperty: string | number");
|
||||
verify.memberListContains("commonFunction", "(method) commonFunction(): number");
|
||||
verify.memberListCount(2);
|
||||
verify.completionListContains("commonProperty", "(property) commonProperty: string | number");
|
||||
verify.completionListContains("commonFunction", "(method) commonFunction(): number");
|
||||
verify.completionListCount(2);
|
||||
@@ -15,6 +15,6 @@
|
||||
////x.commonProperty./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("toString", "(method) toString(): string");
|
||||
verify.memberListContains("valueOf", "(method) valueOf(): string | number");
|
||||
verify.memberListCount(2);
|
||||
verify.completionListContains("toString", "(method) toString(): string");
|
||||
verify.completionListContains("valueOf", "(method) valueOf(): string | number");
|
||||
verify.completionListCount(2);
|
||||
@@ -16,9 +16,9 @@
|
||||
goTo.marker('0');
|
||||
verify.completionListContains("jspm");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(1);
|
||||
verify.completionListCount(1);
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("jspm:dev");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(4);
|
||||
verify.completionListCount(4);
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
goTo.marker('0');
|
||||
verify.completionListContains("jspm");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(1);
|
||||
verify.completionListCount(1);
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("jspm:dev");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(4);
|
||||
verify.completionListCount(4);
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
goTo.marker('0');
|
||||
verify.completionListContains("jspm");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(1);
|
||||
verify.completionListCount(1);
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("jspm:browser");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(2);
|
||||
verify.completionListCount(2);
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
goTo.marker('0');
|
||||
verify.completionListContains("jspm");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(1);
|
||||
verify.completionListCount(1);
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("jspm:dev");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(4);
|
||||
verify.completionListCount(4);
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("Option 1");
|
||||
verify.memberListCount(3);
|
||||
verify.completionListCount(3);
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains("Option 2");
|
||||
verify.memberListCount(3);
|
||||
verify.completionListCount(3);
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("foo");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(3);
|
||||
verify.completionListCount(3);
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains("some other name");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(3);
|
||||
verify.completionListCount(3);
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("A");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(3);
|
||||
verify.completionListCount(3);
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains("A");
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
verify.memberListCount(3);
|
||||
verify.completionListCount(3);
|
||||
|
||||
@@ -20,4 +20,4 @@ verify.quickInfoIs('function f(p1: "literal", p2: "literal", p3: "other1" | "oth
|
||||
goTo.marker('2');
|
||||
verify.completionListContains("other1");
|
||||
verify.completionListContains("other2");
|
||||
verify.memberListCount(2);
|
||||
verify.completionListCount(2);
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
//// }
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("charAt");
|
||||
verify.memberListCount(1);
|
||||
verify.completionListContains("charAt");
|
||||
verify.completionListCount(1);
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
////testModule./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("foo");
|
||||
verify.completionListContains("foo");
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
////var v = { x: 4, y: 3 }./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.not.memberListContains('a');
|
||||
verify.memberListContains('x');
|
||||
verify.not.completionListContains('a');
|
||||
verify.completionListContains('x');
|
||||
@@ -4,5 +4,5 @@
|
||||
/////a/./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.not.memberListContains('v');
|
||||
verify.memberListContains('compile');
|
||||
verify.not.completionListContains('v');
|
||||
verify.completionListContains('compile');
|
||||
@@ -3,5 +3,5 @@
|
||||
/////a/./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.not.memberListContains('alert');
|
||||
verify.memberListContains('compile');
|
||||
verify.not.completionListContains('alert');
|
||||
verify.completionListContains('compile');
|
||||
@@ -3,5 +3,5 @@
|
||||
////"a"./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.not.memberListContains('alert');
|
||||
verify.memberListContains('charAt');
|
||||
verify.not.completionListContains('alert');
|
||||
verify.completionListContains('charAt');
|
||||
@@ -15,4 +15,4 @@
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListIsEmpty();
|
||||
verify.memberListIsEmpty();
|
||||
verify.completionListIsEmpty();
|
||||
@@ -15,4 +15,4 @@
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListIsEmpty();
|
||||
verify.memberListIsEmpty();
|
||||
verify.completionListIsEmpty();
|
||||
@@ -3,4 +3,4 @@
|
||||
//// if(0 === ''.
|
||||
|
||||
goTo.eof();
|
||||
verify.memberListContains("charAt");
|
||||
verify.completionListContains("charAt");
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
////var p = <Shapes.
|
||||
|
||||
goTo.eof();
|
||||
verify.memberListContains("Point");
|
||||
verify.completionListContains("Point");
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("charAt");
|
||||
verify.completionListContains("charAt");
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
|
||||
goTo.marker("TypeReference");
|
||||
verify.memberListContains("C1");
|
||||
verify.memberListContains("C2");
|
||||
verify.completionListContains("C1");
|
||||
verify.completionListContains("C2");
|
||||
|
||||
goTo.marker("ValueReference");
|
||||
verify.memberListContains("C1");
|
||||
verify.memberListContains("C2");
|
||||
verify.completionListContains("C1");
|
||||
verify.completionListContains("C2");
|
||||
@@ -14,17 +14,17 @@
|
||||
|
||||
goTo.marker("c1");
|
||||
edit.insert(".");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("prototype");
|
||||
verify.memberListContains("staticMethod");
|
||||
verify.completionListContains("x");
|
||||
verify.completionListContains("prototype");
|
||||
verify.completionListContains("staticMethod");
|
||||
|
||||
goTo.marker("c2");
|
||||
edit.insert(".");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("staticMethod");
|
||||
verify.memberListContains("prototype");
|
||||
verify.completionListContains("x");
|
||||
verify.completionListContains("staticMethod");
|
||||
verify.completionListContains("prototype");
|
||||
|
||||
goTo.marker("c3");
|
||||
edit.insert(".");
|
||||
verify.memberListContains("doStuff");
|
||||
verify.memberListCount(1);
|
||||
verify.completionListContains("doStuff");
|
||||
verify.completionListCount(1);
|
||||
|
||||
@@ -25,46 +25,46 @@
|
||||
|
||||
|
||||
goTo.marker("staticsInsideClassScope");
|
||||
verify.memberListContains("privateStaticProperty");
|
||||
verify.memberListContains("privateStaticMethod");
|
||||
verify.memberListContains("publicStaticProperty");
|
||||
verify.memberListContains("publicStaticMethod");
|
||||
verify.completionListContains("privateStaticProperty");
|
||||
verify.completionListContains("privateStaticMethod");
|
||||
verify.completionListContains("publicStaticProperty");
|
||||
verify.completionListContains("publicStaticMethod");
|
||||
// No instance properties
|
||||
verify.not.memberListContains("privateProperty");
|
||||
verify.not.memberListContains("privateInstanceMethod");
|
||||
verify.not.completionListContains("privateProperty");
|
||||
verify.not.completionListContains("privateInstanceMethod");
|
||||
// constructors should have a 'prototype' member
|
||||
verify.memberListContains("prototype");
|
||||
verify.completionListContains("prototype");
|
||||
|
||||
goTo.marker("instanceMembersInsideClassScope");
|
||||
verify.memberListContains("privateProperty");
|
||||
verify.memberListContains("privateInstanceMethod");
|
||||
verify.memberListContains("publicProperty");
|
||||
verify.memberListContains("publicInstanceMethod");
|
||||
verify.completionListContains("privateProperty");
|
||||
verify.completionListContains("privateInstanceMethod");
|
||||
verify.completionListContains("publicProperty");
|
||||
verify.completionListContains("publicInstanceMethod");
|
||||
// No statics
|
||||
verify.not.memberListContains("privateStaticProperty");
|
||||
verify.not.memberListContains("privateStaticMethod");
|
||||
verify.not.completionListContains("privateStaticProperty");
|
||||
verify.not.completionListContains("privateStaticMethod");
|
||||
|
||||
|
||||
goTo.marker("staticsOutsideClassScope");
|
||||
// No privates
|
||||
verify.not.memberListContains("privateStaticProperty");
|
||||
verify.not.memberListContains("privateStaticMethod");
|
||||
verify.not.completionListContains("privateStaticProperty");
|
||||
verify.not.completionListContains("privateStaticMethod");
|
||||
// Only publics
|
||||
verify.memberListContains("publicStaticProperty");
|
||||
verify.memberListContains("publicStaticMethod");
|
||||
verify.completionListContains("publicStaticProperty");
|
||||
verify.completionListContains("publicStaticMethod");
|
||||
// No instance properties
|
||||
verify.not.memberListContains("publicProperty");
|
||||
verify.not.memberListContains("publicInstanceMethod");
|
||||
verify.not.completionListContains("publicProperty");
|
||||
verify.not.completionListContains("publicInstanceMethod");
|
||||
// constructors should have a 'prototype' member
|
||||
verify.memberListContains("prototype");
|
||||
verify.completionListContains("prototype");
|
||||
|
||||
goTo.marker("instanceMembersOutsideClassScope");
|
||||
// No privates
|
||||
verify.not.memberListContains("privateProperty");
|
||||
verify.not.memberListContains("privateInstanceMethod");
|
||||
verify.not.completionListContains("privateProperty");
|
||||
verify.not.completionListContains("privateInstanceMethod");
|
||||
// Only publics
|
||||
verify.memberListContains("publicProperty");
|
||||
verify.memberListContains("publicInstanceMethod");
|
||||
verify.completionListContains("publicProperty");
|
||||
verify.completionListContains("publicInstanceMethod");
|
||||
// No statics
|
||||
verify.not.memberListContains("publicStaticProperty");
|
||||
verify.not.memberListContains("publicStaticMethod");
|
||||
verify.not.completionListContains("publicStaticProperty");
|
||||
verify.not.completionListContains("publicStaticMethod");
|
||||
@@ -10,15 +10,15 @@
|
||||
////Foo.bar./*enumValueReference*/;
|
||||
|
||||
goTo.marker('valueReference');
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("baz");
|
||||
verify.memberListCount(2);
|
||||
verify.completionListContains("bar");
|
||||
verify.completionListContains("baz");
|
||||
verify.completionListCount(2);
|
||||
|
||||
|
||||
goTo.marker('typeReference');
|
||||
verify.memberListCount(2);
|
||||
verify.completionListCount(2);
|
||||
|
||||
goTo.marker('enumValueReference');
|
||||
verify.memberListContains("toString");
|
||||
verify.memberListContains("toFixed");
|
||||
verify.memberListCount(6);
|
||||
verify.completionListContains("toString");
|
||||
verify.completionListContains("toFixed");
|
||||
verify.completionListCount(6);
|
||||
|
||||
@@ -15,18 +15,18 @@
|
||||
|
||||
goTo.marker("enumVariable");
|
||||
// Should only have the enum's own members, and nothing else
|
||||
verify.memberListContains("Red");
|
||||
verify.memberListContains("Green");
|
||||
verify.memberListCount(2);
|
||||
verify.completionListContains("Red");
|
||||
verify.completionListContains("Green");
|
||||
verify.completionListCount(2);
|
||||
|
||||
|
||||
goTo.marker("variableOfEnumType");
|
||||
// Should have number members, and not enum members
|
||||
verify.memberListContains("toString");
|
||||
verify.not.memberListContains("Red");
|
||||
verify.completionListContains("toString");
|
||||
verify.not.completionListContains("Red");
|
||||
|
||||
|
||||
goTo.marker("callOfEnumReturnType");
|
||||
// Should have number members, and not enum members
|
||||
verify.memberListContains("toString");
|
||||
verify.not.memberListContains("Red");
|
||||
verify.completionListContains("toString");
|
||||
verify.not.completionListContains("Red");
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
/////*1*/var bar;
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("fun");
|
||||
verify.completionListContains("fun");
|
||||
verify.not.errorExistsAfterMarker("1");
|
||||
+1
-1
@@ -10,4 +10,4 @@
|
||||
//// test./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.not.memberListContains("x");
|
||||
verify.not.completionListContains("x");
|
||||
@@ -19,17 +19,17 @@
|
||||
////spreadNull./*3*/a;
|
||||
////spreadUndefined./*4*/a;
|
||||
goTo.marker('1');
|
||||
verify.memberListContains('a', '(property) a: number');
|
||||
verify.memberListContains('b', '(property) b: string');
|
||||
verify.memberListCount(2);
|
||||
verify.completionListContains('a', '(property) a: number');
|
||||
verify.completionListContains('b', '(property) b: string');
|
||||
verify.completionListCount(2);
|
||||
goTo.marker('2');
|
||||
verify.memberListContains('a', '(property) a: number');
|
||||
verify.memberListContains('b', '(property) b: boolean');
|
||||
verify.memberListContains('c', '(property) c: number');
|
||||
verify.memberListCount(3);
|
||||
verify.completionListContains('a', '(property) a: number');
|
||||
verify.completionListContains('b', '(property) b: boolean');
|
||||
verify.completionListContains('c', '(property) c: number');
|
||||
verify.completionListCount(3);
|
||||
goTo.marker('3');
|
||||
verify.memberListContains('a', '(property) a: number');
|
||||
verify.memberListCount(1);
|
||||
verify.completionListContains('a', '(property) a: number');
|
||||
verify.completionListCount(1);
|
||||
goTo.marker('4');
|
||||
verify.memberListContains('a', '(property) a: number');
|
||||
verify.memberListCount(1);
|
||||
verify.completionListContains('a', '(property) a: number');
|
||||
verify.completionListCount(1);
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
////var { x, ...rest } = t;
|
||||
////rest./*1*/x;
|
||||
goTo.marker('1');
|
||||
verify.memberListContains('parent', '(property) Gen.parent: Gen');
|
||||
verify.memberListContains('millenial', '(property) Gen.millenial: string');
|
||||
verify.memberListCount(2);
|
||||
verify.completionListContains('parent', '(property) Gen.parent: Gen');
|
||||
verify.completionListContains('millenial', '(property) Gen.millenial: string');
|
||||
verify.completionListCount(2);
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
//// var person: {name:string; id: number} = { n/**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains('name');
|
||||
verify.memberListContains('id');
|
||||
verify.completionListContains('name');
|
||||
verify.completionListContains('id');
|
||||
@@ -3,5 +3,5 @@
|
||||
//// var person: {name:string; id: number} = { n/**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains('name');
|
||||
verify.memberListContains('id');
|
||||
verify.completionListContains('name');
|
||||
verify.completionListContains('id');
|
||||
@@ -8,4 +8,4 @@
|
||||
////fnc1./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains('arguments', '(property) Function.arguments: any');
|
||||
verify.completionListContains('arguments', '(property) Function.arguments: any');
|
||||
@@ -52,26 +52,26 @@
|
||||
////}
|
||||
|
||||
goTo.marker("objectMembers");
|
||||
verify.memberListContains("hasOwnProperty");
|
||||
verify.memberListContains("isPrototypeOf");
|
||||
verify.memberListContains("toString");
|
||||
verify.completionListContains("hasOwnProperty");
|
||||
verify.completionListContains("isPrototypeOf");
|
||||
verify.completionListContains("toString");
|
||||
|
||||
goTo.marker("interfaceMembers");
|
||||
verify.memberListContains("bar11");
|
||||
verify.memberListContains("bar12");
|
||||
verify.memberListContains("bar21");
|
||||
verify.memberListContains("bar22");
|
||||
verify.completionListContains("bar11");
|
||||
verify.completionListContains("bar12");
|
||||
verify.completionListContains("bar21");
|
||||
verify.completionListContains("bar22");
|
||||
|
||||
goTo.marker("callableMembers");
|
||||
verify.memberListContains("name");
|
||||
verify.memberListContains("apply");
|
||||
verify.memberListContains("call");
|
||||
verify.memberListContains("bind");
|
||||
verify.completionListContains("name");
|
||||
verify.completionListContains("apply");
|
||||
verify.completionListContains("call");
|
||||
verify.completionListContains("bind");
|
||||
|
||||
goTo.marker("publicOnlyMemebers");
|
||||
verify.memberListContains("publicProperty");
|
||||
verify.memberListContains("publicMethod");
|
||||
verify.not.memberListContains("privateProperty");
|
||||
verify.not.memberListContains("privateMethod");
|
||||
verify.not.memberListContains("publicStaticMethod");
|
||||
verify.not.memberListContains("privateStaticMethod");
|
||||
verify.completionListContains("publicProperty");
|
||||
verify.completionListContains("publicMethod");
|
||||
verify.not.completionListContains("privateProperty");
|
||||
verify.not.completionListContains("privateMethod");
|
||||
verify.not.completionListContains("publicStaticMethod");
|
||||
verify.not.completionListContains("privateStaticMethod");
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
verify.completionListContains("foo");
|
||||
verify.completionListContains("x");
|
||||
verify.completionListContains("y");
|
||||
verify.completionListContains("z");
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
verify.completionListContains("foo");
|
||||
verify.completionListContains("x");
|
||||
verify.completionListContains("y");
|
||||
verify.completionListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // questionable
|
||||
verify.completionListContains("bar");
|
||||
verify.completionListContains("a");
|
||||
verify.completionListContains("b");
|
||||
verify.completionListContains("c"); // questionable
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
verify.completionListContains("foo");
|
||||
verify.completionListContains("x");
|
||||
verify.completionListContains("y");
|
||||
verify.completionListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // questionable
|
||||
verify.completionListContains("bar");
|
||||
verify.completionListContains("a");
|
||||
verify.completionListContains("b");
|
||||
verify.completionListContains("c"); // questionable
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
verify.completionListContains("foo");
|
||||
verify.completionListContains("x");
|
||||
verify.completionListContains("y");
|
||||
verify.completionListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // definitely questionable
|
||||
verify.completionListContains("bar");
|
||||
verify.completionListContains("a");
|
||||
verify.completionListContains("b");
|
||||
verify.completionListContains("c"); // definitely questionable
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
verify.completionListContains("foo");
|
||||
verify.completionListContains("x");
|
||||
verify.completionListContains("y");
|
||||
verify.completionListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
verify.completionListContains("bar");
|
||||
verify.completionListContains("a");
|
||||
verify.completionListContains("b");
|
||||
verify.completionListContains("c");
|
||||
|
||||
verify.memberListContains("v"); // questionable
|
||||
verify.completionListContains("v"); // questionable
|
||||
@@ -11,4 +11,4 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("MyType");
|
||||
verify.completionListContains("MyType");
|
||||
@@ -11,15 +11,15 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
verify.completionListContains("foo");
|
||||
verify.completionListContains("x");
|
||||
verify.completionListContains("y");
|
||||
verify.completionListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
verify.completionListContains("bar");
|
||||
verify.completionListContains("a");
|
||||
verify.completionListContains("b");
|
||||
verify.completionListContains("c");
|
||||
|
||||
verify.memberListContains("v");
|
||||
verify.memberListContains("p");
|
||||
verify.completionListContains("v");
|
||||
verify.completionListContains("p");
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("I");
|
||||
verify.memberListContains("TString");
|
||||
verify.memberListContains("TNumber");
|
||||
verify.completionListContains("I");
|
||||
verify.completionListContains("TString");
|
||||
verify.completionListContains("TNumber");
|
||||
|
||||
// Ideally the following shouldn't show up since they're not types.
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("obj");
|
||||
verify.completionListContains("foo");
|
||||
verify.completionListContains("obj");
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("I");
|
||||
verify.memberListContains("TString");
|
||||
verify.memberListContains("TNumber"); // REVIEW: Is this intended behavior?
|
||||
verify.completionListContains("I");
|
||||
verify.completionListContains("TString");
|
||||
verify.completionListContains("TNumber"); // REVIEW: Is this intended behavior?
|
||||
|
||||
// Ideally the following shouldn't show up since they're not types.
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("obj");
|
||||
verify.completionListContains("foo");
|
||||
verify.completionListContains("obj");
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("I");
|
||||
verify.memberListContains("TString");
|
||||
verify.memberListContains("TNumber"); // REVIEW: Is this intended behavior?
|
||||
verify.completionListContains("I");
|
||||
verify.completionListContains("TString");
|
||||
verify.completionListContains("TNumber"); // REVIEW: Is this intended behavior?
|
||||
|
||||
// Ideally the following shouldn't show up since they're not types.
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("obj");
|
||||
verify.completionListContains("foo");
|
||||
verify.completionListContains("obj");
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.not.memberListContains("I");
|
||||
verify.not.memberListContains("TString");
|
||||
verify.not.memberListContains("TNumber");
|
||||
verify.not.memberListContains("foo");
|
||||
verify.not.memberListContains("obj");
|
||||
verify.not.completionListContains("I");
|
||||
verify.not.completionListContains("TString");
|
||||
verify.not.completionListContains("TNumber");
|
||||
verify.not.completionListContains("foo");
|
||||
verify.not.completionListContains("obj");
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
/////**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("a");
|
||||
verify.completionListContains("a");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user