mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into modify-extends
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
|
||||
|
||||
+47
-36
@@ -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);
|
||||
}
|
||||
@@ -4523,7 +4523,7 @@ namespace ts {
|
||||
// First, if the constraint type is a type parameter, obtain the base constraint. Then,
|
||||
// if the key type is a 'keyof X', obtain 'keyof C' where C is the base constraint of X.
|
||||
// Finally, iterate over the constituents of the resulting iteration type.
|
||||
const keyType = constraintType.flags & TypeFlags.TypeParameter ? getApparentType(constraintType) : constraintType;
|
||||
const keyType = constraintType.flags & TypeFlags.TypeVariable ? getApparentType(constraintType) : constraintType;
|
||||
const iterationType = keyType.flags & TypeFlags.Index ? getIndexType(getApparentType((<IndexType>keyType).type)) : keyType;
|
||||
forEachType(iterationType, t => {
|
||||
// Create a mapper from T to the current iteration type constituent. Then, if the
|
||||
@@ -4579,7 +4579,7 @@ namespace ts {
|
||||
function isGenericMappedType(type: Type) {
|
||||
if (getObjectFlags(type) & ObjectFlags.Mapped) {
|
||||
const constraintType = getConstraintTypeFromMappedType(<MappedType>type);
|
||||
return !!(constraintType.flags & (TypeFlags.TypeParameter | TypeFlags.Index));
|
||||
return maybeTypeOfKind(constraintType, TypeFlags.TypeVariable | TypeFlags.Index);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -5912,7 +5912,7 @@ namespace ts {
|
||||
return links.resolvedType;
|
||||
}
|
||||
|
||||
function getIndexTypeForTypeVariable(type: TypeVariable) {
|
||||
function getIndexTypeForGenericType(type: TypeVariable | UnionOrIntersectionType) {
|
||||
if (!type.resolvedIndexType) {
|
||||
type.resolvedIndexType = <IndexType>createType(TypeFlags.Index);
|
||||
type.resolvedIndexType.type = type;
|
||||
@@ -5931,7 +5931,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getIndexType(type: Type): Type {
|
||||
return type.flags & TypeFlags.TypeVariable ? getIndexTypeForTypeVariable(<TypeVariable>type) :
|
||||
return maybeTypeOfKind(type, TypeFlags.TypeVariable) ? getIndexTypeForGenericType(<TypeVariable | UnionOrIntersectionType>type) :
|
||||
getObjectFlags(type) & ObjectFlags.Mapped ? getConstraintTypeFromMappedType(<MappedType>type) :
|
||||
type.flags & TypeFlags.Any || getIndexInfoOfType(type, IndexKind.String) ? stringType :
|
||||
getLiteralTypeFromPropertyNames(type);
|
||||
@@ -6032,14 +6032,14 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getIndexedAccessType(objectType: Type, indexType: Type, accessNode?: ElementAccessExpression | IndexedAccessTypeNode) {
|
||||
if (indexType.flags & TypeFlags.TypeVariable ||
|
||||
objectType.flags & TypeFlags.TypeVariable && indexType.flags & TypeFlags.Index ||
|
||||
isGenericMappedType(objectType)) {
|
||||
// If the object type is a type variable (a type parameter or another indexed access type), if the
|
||||
// index type is a type variable or an index type, or if the object type is a mapped type with a
|
||||
// generic constraint, we are performing a higher-order index access where we cannot meaningfully
|
||||
// access the properties of the object type. In those cases, we first check that the index type is
|
||||
// assignable to 'keyof T' for the object type.
|
||||
if (maybeTypeOfKind(indexType, TypeFlags.TypeVariable | TypeFlags.Index) || isGenericMappedType(objectType)) {
|
||||
if (objectType.flags & TypeFlags.Any) {
|
||||
return objectType;
|
||||
}
|
||||
// If the index type is generic or if the object type is a mapped type with a generic constraint,
|
||||
// we are performing a higher-order index access where we cannot meaningfully access the properties
|
||||
// of the object type. In those cases, we first check that the index type is assignable to 'keyof T'
|
||||
// for the object type.
|
||||
if (accessNode) {
|
||||
if (!isTypeAssignableTo(indexType, getIndexType(objectType))) {
|
||||
error(accessNode, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
|
||||
@@ -6539,7 +6539,7 @@ namespace ts {
|
||||
// union type A | undefined, we produce { [P in keyof A]: X } | undefined.
|
||||
const constraintType = getConstraintTypeFromMappedType(type);
|
||||
if (constraintType.flags & TypeFlags.Index) {
|
||||
const typeVariable = <TypeParameter>(<IndexType>constraintType).type;
|
||||
const typeVariable = (<IndexType>constraintType).type;
|
||||
const mappedTypeVariable = instantiateType(typeVariable, mapper);
|
||||
if (typeVariable !== mappedTypeVariable) {
|
||||
return mapType(mappedTypeVariable, t => {
|
||||
@@ -8706,12 +8706,15 @@ namespace ts {
|
||||
if (constraintType.flags & TypeFlags.Index) {
|
||||
// We're inferring from some source type S to a homomorphic mapped type { [P in keyof T]: X },
|
||||
// where T is a type variable. Use inferTypeForHomomorphicMappedType to infer a suitable source
|
||||
// type and then infer from that type to T.
|
||||
// type and then make a secondary inference from that type to T. We make a secondary inference
|
||||
// such that direct inferences to T get priority over inferences to Partial<T>, for example.
|
||||
const index = indexOf(typeVariables, (<IndexType>constraintType).type);
|
||||
if (index >= 0 && !typeInferences[index].isFixed) {
|
||||
const inferredType = inferTypeForHomomorphicMappedType(source, <MappedType>target);
|
||||
if (inferredType) {
|
||||
inferiority++;
|
||||
inferFromTypes(inferredType, typeVariables[index]);
|
||||
inferiority--;
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -10402,6 +10405,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.
|
||||
@@ -10409,26 +10435,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'.
|
||||
@@ -10576,6 +10583,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;
|
||||
}
|
||||
@@ -16196,7 +16207,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 */
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -345,6 +345,7 @@ namespace ts {
|
||||
|
||||
case SyntaxKind.PropertyDeclaration:
|
||||
// TypeScript property declarations are elided.
|
||||
return undefined;
|
||||
|
||||
case SyntaxKind.Constructor:
|
||||
return visitConstructor(<ConstructorDeclaration>node);
|
||||
@@ -1222,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;
|
||||
@@ -2908,6 +2909,8 @@ namespace ts {
|
||||
/* @internal */
|
||||
resolvedProperties: SymbolTable; // Cache of resolved properties
|
||||
/* @internal */
|
||||
resolvedIndexType: IndexType;
|
||||
/* @internal */
|
||||
couldContainTypeVariables: boolean;
|
||||
}
|
||||
|
||||
@@ -2991,7 +2994,7 @@ namespace ts {
|
||||
|
||||
// keyof T types (TypeFlags.Index)
|
||||
export interface IndexType extends Type {
|
||||
type: TypeVariable;
|
||||
type: TypeVariable | UnionOrIntersectionType;
|
||||
}
|
||||
|
||||
export const enum SignatureKind {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -143,7 +143,14 @@ var g1 = applySpec({
|
||||
});
|
||||
|
||||
// Infers g2: (...args: any[]) => { foo: { bar: { baz: boolean } } }
|
||||
var g2 = applySpec({ foo: { bar: { baz: (x: any) => true } } });
|
||||
var g2 = applySpec({ foo: { bar: { baz: (x: any) => true } } });
|
||||
|
||||
// Repro from #12633
|
||||
|
||||
const foo = <T>(object: T, partial: Partial<T>) => object;
|
||||
let o = {a: 5, b: 7};
|
||||
foo(o, {b: 9});
|
||||
o = foo(o, {b: 9});
|
||||
|
||||
//// [isomorphicMappedTypeInference.js]
|
||||
function box(x) {
|
||||
@@ -244,6 +251,11 @@ var g1 = applySpec({
|
||||
});
|
||||
// Infers g2: (...args: any[]) => { foo: { bar: { baz: boolean } } }
|
||||
var g2 = applySpec({ foo: { bar: { baz: function (x) { return true; } } } });
|
||||
// Repro from #12633
|
||||
var foo = function (object, partial) { return object; };
|
||||
var o = { a: 5, b: 7 };
|
||||
foo(o, { b: 9 });
|
||||
o = foo(o, { b: 9 });
|
||||
|
||||
|
||||
//// [isomorphicMappedTypeInference.d.ts]
|
||||
@@ -311,3 +323,8 @@ declare var g2: (...args: any[]) => {
|
||||
};
|
||||
};
|
||||
};
|
||||
declare const foo: <T>(object: T, partial: Partial<T>) => T;
|
||||
declare let o: {
|
||||
a: number;
|
||||
b: number;
|
||||
};
|
||||
|
||||
@@ -459,3 +459,31 @@ var g2 = applySpec({ foo: { bar: { baz: (x: any) => true } } });
|
||||
>baz : Symbol(baz, Decl(isomorphicMappedTypeInference.ts, 144, 34))
|
||||
>x : Symbol(x, Decl(isomorphicMappedTypeInference.ts, 144, 41))
|
||||
|
||||
// Repro from #12633
|
||||
|
||||
const foo = <T>(object: T, partial: Partial<T>) => object;
|
||||
>foo : Symbol(foo, Decl(isomorphicMappedTypeInference.ts, 148, 5))
|
||||
>T : Symbol(T, Decl(isomorphicMappedTypeInference.ts, 148, 13))
|
||||
>object : Symbol(object, Decl(isomorphicMappedTypeInference.ts, 148, 16))
|
||||
>T : Symbol(T, Decl(isomorphicMappedTypeInference.ts, 148, 13))
|
||||
>partial : Symbol(partial, Decl(isomorphicMappedTypeInference.ts, 148, 26))
|
||||
>Partial : Symbol(Partial, Decl(lib.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(isomorphicMappedTypeInference.ts, 148, 13))
|
||||
>object : Symbol(object, Decl(isomorphicMappedTypeInference.ts, 148, 16))
|
||||
|
||||
let o = {a: 5, b: 7};
|
||||
>o : Symbol(o, Decl(isomorphicMappedTypeInference.ts, 149, 3))
|
||||
>a : Symbol(a, Decl(isomorphicMappedTypeInference.ts, 149, 9))
|
||||
>b : Symbol(b, Decl(isomorphicMappedTypeInference.ts, 149, 14))
|
||||
|
||||
foo(o, {b: 9});
|
||||
>foo : Symbol(foo, Decl(isomorphicMappedTypeInference.ts, 148, 5))
|
||||
>o : Symbol(o, Decl(isomorphicMappedTypeInference.ts, 149, 3))
|
||||
>b : Symbol(b, Decl(isomorphicMappedTypeInference.ts, 150, 8))
|
||||
|
||||
o = foo(o, {b: 9});
|
||||
>o : Symbol(o, Decl(isomorphicMappedTypeInference.ts, 149, 3))
|
||||
>foo : Symbol(foo, Decl(isomorphicMappedTypeInference.ts, 148, 5))
|
||||
>o : Symbol(o, Decl(isomorphicMappedTypeInference.ts, 149, 3))
|
||||
>b : Symbol(b, Decl(isomorphicMappedTypeInference.ts, 151, 12))
|
||||
|
||||
|
||||
@@ -546,3 +546,42 @@ var g2 = applySpec({ foo: { bar: { baz: (x: any) => true } } });
|
||||
>x : any
|
||||
>true : true
|
||||
|
||||
// Repro from #12633
|
||||
|
||||
const foo = <T>(object: T, partial: Partial<T>) => object;
|
||||
>foo : <T>(object: T, partial: Partial<T>) => T
|
||||
><T>(object: T, partial: Partial<T>) => object : <T>(object: T, partial: Partial<T>) => T
|
||||
>T : T
|
||||
>object : T
|
||||
>T : T
|
||||
>partial : Partial<T>
|
||||
>Partial : Partial<T>
|
||||
>T : T
|
||||
>object : T
|
||||
|
||||
let o = {a: 5, b: 7};
|
||||
>o : { a: number; b: number; }
|
||||
>{a: 5, b: 7} : { a: number; b: number; }
|
||||
>a : number
|
||||
>5 : 5
|
||||
>b : number
|
||||
>7 : 7
|
||||
|
||||
foo(o, {b: 9});
|
||||
>foo(o, {b: 9}) : { a: number; b: number; }
|
||||
>foo : <T>(object: T, partial: Partial<T>) => T
|
||||
>o : { a: number; b: number; }
|
||||
>{b: 9} : { b: number; }
|
||||
>b : number
|
||||
>9 : 9
|
||||
|
||||
o = foo(o, {b: 9});
|
||||
>o = foo(o, {b: 9}) : { a: number; b: number; }
|
||||
>o : { a: number; b: number; }
|
||||
>foo(o, {b: 9}) : { a: number; b: number; }
|
||||
>foo : <T>(object: T, partial: Partial<T>) => T
|
||||
>o : { a: number; b: number; }
|
||||
>{b: 9} : { b: number; }
|
||||
>b : number
|
||||
>9 : 9
|
||||
|
||||
|
||||
@@ -219,6 +219,36 @@ function f60<T>(source: T, target: T) {
|
||||
}
|
||||
}
|
||||
|
||||
function f70(func: <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void) {
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'a');
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'b');
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'c');
|
||||
}
|
||||
|
||||
function f71(func: <T, U>(x: T, y: U) => Partial<T & U>) {
|
||||
let x = func({ a: 1, b: "hello" }, { c: true });
|
||||
x.a; // number | undefined
|
||||
x.b; // string | undefined
|
||||
x.c; // boolean | undefined
|
||||
}
|
||||
|
||||
function f72(func: <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]) {
|
||||
let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
||||
let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
||||
let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
||||
}
|
||||
|
||||
function f73(func: <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]) {
|
||||
let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
||||
let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
||||
let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
||||
}
|
||||
|
||||
function f74(func: <T, U, K extends keyof (T | U)>(x: T, y: U, k: K) => (T | U)[K]) {
|
||||
let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number
|
||||
let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean
|
||||
}
|
||||
|
||||
// Repros from #12011
|
||||
|
||||
class Base {
|
||||
@@ -291,7 +321,50 @@ var empty = one(() => {}) // inferred as {}, expected
|
||||
type Handlers<T> = { [K in keyof T]: (t: T[K]) => void }
|
||||
declare function on<T>(handlerHash: Handlers<T>): T
|
||||
var hashOfEmpty1 = on({ test: () => {} }); // {}
|
||||
var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean }
|
||||
var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean }
|
||||
|
||||
// Repro from #12624
|
||||
|
||||
interface Options1<Data, Computed> {
|
||||
data?: Data
|
||||
computed?: Computed;
|
||||
}
|
||||
|
||||
declare class Component1<Data, Computed> {
|
||||
constructor(options: Options1<Data, Computed>);
|
||||
get<K extends keyof (Data & Computed)>(key: K): (Data & Computed)[K];
|
||||
}
|
||||
|
||||
let c1 = new Component1({
|
||||
data: {
|
||||
hello: ""
|
||||
}
|
||||
});
|
||||
|
||||
c1.get("hello");
|
||||
|
||||
// Repro from #12625
|
||||
|
||||
interface Options2<Data, Computed> {
|
||||
data?: Data
|
||||
computed?: Computed;
|
||||
}
|
||||
|
||||
declare class Component2<Data, Computed> {
|
||||
constructor(options: Options2<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
|
||||
}
|
||||
|
||||
//// [keyofAndIndexedAccess.js]
|
||||
var __extendStatics = (this && this.__extendStatics) ||
|
||||
@@ -442,6 +515,31 @@ function f60(source, target) {
|
||||
target[k] = source[k];
|
||||
}
|
||||
}
|
||||
function f70(func) {
|
||||
func('a', 'a');
|
||||
func('a', 'b');
|
||||
func('a', 'c');
|
||||
}
|
||||
function f71(func) {
|
||||
var x = func({ a: 1, b: "hello" }, { c: true });
|
||||
x.a; // number | undefined
|
||||
x.b; // string | undefined
|
||||
x.c; // boolean | undefined
|
||||
}
|
||||
function f72(func) {
|
||||
var a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
||||
var b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
||||
var c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
||||
}
|
||||
function f73(func) {
|
||||
var a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
||||
var b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
||||
var c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
||||
}
|
||||
function f74(func) {
|
||||
var a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number
|
||||
var b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean
|
||||
}
|
||||
// Repros from #12011
|
||||
var Base = (function () {
|
||||
function Base() {
|
||||
@@ -500,6 +598,16 @@ var assignTo2 = function (object, key1, key2) {
|
||||
var empty = one(function () { }); // inferred as {}, expected
|
||||
var hashOfEmpty1 = on({ test: function () { } }); // {}
|
||||
var hashOfEmpty2 = on({ test: function (x) { } }); // { test: boolean }
|
||||
var c1 = new Component1({
|
||||
data: {
|
||||
hello: ""
|
||||
}
|
||||
});
|
||||
c1.get("hello");
|
||||
function f(p) {
|
||||
var a;
|
||||
a[p].add; // any
|
||||
}
|
||||
|
||||
|
||||
//// [keyofAndIndexedAccess.d.ts]
|
||||
@@ -607,6 +715,11 @@ declare function f53<T, K extends keyof T>(obj: {
|
||||
declare function f54<T>(obj: T, key: keyof T): void;
|
||||
declare function f55<T, K extends keyof T>(obj: T, key: K): void;
|
||||
declare function f60<T>(source: T, target: T): void;
|
||||
declare function f70(func: <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void): void;
|
||||
declare function f71(func: <T, U>(x: T, y: U) => Partial<T & U>): void;
|
||||
declare function f72(func: <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]): void;
|
||||
declare function f73(func: <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]): void;
|
||||
declare function f74(func: <T, U, K extends keyof (T | U)>(x: T, y: U, k: K) => (T | U)[K]): void;
|
||||
declare class Base {
|
||||
get<K extends keyof this>(prop: K): this[K];
|
||||
set<K extends keyof this>(prop: K, value: this[K]): void;
|
||||
@@ -644,3 +757,26 @@ declare var hashOfEmpty1: {};
|
||||
declare var hashOfEmpty2: {
|
||||
test: boolean;
|
||||
};
|
||||
interface Options1<Data, Computed> {
|
||||
data?: Data;
|
||||
computed?: Computed;
|
||||
}
|
||||
declare class Component1<Data, Computed> {
|
||||
constructor(options: Options1<Data, Computed>);
|
||||
get<K extends keyof (Data & Computed)>(key: K): (Data & Computed)[K];
|
||||
}
|
||||
declare let c1: Component1<{
|
||||
hello: string;
|
||||
}, {}>;
|
||||
interface Options2<Data, Computed> {
|
||||
data?: Data;
|
||||
computed?: Computed;
|
||||
}
|
||||
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;
|
||||
|
||||
@@ -766,278 +766,581 @@ function f60<T>(source: T, target: T) {
|
||||
}
|
||||
}
|
||||
|
||||
function f70(func: <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void) {
|
||||
>f70 : Symbol(f70, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 220, 13))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 220, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 220, 22))
|
||||
>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 220, 26))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 220, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 220, 22))
|
||||
>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 220, 44))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 220, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 220, 22))
|
||||
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'a');
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 220, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 221, 10))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 221, 18))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 221, 30))
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 221, 38))
|
||||
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'b');
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 220, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 222, 10))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 222, 18))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 222, 30))
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 222, 38))
|
||||
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'c');
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 220, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 223, 10))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 223, 18))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 223, 30))
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 223, 38))
|
||||
}
|
||||
|
||||
function f71(func: <T, U>(x: T, y: U) => Partial<T & U>) {
|
||||
>f71 : Symbol(f71, Decl(keyofAndIndexedAccess.ts, 224, 1))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 226, 13))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 226, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 226, 22))
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 226, 26))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 226, 20))
|
||||
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 226, 31))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 226, 22))
|
||||
>Partial : Symbol(Partial, Decl(lib.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 226, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 226, 22))
|
||||
|
||||
let x = func({ a: 1, b: "hello" }, { c: true });
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 227, 7))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 226, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 227, 18))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 227, 24))
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 227, 40))
|
||||
|
||||
x.a; // number | undefined
|
||||
>x.a : Symbol(a)
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 227, 7))
|
||||
>a : Symbol(a)
|
||||
|
||||
x.b; // string | undefined
|
||||
>x.b : Symbol(b)
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 227, 7))
|
||||
>b : Symbol(b)
|
||||
|
||||
x.c; // boolean | undefined
|
||||
>x.c : Symbol(c)
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 227, 7))
|
||||
>c : Symbol(c)
|
||||
}
|
||||
|
||||
function f72(func: <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]) {
|
||||
>f72 : Symbol(f72, Decl(keyofAndIndexedAccess.ts, 231, 1))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 233, 13))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 233, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 233, 22))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 233, 25))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 233, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 233, 22))
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 233, 55))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 233, 20))
|
||||
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 233, 60))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 233, 22))
|
||||
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 233, 66))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 233, 25))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 233, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 233, 22))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 233, 25))
|
||||
|
||||
let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 234, 7))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 233, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 234, 18))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 234, 24))
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 234, 40))
|
||||
|
||||
let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 235, 7))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 233, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 235, 18))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 235, 24))
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 235, 40))
|
||||
|
||||
let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 236, 7))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 233, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 236, 18))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 236, 24))
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 236, 40))
|
||||
}
|
||||
|
||||
function f73(func: <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]) {
|
||||
>f73 : Symbol(f73, Decl(keyofAndIndexedAccess.ts, 237, 1))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 239, 13))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 239, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 239, 22))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 239, 25))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 239, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 239, 22))
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 239, 51))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 239, 20))
|
||||
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 239, 56))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 239, 22))
|
||||
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 239, 62))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 239, 25))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 239, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 239, 22))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 239, 25))
|
||||
|
||||
let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 240, 7))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 239, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 240, 18))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 240, 24))
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 240, 40))
|
||||
|
||||
let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 241, 7))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 239, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 241, 18))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 241, 24))
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 241, 40))
|
||||
|
||||
let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 242, 7))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 239, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 242, 18))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 242, 24))
|
||||
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 242, 40))
|
||||
}
|
||||
|
||||
function f74(func: <T, U, K extends keyof (T | U)>(x: T, y: U, k: K) => (T | U)[K]) {
|
||||
>f74 : Symbol(f74, Decl(keyofAndIndexedAccess.ts, 243, 1))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 245, 13))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 245, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 245, 22))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 245, 25))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 245, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 245, 22))
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 245, 51))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 245, 20))
|
||||
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 245, 56))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 245, 22))
|
||||
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 245, 62))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 245, 25))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 245, 20))
|
||||
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 245, 22))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 245, 25))
|
||||
|
||||
let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 246, 7))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 245, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 246, 18))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 246, 24))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 246, 40))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 246, 46))
|
||||
|
||||
let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 247, 7))
|
||||
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 245, 13))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 247, 18))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 247, 24))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 247, 40))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 247, 46))
|
||||
}
|
||||
|
||||
// Repros from #12011
|
||||
|
||||
class Base {
|
||||
>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
||||
>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 248, 1))
|
||||
|
||||
get<K extends keyof this>(prop: K) {
|
||||
>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 222, 12))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 223, 8))
|
||||
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 223, 30))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 223, 8))
|
||||
>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 252, 12))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 253, 8))
|
||||
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 253, 30))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 253, 8))
|
||||
|
||||
return this[prop];
|
||||
>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
||||
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 223, 30))
|
||||
>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 248, 1))
|
||||
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 253, 30))
|
||||
}
|
||||
set<K extends keyof this>(prop: K, value: this[K]) {
|
||||
>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 225, 5))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 226, 8))
|
||||
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 226, 30))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 226, 8))
|
||||
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 226, 38))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 226, 8))
|
||||
>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 255, 5))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 256, 8))
|
||||
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 256, 30))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 256, 8))
|
||||
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 256, 38))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 256, 8))
|
||||
|
||||
this[prop] = value;
|
||||
>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
||||
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 226, 30))
|
||||
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 226, 38))
|
||||
>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 248, 1))
|
||||
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 256, 30))
|
||||
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 256, 38))
|
||||
}
|
||||
}
|
||||
|
||||
class Person extends Base {
|
||||
>Person : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 229, 1))
|
||||
>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
||||
>Person : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 259, 1))
|
||||
>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 248, 1))
|
||||
|
||||
parts: number;
|
||||
>parts : Symbol(Person.parts, Decl(keyofAndIndexedAccess.ts, 231, 27))
|
||||
>parts : Symbol(Person.parts, Decl(keyofAndIndexedAccess.ts, 261, 27))
|
||||
|
||||
constructor(parts: number) {
|
||||
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 233, 16))
|
||||
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 263, 16))
|
||||
|
||||
super();
|
||||
>super : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
||||
>super : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 248, 1))
|
||||
|
||||
this.set("parts", parts);
|
||||
>this.set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 225, 5))
|
||||
>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 229, 1))
|
||||
>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 225, 5))
|
||||
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 233, 16))
|
||||
>this.set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 255, 5))
|
||||
>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 259, 1))
|
||||
>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 255, 5))
|
||||
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 263, 16))
|
||||
}
|
||||
getParts() {
|
||||
>getParts : Symbol(Person.getParts, Decl(keyofAndIndexedAccess.ts, 236, 5))
|
||||
>getParts : Symbol(Person.getParts, Decl(keyofAndIndexedAccess.ts, 266, 5))
|
||||
|
||||
return this.get("parts")
|
||||
>this.get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 222, 12))
|
||||
>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 229, 1))
|
||||
>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 222, 12))
|
||||
>this.get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 252, 12))
|
||||
>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 259, 1))
|
||||
>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 252, 12))
|
||||
}
|
||||
}
|
||||
|
||||
class OtherPerson {
|
||||
>OtherPerson : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 240, 1))
|
||||
>OtherPerson : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 270, 1))
|
||||
|
||||
parts: number;
|
||||
>parts : Symbol(OtherPerson.parts, Decl(keyofAndIndexedAccess.ts, 242, 19))
|
||||
>parts : Symbol(OtherPerson.parts, Decl(keyofAndIndexedAccess.ts, 272, 19))
|
||||
|
||||
constructor(parts: number) {
|
||||
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 244, 16))
|
||||
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 274, 16))
|
||||
|
||||
setProperty(this, "parts", parts);
|
||||
>setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 81, 1))
|
||||
>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 240, 1))
|
||||
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 244, 16))
|
||||
>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 270, 1))
|
||||
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 274, 16))
|
||||
}
|
||||
getParts() {
|
||||
>getParts : Symbol(OtherPerson.getParts, Decl(keyofAndIndexedAccess.ts, 246, 5))
|
||||
>getParts : Symbol(OtherPerson.getParts, Decl(keyofAndIndexedAccess.ts, 276, 5))
|
||||
|
||||
return getProperty(this, "parts")
|
||||
>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 77, 26))
|
||||
>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 240, 1))
|
||||
>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 270, 1))
|
||||
}
|
||||
}
|
||||
|
||||
// Modified repro from #12544
|
||||
|
||||
function path<T, K1 extends keyof T>(obj: T, key1: K1): T[K1];
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 254, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 254, 16))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 254, 14))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 254, 37))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 254, 14))
|
||||
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 254, 44))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 254, 16))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 254, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 254, 16))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 284, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 284, 16))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 284, 14))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 284, 37))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 284, 14))
|
||||
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 284, 44))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 284, 16))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 284, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 284, 16))
|
||||
|
||||
function path<T, K1 extends keyof T, K2 extends keyof T[K1]>(obj: T, key1: K1, key2: K2): T[K1][K2];
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 255, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 255, 16))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 255, 14))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 255, 36))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 255, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 255, 16))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 255, 61))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 255, 14))
|
||||
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 255, 68))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 255, 16))
|
||||
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 255, 78))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 255, 36))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 255, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 255, 16))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 255, 36))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 285, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 285, 16))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 285, 14))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 285, 36))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 285, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 285, 16))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 285, 61))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 285, 14))
|
||||
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 285, 68))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 285, 16))
|
||||
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 285, 78))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 285, 36))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 285, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 285, 16))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 285, 36))
|
||||
|
||||
function path<T, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3];
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 256, 16))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 256, 36))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 256, 16))
|
||||
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 256, 60))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 256, 16))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 256, 36))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 256, 89))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
||||
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 256, 96))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 256, 16))
|
||||
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 256, 106))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 256, 36))
|
||||
>key3 : Symbol(key3, Decl(keyofAndIndexedAccess.ts, 256, 116))
|
||||
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 256, 60))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 256, 16))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 256, 36))
|
||||
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 256, 60))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 286, 16))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 286, 36))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 286, 16))
|
||||
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 286, 60))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 286, 16))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 286, 36))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 286, 89))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
||||
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 286, 96))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 286, 16))
|
||||
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 286, 106))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 286, 36))
|
||||
>key3 : Symbol(key3, Decl(keyofAndIndexedAccess.ts, 286, 116))
|
||||
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 286, 60))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 286, 16))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 286, 36))
|
||||
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 286, 60))
|
||||
|
||||
function path(obj: any, ...keys: (string | number)[]): any;
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 257, 14))
|
||||
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 257, 23))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 287, 14))
|
||||
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 287, 23))
|
||||
|
||||
function path(obj: any, ...keys: (string | number)[]): any {
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 258, 14))
|
||||
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 258, 23))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 288, 14))
|
||||
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 288, 23))
|
||||
|
||||
let result = obj;
|
||||
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 259, 7))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 258, 14))
|
||||
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 289, 7))
|
||||
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 288, 14))
|
||||
|
||||
for (let k of keys) {
|
||||
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 260, 12))
|
||||
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 258, 23))
|
||||
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 290, 12))
|
||||
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 288, 23))
|
||||
|
||||
result = result[k];
|
||||
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 259, 7))
|
||||
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 259, 7))
|
||||
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 260, 12))
|
||||
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 289, 7))
|
||||
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 289, 7))
|
||||
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 290, 12))
|
||||
}
|
||||
return result;
|
||||
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 259, 7))
|
||||
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 289, 7))
|
||||
}
|
||||
|
||||
type Thing = {
|
||||
>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 264, 1))
|
||||
>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 294, 1))
|
||||
|
||||
a: { x: number, y: string },
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 266, 14))
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 267, 8))
|
||||
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 267, 19))
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 296, 14))
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 297, 8))
|
||||
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 297, 19))
|
||||
|
||||
b: boolean
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 267, 32))
|
||||
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 297, 32))
|
||||
|
||||
};
|
||||
|
||||
|
||||
function f1(thing: Thing) {
|
||||
>f1 : Symbol(f1, Decl(keyofAndIndexedAccess.ts, 269, 2))
|
||||
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 272, 12))
|
||||
>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 264, 1))
|
||||
>f1 : Symbol(f1, Decl(keyofAndIndexedAccess.ts, 299, 2))
|
||||
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 302, 12))
|
||||
>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 294, 1))
|
||||
|
||||
let x1 = path(thing, 'a'); // { x: number, y: string }
|
||||
>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 273, 7))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
||||
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 272, 12))
|
||||
>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 303, 7))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
||||
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 302, 12))
|
||||
|
||||
let x2 = path(thing, 'a', 'y'); // string
|
||||
>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 274, 7))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
||||
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 272, 12))
|
||||
>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 304, 7))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
||||
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 302, 12))
|
||||
|
||||
let x3 = path(thing, 'b'); // boolean
|
||||
>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 275, 7))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
||||
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 272, 12))
|
||||
>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 305, 7))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
||||
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 302, 12))
|
||||
|
||||
let x4 = path(thing, ...['a', 'x']); // any
|
||||
>x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 276, 7))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
||||
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 272, 12))
|
||||
>x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 306, 7))
|
||||
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
||||
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 302, 12))
|
||||
}
|
||||
|
||||
// Repro from comment in #12114
|
||||
|
||||
const assignTo2 = <T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) =>
|
||||
>assignTo2 : Symbol(assignTo2, Decl(keyofAndIndexedAccess.ts, 281, 5))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 281, 19))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 281, 21))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 281, 19))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 281, 41))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 281, 19))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 281, 21))
|
||||
>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 281, 66))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 281, 19))
|
||||
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 281, 76))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 281, 21))
|
||||
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 281, 86))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 281, 41))
|
||||
>assignTo2 : Symbol(assignTo2, Decl(keyofAndIndexedAccess.ts, 311, 5))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 311, 19))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 311, 21))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 311, 19))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 311, 41))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 311, 19))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 311, 21))
|
||||
>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 311, 66))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 311, 19))
|
||||
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 311, 76))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 311, 21))
|
||||
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 311, 86))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 311, 41))
|
||||
|
||||
(value: T[K1][K2]) => object[key1][key2] = value;
|
||||
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 282, 5))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 281, 19))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 281, 21))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 281, 41))
|
||||
>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 281, 66))
|
||||
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 281, 76))
|
||||
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 281, 86))
|
||||
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 282, 5))
|
||||
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 312, 5))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 311, 19))
|
||||
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 311, 21))
|
||||
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 311, 41))
|
||||
>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 311, 66))
|
||||
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 311, 76))
|
||||
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 311, 86))
|
||||
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 312, 5))
|
||||
|
||||
// Modified repro from #12573
|
||||
|
||||
declare function one<T>(handler: (t: T) => void): T
|
||||
>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 282, 53))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 21))
|
||||
>handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 286, 24))
|
||||
>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 286, 34))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 21))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 21))
|
||||
>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 312, 53))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 316, 21))
|
||||
>handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 316, 24))
|
||||
>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 316, 34))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 316, 21))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 316, 21))
|
||||
|
||||
var empty = one(() => {}) // inferred as {}, expected
|
||||
>empty : Symbol(empty, Decl(keyofAndIndexedAccess.ts, 287, 3))
|
||||
>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 282, 53))
|
||||
>empty : Symbol(empty, Decl(keyofAndIndexedAccess.ts, 317, 3))
|
||||
>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 312, 53))
|
||||
|
||||
type Handlers<T> = { [K in keyof T]: (t: T[K]) => void }
|
||||
>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 287, 25))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 289, 14))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 289, 22))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 289, 14))
|
||||
>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 289, 38))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 289, 14))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 289, 22))
|
||||
>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 317, 25))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 14))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 319, 22))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 14))
|
||||
>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 319, 38))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 14))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 319, 22))
|
||||
|
||||
declare function on<T>(handlerHash: Handlers<T>): T
|
||||
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 289, 56))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 290, 20))
|
||||
>handlerHash : Symbol(handlerHash, Decl(keyofAndIndexedAccess.ts, 290, 23))
|
||||
>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 287, 25))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 290, 20))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 290, 20))
|
||||
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 319, 56))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 20))
|
||||
>handlerHash : Symbol(handlerHash, Decl(keyofAndIndexedAccess.ts, 320, 23))
|
||||
>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 317, 25))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 20))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 20))
|
||||
|
||||
var hashOfEmpty1 = on({ test: () => {} }); // {}
|
||||
>hashOfEmpty1 : Symbol(hashOfEmpty1, Decl(keyofAndIndexedAccess.ts, 291, 3))
|
||||
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 289, 56))
|
||||
>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 291, 23))
|
||||
>hashOfEmpty1 : Symbol(hashOfEmpty1, Decl(keyofAndIndexedAccess.ts, 321, 3))
|
||||
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 319, 56))
|
||||
>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 321, 23))
|
||||
|
||||
var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean }
|
||||
>hashOfEmpty2 : Symbol(hashOfEmpty2, Decl(keyofAndIndexedAccess.ts, 292, 3))
|
||||
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 289, 56))
|
||||
>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 292, 23))
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 292, 31))
|
||||
>hashOfEmpty2 : Symbol(hashOfEmpty2, Decl(keyofAndIndexedAccess.ts, 322, 3))
|
||||
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 319, 56))
|
||||
>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 322, 23))
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 322, 31))
|
||||
|
||||
// Repro from #12624
|
||||
|
||||
interface Options1<Data, Computed> {
|
||||
>Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 322, 52))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 326, 19))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 326, 24))
|
||||
|
||||
data?: Data
|
||||
>data : Symbol(Options1.data, Decl(keyofAndIndexedAccess.ts, 326, 36))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 326, 19))
|
||||
|
||||
computed?: Computed;
|
||||
>computed : Symbol(Options1.computed, Decl(keyofAndIndexedAccess.ts, 327, 15))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 326, 24))
|
||||
}
|
||||
|
||||
declare class Component1<Data, Computed> {
|
||||
>Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 329, 1))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 331, 25))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 331, 30))
|
||||
|
||||
constructor(options: Options1<Data, Computed>);
|
||||
>options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 332, 16))
|
||||
>Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 322, 52))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 331, 25))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 331, 30))
|
||||
|
||||
get<K extends keyof (Data & Computed)>(key: K): (Data & Computed)[K];
|
||||
>get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 332, 51))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 331, 25))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 331, 30))
|
||||
>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 333, 43))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 331, 25))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 331, 30))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8))
|
||||
}
|
||||
|
||||
let c1 = new Component1({
|
||||
>c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 336, 3))
|
||||
>Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 329, 1))
|
||||
|
||||
data: {
|
||||
>data : Symbol(data, Decl(keyofAndIndexedAccess.ts, 336, 25))
|
||||
|
||||
hello: ""
|
||||
>hello : Symbol(hello, Decl(keyofAndIndexedAccess.ts, 337, 11))
|
||||
}
|
||||
});
|
||||
|
||||
c1.get("hello");
|
||||
>c1.get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 332, 51))
|
||||
>c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 336, 3))
|
||||
>get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 332, 51))
|
||||
|
||||
// Repro from #12625
|
||||
|
||||
interface Options2<Data, Computed> {
|
||||
>Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 342, 16))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 346, 19))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 346, 24))
|
||||
|
||||
data?: Data
|
||||
>data : Symbol(Options2.data, Decl(keyofAndIndexedAccess.ts, 346, 36))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 346, 19))
|
||||
|
||||
computed?: Computed;
|
||||
>computed : Symbol(Options2.computed, Decl(keyofAndIndexedAccess.ts, 347, 15))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 346, 24))
|
||||
}
|
||||
|
||||
declare class Component2<Data, Computed> {
|
||||
>Component2 : Symbol(Component2, Decl(keyofAndIndexedAccess.ts, 349, 1))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 351, 25))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 351, 30))
|
||||
|
||||
constructor(options: Options2<Data, Computed>);
|
||||
>options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 352, 16))
|
||||
>Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 342, 16))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 351, 25))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 351, 30))
|
||||
|
||||
get<K extends keyof Data | keyof Computed>(key: K): (Data & Computed)[K];
|
||||
>get : Symbol(Component2.get, Decl(keyofAndIndexedAccess.ts, 352, 51))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 353, 8))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 351, 25))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 351, 30))
|
||||
>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 353, 47))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 353, 8))
|
||||
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 351, 25))
|
||||
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 351, 30))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 353, 8))
|
||||
}
|
||||
|
||||
// Repro from #12641
|
||||
|
||||
interface R {
|
||||
>R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 354, 1))
|
||||
|
||||
p: number;
|
||||
>p : Symbol(R.p, Decl(keyofAndIndexedAccess.ts, 358, 13))
|
||||
}
|
||||
|
||||
function f<K extends keyof R>(p: K) {
|
||||
>f : Symbol(f, Decl(keyofAndIndexedAccess.ts, 360, 1))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 362, 11))
|
||||
>R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 354, 1))
|
||||
>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 362, 30))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 362, 11))
|
||||
|
||||
let a: any;
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 363, 7))
|
||||
|
||||
a[p].add; // any
|
||||
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 363, 7))
|
||||
>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 362, 30))
|
||||
}
|
||||
|
||||
@@ -780,8 +780,8 @@ function f52<T>(obj: { [x: string]: boolean }, k: keyof T, s: string, n: number)
|
||||
>n : number
|
||||
|
||||
const x3 = obj[k];
|
||||
>x3 : boolean
|
||||
>obj[k] : boolean
|
||||
>x3 : { [x: string]: boolean; }[keyof T]
|
||||
>obj[k] : { [x: string]: boolean; }[keyof T]
|
||||
>obj : { [x: string]: boolean; }
|
||||
>k : keyof T
|
||||
}
|
||||
@@ -888,6 +888,264 @@ function f60<T>(source: T, target: T) {
|
||||
}
|
||||
}
|
||||
|
||||
function f70(func: <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void) {
|
||||
>f70 : (func: <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void) => void
|
||||
>func : <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void
|
||||
>T : T
|
||||
>U : U
|
||||
>k1 : keyof (T | U)
|
||||
>T : T
|
||||
>U : U
|
||||
>k2 : keyof (T & U)
|
||||
>T : T
|
||||
>U : U
|
||||
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'a');
|
||||
>func<{ a: any, b: any }, { a: any, c: any }>('a', 'a') : void
|
||||
>func : <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void
|
||||
>a : any
|
||||
>b : any
|
||||
>a : any
|
||||
>c : any
|
||||
>'a' : "a"
|
||||
>'a' : "a"
|
||||
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'b');
|
||||
>func<{ a: any, b: any }, { a: any, c: any }>('a', 'b') : void
|
||||
>func : <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void
|
||||
>a : any
|
||||
>b : any
|
||||
>a : any
|
||||
>c : any
|
||||
>'a' : "a"
|
||||
>'b' : "b"
|
||||
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'c');
|
||||
>func<{ a: any, b: any }, { a: any, c: any }>('a', 'c') : void
|
||||
>func : <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void
|
||||
>a : any
|
||||
>b : any
|
||||
>a : any
|
||||
>c : any
|
||||
>'a' : "a"
|
||||
>'c' : "c"
|
||||
}
|
||||
|
||||
function f71(func: <T, U>(x: T, y: U) => Partial<T & U>) {
|
||||
>f71 : (func: <T, U>(x: T, y: U) => Partial<T & U>) => void
|
||||
>func : <T, U>(x: T, y: U) => Partial<T & U>
|
||||
>T : T
|
||||
>U : U
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>Partial : Partial<T>
|
||||
>T : T
|
||||
>U : U
|
||||
|
||||
let x = func({ a: 1, b: "hello" }, { c: true });
|
||||
>x : Partial<{ a: number; b: string; } & { c: boolean; }>
|
||||
>func({ a: 1, b: "hello" }, { c: true }) : Partial<{ a: number; b: string; } & { c: boolean; }>
|
||||
>func : <T, U>(x: T, y: U) => Partial<T & U>
|
||||
>{ a: 1, b: "hello" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
>b : string
|
||||
>"hello" : "hello"
|
||||
>{ c: true } : { c: true; }
|
||||
>c : boolean
|
||||
>true : true
|
||||
|
||||
x.a; // number | undefined
|
||||
>x.a : number | undefined
|
||||
>x : Partial<{ a: number; b: string; } & { c: boolean; }>
|
||||
>a : number | undefined
|
||||
|
||||
x.b; // string | undefined
|
||||
>x.b : string | undefined
|
||||
>x : Partial<{ a: number; b: string; } & { c: boolean; }>
|
||||
>b : string | undefined
|
||||
|
||||
x.c; // boolean | undefined
|
||||
>x.c : boolean | undefined
|
||||
>x : Partial<{ a: number; b: string; } & { c: boolean; }>
|
||||
>c : boolean | undefined
|
||||
}
|
||||
|
||||
function f72(func: <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]) {
|
||||
>f72 : (func: <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]) => void
|
||||
>func : <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]
|
||||
>T : T
|
||||
>U : U
|
||||
>K : K
|
||||
>T : T
|
||||
>U : U
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>k : K
|
||||
>K : K
|
||||
>T : T
|
||||
>U : U
|
||||
>K : K
|
||||
|
||||
let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
||||
>a : number
|
||||
>func({ a: 1, b: "hello" }, { c: true }, 'a') : number
|
||||
>func : <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]
|
||||
>{ a: 1, b: "hello" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
>b : string
|
||||
>"hello" : "hello"
|
||||
>{ c: true } : { c: true; }
|
||||
>c : boolean
|
||||
>true : true
|
||||
>'a' : "a"
|
||||
|
||||
let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
||||
>b : string
|
||||
>func({ a: 1, b: "hello" }, { c: true }, 'b') : string
|
||||
>func : <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]
|
||||
>{ a: 1, b: "hello" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
>b : string
|
||||
>"hello" : "hello"
|
||||
>{ c: true } : { c: true; }
|
||||
>c : boolean
|
||||
>true : true
|
||||
>'b' : "b"
|
||||
|
||||
let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
||||
>c : boolean
|
||||
>func({ a: 1, b: "hello" }, { c: true }, 'c') : boolean
|
||||
>func : <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]
|
||||
>{ a: 1, b: "hello" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
>b : string
|
||||
>"hello" : "hello"
|
||||
>{ c: true } : { c: true; }
|
||||
>c : boolean
|
||||
>true : true
|
||||
>'c' : "c"
|
||||
}
|
||||
|
||||
function f73(func: <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]) {
|
||||
>f73 : (func: <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]) => void
|
||||
>func : <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]
|
||||
>T : T
|
||||
>U : U
|
||||
>K : K
|
||||
>T : T
|
||||
>U : U
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>k : K
|
||||
>K : K
|
||||
>T : T
|
||||
>U : U
|
||||
>K : K
|
||||
|
||||
let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
||||
>a : number
|
||||
>func({ a: 1, b: "hello" }, { c: true }, 'a') : number
|
||||
>func : <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]
|
||||
>{ a: 1, b: "hello" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
>b : string
|
||||
>"hello" : "hello"
|
||||
>{ c: true } : { c: true; }
|
||||
>c : boolean
|
||||
>true : true
|
||||
>'a' : "a"
|
||||
|
||||
let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
||||
>b : string
|
||||
>func({ a: 1, b: "hello" }, { c: true }, 'b') : string
|
||||
>func : <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]
|
||||
>{ a: 1, b: "hello" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
>b : string
|
||||
>"hello" : "hello"
|
||||
>{ c: true } : { c: true; }
|
||||
>c : boolean
|
||||
>true : true
|
||||
>'b' : "b"
|
||||
|
||||
let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
||||
>c : boolean
|
||||
>func({ a: 1, b: "hello" }, { c: true }, 'c') : boolean
|
||||
>func : <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]
|
||||
>{ a: 1, b: "hello" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
>b : string
|
||||
>"hello" : "hello"
|
||||
>{ c: true } : { c: true; }
|
||||
>c : boolean
|
||||
>true : true
|
||||
>'c' : "c"
|
||||
}
|
||||
|
||||
function f74(func: <T, U, K extends keyof (T | U)>(x: T, y: U, k: K) => (T | U)[K]) {
|
||||
>f74 : (func: <T, U, K extends keyof (T | U)>(x: T, y: U, k: K) => (T | U)[K]) => void
|
||||
>func : <T, U, K extends keyof (T | U)>(x: T, y: U, k: K) => (T | U)[K]
|
||||
>T : T
|
||||
>U : U
|
||||
>K : K
|
||||
>T : T
|
||||
>U : U
|
||||
>x : T
|
||||
>T : T
|
||||
>y : U
|
||||
>U : U
|
||||
>k : K
|
||||
>K : K
|
||||
>T : T
|
||||
>U : U
|
||||
>K : K
|
||||
|
||||
let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number
|
||||
>a : number
|
||||
>func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a') : number
|
||||
>func : <T, U, K extends keyof (T | U)>(x: T, y: U, k: K) => (T | U)[K]
|
||||
>{ a: 1, b: "hello" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
>b : string
|
||||
>"hello" : "hello"
|
||||
>{ a: 2, b: true } : { a: number; b: true; }
|
||||
>a : number
|
||||
>2 : 2
|
||||
>b : boolean
|
||||
>true : true
|
||||
>'a' : "a"
|
||||
|
||||
let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean
|
||||
>b : string | boolean
|
||||
>func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b') : string | boolean
|
||||
>func : <T, U, K extends keyof (T | U)>(x: T, y: U, k: K) => (T | U)[K]
|
||||
>{ a: 1, b: "hello" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
>b : string
|
||||
>"hello" : "hello"
|
||||
>{ a: 2, b: true } : { a: number; b: true; }
|
||||
>a : number
|
||||
>2 : 2
|
||||
>b : boolean
|
||||
>true : true
|
||||
>'b' : "b"
|
||||
}
|
||||
|
||||
// Repros from #12011
|
||||
|
||||
class Base {
|
||||
@@ -1202,3 +1460,130 @@ var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean }
|
||||
>(x: boolean) => {} : (x: boolean) => void
|
||||
>x : boolean
|
||||
|
||||
// Repro from #12624
|
||||
|
||||
interface Options1<Data, Computed> {
|
||||
>Options1 : Options1<Data, Computed>
|
||||
>Data : Data
|
||||
>Computed : Computed
|
||||
|
||||
data?: Data
|
||||
>data : Data | undefined
|
||||
>Data : Data
|
||||
|
||||
computed?: Computed;
|
||||
>computed : Computed | undefined
|
||||
>Computed : Computed
|
||||
}
|
||||
|
||||
declare class Component1<Data, Computed> {
|
||||
>Component1 : Component1<Data, Computed>
|
||||
>Data : Data
|
||||
>Computed : Computed
|
||||
|
||||
constructor(options: Options1<Data, Computed>);
|
||||
>options : Options1<Data, Computed>
|
||||
>Options1 : Options1<Data, Computed>
|
||||
>Data : Data
|
||||
>Computed : Computed
|
||||
|
||||
get<K extends keyof (Data & Computed)>(key: K): (Data & Computed)[K];
|
||||
>get : <K extends keyof (Data & Computed)>(key: K) => (Data & Computed)[K]
|
||||
>K : K
|
||||
>Data : Data
|
||||
>Computed : Computed
|
||||
>key : K
|
||||
>K : K
|
||||
>Data : Data
|
||||
>Computed : Computed
|
||||
>K : K
|
||||
}
|
||||
|
||||
let c1 = new Component1({
|
||||
>c1 : Component1<{ hello: string; }, {}>
|
||||
>new Component1({ data: { hello: "" }}) : Component1<{ hello: string; }, {}>
|
||||
>Component1 : typeof Component1
|
||||
>{ data: { hello: "" }} : { data: { hello: string; }; }
|
||||
|
||||
data: {
|
||||
>data : { hello: string; }
|
||||
>{ hello: "" } : { hello: string; }
|
||||
|
||||
hello: ""
|
||||
>hello : string
|
||||
>"" : ""
|
||||
}
|
||||
});
|
||||
|
||||
c1.get("hello");
|
||||
>c1.get("hello") : string
|
||||
>c1.get : <K extends "hello">(key: K) => ({ hello: string; } & {})[K]
|
||||
>c1 : Component1<{ hello: string; }, {}>
|
||||
>get : <K extends "hello">(key: K) => ({ hello: string; } & {})[K]
|
||||
>"hello" : "hello"
|
||||
|
||||
// Repro from #12625
|
||||
|
||||
interface Options2<Data, Computed> {
|
||||
>Options2 : Options2<Data, Computed>
|
||||
>Data : Data
|
||||
>Computed : Computed
|
||||
|
||||
data?: Data
|
||||
>data : Data | undefined
|
||||
>Data : Data
|
||||
|
||||
computed?: Computed;
|
||||
>computed : Computed | undefined
|
||||
>Computed : Computed
|
||||
}
|
||||
|
||||
declare class Component2<Data, Computed> {
|
||||
>Component2 : Component2<Data, Computed>
|
||||
>Data : Data
|
||||
>Computed : Computed
|
||||
|
||||
constructor(options: Options2<Data, Computed>);
|
||||
>options : Options2<Data, Computed>
|
||||
>Options2 : Options2<Data, Computed>
|
||||
>Data : Data
|
||||
>Computed : Computed
|
||||
|
||||
get<K extends keyof Data | keyof Computed>(key: K): (Data & Computed)[K];
|
||||
>get : <K extends keyof Data | keyof Computed>(key: K) => (Data & Computed)[K]
|
||||
>K : K
|
||||
>Data : Data
|
||||
>Computed : Computed
|
||||
>key : K
|
||||
>K : K
|
||||
>Data : Data
|
||||
>Computed : 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
|
||||
}
|
||||
|
||||
@@ -21,9 +21,14 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(64,33): error
|
||||
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(66,24): error TS2345: Argument of type '"size"' is not assignable to parameter of type '"name" | "width" | "height" | "visible"'.
|
||||
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(67,24): error TS2345: Argument of type '"name" | "size"' is not assignable to parameter of type '"name" | "width" | "height" | "visible"'.
|
||||
Type '"size"' is not assignable to type '"name" | "width" | "height" | "visible"'.
|
||||
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(72,5): error TS2536: Type 'keyof (T & U)' cannot be used to index type 'T | U'.
|
||||
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(76,5): error TS2322: Type 'T | U' is not assignable to type 'T & U'.
|
||||
Type 'T' is not assignable to type 'T & U'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(77,5): error TS2322: Type 'keyof (T & U)' is not assignable to type 'keyof (T | U)'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts (21 errors) ====
|
||||
==== tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts (24 errors) ====
|
||||
class Shape {
|
||||
name: string;
|
||||
width: number;
|
||||
@@ -135,4 +140,23 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(67,24): error
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '"name" | "size"' is not assignable to parameter of type '"name" | "width" | "height" | "visible"'.
|
||||
!!! error TS2345: Type '"size"' is not assignable to type '"name" | "width" | "height" | "visible"'.
|
||||
}
|
||||
|
||||
function f20<T, U>(k1: keyof (T | U), k2: keyof (T & U), o1: T | U, o2: T & U) {
|
||||
o1[k1];
|
||||
o1[k2]; // Error
|
||||
~~~~~~
|
||||
!!! error TS2536: Type 'keyof (T & U)' cannot be used to index type 'T | U'.
|
||||
o2[k1];
|
||||
o2[k2];
|
||||
o1 = o2;
|
||||
o2 = o1; // Error
|
||||
~~
|
||||
!!! error TS2322: Type 'T | U' is not assignable to type 'T & U'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'T & U'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
k1 = k2; // Error
|
||||
~~
|
||||
!!! error TS2322: Type 'keyof (T & U)' is not assignable to type 'keyof (T | U)'.
|
||||
k2 = k1;
|
||||
}
|
||||
@@ -66,6 +66,17 @@ function f10(shape: Shape) {
|
||||
setProperty(shape, "name", "rectangle");
|
||||
setProperty(shape, "size", 10); // Error
|
||||
setProperty(shape, cond ? "name" : "size", 10); // Error
|
||||
}
|
||||
|
||||
function f20<T, U>(k1: keyof (T | U), k2: keyof (T & U), o1: T | U, o2: T & U) {
|
||||
o1[k1];
|
||||
o1[k2]; // Error
|
||||
o2[k1];
|
||||
o2[k2];
|
||||
o1 = o2;
|
||||
o2 = o1; // Error
|
||||
k1 = k2; // Error
|
||||
k2 = k1;
|
||||
}
|
||||
|
||||
//// [keyofAndIndexedAccessErrors.js]
|
||||
@@ -88,3 +99,13 @@ function f10(shape) {
|
||||
setProperty(shape, "size", 10); // Error
|
||||
setProperty(shape, cond ? "name" : "size", 10); // Error
|
||||
}
|
||||
function f20(k1, k2, o1, o2) {
|
||||
o1[k1];
|
||||
o1[k2]; // Error
|
||||
o2[k1];
|
||||
o2[k2];
|
||||
o1 = o2;
|
||||
o2 = o1; // Error
|
||||
k1 = k2; // Error
|
||||
k2 = k1;
|
||||
}
|
||||
|
||||
@@ -20,9 +20,15 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(60,9): error TS2403: Su
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(61,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type '{ [P in keyof T]: T[P]; }', but here has type '{ readonly [P in keyof T]: T[P]; }'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(62,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type '{ [P in keyof T]: T[P]; }', but here has type '{ readonly [P in keyof T]?: T[P] | undefined; }'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(67,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type '{ [P in keyof T]: T[P]; }', but here has type '{ [P in keyof T]: T[P][]; }'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(76,45): error TS2345: Argument of type '{ x: number; }' is not assignable to parameter of type 'Readonly<{ x: number; y: number; }>'.
|
||||
Property 'y' is missing in type '{ x: number; }'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(78,59): error TS2345: Argument of type '{ x: number; y: number; z: number; }' is not assignable to parameter of type 'Readonly<{ x: number; y: number; }>'.
|
||||
Object literal may only specify known properties, and 'z' does not exist in type 'Readonly<{ x: number; y: number; }>'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(84,58): error TS2345: Argument of type '{ x: number; y: number; z: number; }' is not assignable to parameter of type 'Partial<{ x: number; y: number; }>'.
|
||||
Object literal may only specify known properties, and 'z' does not exist in type 'Partial<{ x: number; y: number; }>'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/mapped/mappedTypeErrors.ts (14 errors) ====
|
||||
==== tests/cases/conformance/types/mapped/mappedTypeErrors.ts (17 errors) ====
|
||||
|
||||
interface Shape {
|
||||
name: string;
|
||||
@@ -126,4 +132,30 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(67,9): error TS2403: Su
|
||||
var x: { [P in keyof T]: T[P][] }; // Error
|
||||
~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type '{ [P in keyof T]: T[P]; }', but here has type '{ [P in keyof T]: T[P][]; }'.
|
||||
}
|
||||
|
||||
// Check that inferences to mapped types are secondary
|
||||
|
||||
declare function objAndReadonly<T>(primary: T, secondary: Readonly<T>): T;
|
||||
declare function objAndPartial<T>(primary: T, secondary: Partial<T>): T;
|
||||
|
||||
function f20() {
|
||||
let x1 = objAndReadonly({ x: 0, y: 0 }, { x: 1 }); // Error
|
||||
~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; }' is not assignable to parameter of type 'Readonly<{ x: number; y: number; }>'.
|
||||
!!! error TS2345: Property 'y' is missing in type '{ x: number; }'.
|
||||
let x2 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1 });
|
||||
let x3 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: number; z: number; }' is not assignable to parameter of type 'Readonly<{ x: number; y: number; }>'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'z' does not exist in type 'Readonly<{ x: number; y: number; }>'.
|
||||
}
|
||||
|
||||
function f21() {
|
||||
let x1 = objAndPartial({ x: 0, y: 0 }, { x: 1 });
|
||||
let x2 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1 });
|
||||
let x3 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: number; z: number; }' is not assignable to parameter of type 'Partial<{ x: number; y: number; }>'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'z' does not exist in type 'Partial<{ x: number; y: number; }>'.
|
||||
}
|
||||
@@ -66,6 +66,23 @@ function f11<T>() {
|
||||
function f12<T>() {
|
||||
var x: { [P in keyof T]: T[P] };
|
||||
var x: { [P in keyof T]: T[P][] }; // Error
|
||||
}
|
||||
|
||||
// Check that inferences to mapped types are secondary
|
||||
|
||||
declare function objAndReadonly<T>(primary: T, secondary: Readonly<T>): T;
|
||||
declare function objAndPartial<T>(primary: T, secondary: Partial<T>): T;
|
||||
|
||||
function f20() {
|
||||
let x1 = objAndReadonly({ x: 0, y: 0 }, { x: 1 }); // Error
|
||||
let x2 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1 });
|
||||
let x3 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error
|
||||
}
|
||||
|
||||
function f21() {
|
||||
let x1 = objAndPartial({ x: 0, y: 0 }, { x: 1 });
|
||||
let x2 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1 });
|
||||
let x3 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error
|
||||
}
|
||||
|
||||
//// [mappedTypeErrors.js]
|
||||
@@ -97,6 +114,16 @@ function f12() {
|
||||
var x;
|
||||
var x; // Error
|
||||
}
|
||||
function f20() {
|
||||
var x1 = objAndReadonly({ x: 0, y: 0 }, { x: 1 }); // Error
|
||||
var x2 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1 });
|
||||
var x3 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error
|
||||
}
|
||||
function f21() {
|
||||
var x1 = objAndPartial({ x: 0, y: 0 }, { x: 1 });
|
||||
var x2 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1 });
|
||||
var x3 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error
|
||||
}
|
||||
|
||||
|
||||
//// [mappedTypeErrors.d.ts]
|
||||
@@ -137,3 +164,7 @@ declare function f4<T extends keyof Named>(x: T): void;
|
||||
declare function f10<T>(): void;
|
||||
declare function f11<T>(): void;
|
||||
declare function f12<T>(): void;
|
||||
declare function objAndReadonly<T>(primary: T, secondary: Readonly<T>): T;
|
||||
declare function objAndPartial<T>(primary: T, secondary: Partial<T>): T;
|
||||
declare function f20(): void;
|
||||
declare function f21(): void;
|
||||
|
||||
@@ -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,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; }
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// @strictNullChecks: true
|
||||
// @declaration: true
|
||||
|
||||
class Shape {
|
||||
@@ -219,6 +220,36 @@ function f60<T>(source: T, target: T) {
|
||||
}
|
||||
}
|
||||
|
||||
function f70(func: <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void) {
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'a');
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'b');
|
||||
func<{ a: any, b: any }, { a: any, c: any }>('a', 'c');
|
||||
}
|
||||
|
||||
function f71(func: <T, U>(x: T, y: U) => Partial<T & U>) {
|
||||
let x = func({ a: 1, b: "hello" }, { c: true });
|
||||
x.a; // number | undefined
|
||||
x.b; // string | undefined
|
||||
x.c; // boolean | undefined
|
||||
}
|
||||
|
||||
function f72(func: <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]) {
|
||||
let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
||||
let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
||||
let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
||||
}
|
||||
|
||||
function f73(func: <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]) {
|
||||
let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
||||
let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
||||
let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
||||
}
|
||||
|
||||
function f74(func: <T, U, K extends keyof (T | U)>(x: T, y: U, k: K) => (T | U)[K]) {
|
||||
let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number
|
||||
let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean
|
||||
}
|
||||
|
||||
// Repros from #12011
|
||||
|
||||
class Base {
|
||||
@@ -291,4 +322,47 @@ var empty = one(() => {}) // inferred as {}, expected
|
||||
type Handlers<T> = { [K in keyof T]: (t: T[K]) => void }
|
||||
declare function on<T>(handlerHash: Handlers<T>): T
|
||||
var hashOfEmpty1 = on({ test: () => {} }); // {}
|
||||
var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean }
|
||||
var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean }
|
||||
|
||||
// Repro from #12624
|
||||
|
||||
interface Options1<Data, Computed> {
|
||||
data?: Data
|
||||
computed?: Computed;
|
||||
}
|
||||
|
||||
declare class Component1<Data, Computed> {
|
||||
constructor(options: Options1<Data, Computed>);
|
||||
get<K extends keyof (Data & Computed)>(key: K): (Data & Computed)[K];
|
||||
}
|
||||
|
||||
let c1 = new Component1({
|
||||
data: {
|
||||
hello: ""
|
||||
}
|
||||
});
|
||||
|
||||
c1.get("hello");
|
||||
|
||||
// Repro from #12625
|
||||
|
||||
interface Options2<Data, Computed> {
|
||||
data?: Data
|
||||
computed?: Computed;
|
||||
}
|
||||
|
||||
declare class Component2<Data, Computed> {
|
||||
constructor(options: Options2<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
|
||||
}
|
||||
@@ -65,4 +65,15 @@ function f10(shape: Shape) {
|
||||
setProperty(shape, "name", "rectangle");
|
||||
setProperty(shape, "size", 10); // Error
|
||||
setProperty(shape, cond ? "name" : "size", 10); // Error
|
||||
}
|
||||
|
||||
function f20<T, U>(k1: keyof (T | U), k2: keyof (T & U), o1: T | U, o2: T & U) {
|
||||
o1[k1];
|
||||
o1[k2]; // Error
|
||||
o2[k1];
|
||||
o2[k2];
|
||||
o1 = o2;
|
||||
o2 = o1; // Error
|
||||
k1 = k2; // Error
|
||||
k2 = k1;
|
||||
}
|
||||
@@ -145,4 +145,11 @@ var g1 = applySpec({
|
||||
});
|
||||
|
||||
// Infers g2: (...args: any[]) => { foo: { bar: { baz: boolean } } }
|
||||
var g2 = applySpec({ foo: { bar: { baz: (x: any) => true } } });
|
||||
var g2 = applySpec({ foo: { bar: { baz: (x: any) => true } } });
|
||||
|
||||
// Repro from #12633
|
||||
|
||||
const foo = <T>(object: T, partial: Partial<T>) => object;
|
||||
let o = {a: 5, b: 7};
|
||||
foo(o, {b: 9});
|
||||
o = foo(o, {b: 9});
|
||||
@@ -67,4 +67,21 @@ function f11<T>() {
|
||||
function f12<T>() {
|
||||
var x: { [P in keyof T]: T[P] };
|
||||
var x: { [P in keyof T]: T[P][] }; // Error
|
||||
}
|
||||
|
||||
// Check that inferences to mapped types are secondary
|
||||
|
||||
declare function objAndReadonly<T>(primary: T, secondary: Readonly<T>): T;
|
||||
declare function objAndPartial<T>(primary: T, secondary: Partial<T>): T;
|
||||
|
||||
function f20() {
|
||||
let x1 = objAndReadonly({ x: 0, y: 0 }, { x: 1 }); // Error
|
||||
let x2 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1 });
|
||||
let x3 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error
|
||||
}
|
||||
|
||||
function f21() {
|
||||
let x1 = objAndPartial({ x: 0, y: 0 }, { x: 1 });
|
||||
let x2 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1 });
|
||||
let x3 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error
|
||||
}
|
||||
@@ -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");
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user