mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into numbersAreHard
Conflicts: tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt
This commit is contained in:
+274
-244
@@ -23,28 +23,34 @@ module ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
interface SymbolWriter {
|
||||
writeKind(text: string, kind: SymbolDisplayPartKind): void;
|
||||
writeSymbol(text: string, symbol: Symbol): void;
|
||||
writeLine(): void;
|
||||
increaseIndent(): void;
|
||||
decreaseIndent(): void;
|
||||
clear(): void;
|
||||
|
||||
// Called when the symbol writer encounters a symbol to write. Currently only used by the
|
||||
// declaration emitter to help determine if it should patch up the final declaration file
|
||||
// with import statements it previously saw (but chose not to emit).
|
||||
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
|
||||
}
|
||||
|
||||
interface DisplayPartsSymbolWriter extends SymbolWriter {
|
||||
displayParts(): SymbolDisplayPart[];
|
||||
}
|
||||
|
||||
interface StringSymbolWriter extends SymbolWriter {
|
||||
export interface StringSymbolWriter extends SymbolWriter {
|
||||
string(): string;
|
||||
}
|
||||
|
||||
// Pool writers to avoid needing to allocate them for every symbol we write.
|
||||
var stringWriters: StringSymbolWriter[] = [];
|
||||
export function getSingleLineStringWriter(): StringSymbolWriter {
|
||||
if (stringWriters.length == 0) {
|
||||
var str = "";
|
||||
|
||||
return {
|
||||
string: () => str,
|
||||
writeKind: text => str += text,
|
||||
writeSymbol: text => str += text,
|
||||
|
||||
// Completely ignore indentation for string writers. And map newlines to
|
||||
// a single space.
|
||||
writeLine: () => str += " ",
|
||||
increaseIndent: () => { },
|
||||
decreaseIndent: () => { },
|
||||
clear: () => str = "",
|
||||
trackSymbol: () => { }
|
||||
};
|
||||
}
|
||||
|
||||
return stringWriters.pop();
|
||||
}
|
||||
|
||||
/// fullTypeCheck denotes if this instance of the typechecker will be used to get semantic diagnostics.
|
||||
/// If fullTypeCheck === true, then the typechecker should do every possible check to produce all errors
|
||||
/// If fullTypeCheck === false, the typechecker can take shortcuts and skip checks that only produce errors.
|
||||
@@ -84,9 +90,9 @@ module ts {
|
||||
getTypeOfNode: getTypeOfNode,
|
||||
getApparentType: getApparentType,
|
||||
typeToString: typeToString,
|
||||
typeToDisplayParts: typeToDisplayParts,
|
||||
writeType: writeType,
|
||||
symbolToString: symbolToString,
|
||||
symbolToDisplayParts: symbolToDisplayParts,
|
||||
writeSymbol: writeSymbol,
|
||||
getAugmentedPropertiesOfApparentType: getAugmentedPropertiesOfApparentType,
|
||||
getRootSymbol: getRootSymbol,
|
||||
getContextualType: getContextualType,
|
||||
@@ -94,10 +100,15 @@ module ts {
|
||||
getResolvedSignature: getResolvedSignature,
|
||||
getEnumMemberValue: getEnumMemberValue,
|
||||
isValidPropertyAccess: isValidPropertyAccess,
|
||||
getSignatureFromDeclaration: getSignatureFromDeclaration,
|
||||
writeSignature: writeSignature,
|
||||
writeTypeParameter: writeTypeParameter,
|
||||
writeTypeParametersOfSymbol: writeTypeParametersOfSymbol,
|
||||
isImplementationOfOverload: isImplementationOfOverload,
|
||||
getAliasedSymbol: resolveImport
|
||||
};
|
||||
|
||||
var undefinedSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "undefined");
|
||||
var undefinedSymbol = createSymbol(SymbolFlags.Undefined | SymbolFlags.Property | SymbolFlags.Transient, "undefined");
|
||||
var argumentsSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "arguments");
|
||||
var unknownSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "unknown");
|
||||
var resolvingSymbol = createSymbol(SymbolFlags.Transient, "__resolving__");
|
||||
@@ -923,58 +934,6 @@ module ts {
|
||||
{ accessibility: SymbolAccessibility.NotAccessible, errorSymbolName: firstIdentifierName };
|
||||
}
|
||||
|
||||
// Pool writers to avoid needing to allocate them for every symbol we write.
|
||||
var displayPartWriters: DisplayPartsSymbolWriter[] = [];
|
||||
var stringWriters: StringSymbolWriter[] = [];
|
||||
|
||||
function getDisplayPartWriter(): DisplayPartsSymbolWriter {
|
||||
if (displayPartWriters.length == 0) {
|
||||
var displayParts: SymbolDisplayPart[] = [];
|
||||
return {
|
||||
displayParts: () => displayParts,
|
||||
writeKind: (text, kind) => displayParts.push(new SymbolDisplayPart(text, kind, undefined)),
|
||||
writeSymbol: (text, symbol) => displayParts.push(symbolPart(text, symbol)),
|
||||
|
||||
// Completely ignore indentation for display part writers. And map newlines to
|
||||
// a single space.
|
||||
writeLine: () => displayParts.push(spacePart()),
|
||||
increaseIndent: () => { },
|
||||
decreaseIndent: () => { },
|
||||
clear: () => displayParts = [],
|
||||
trackSymbol: () => { }
|
||||
};
|
||||
}
|
||||
|
||||
return displayPartWriters.pop();
|
||||
}
|
||||
|
||||
function getStringWriter(): StringSymbolWriter {
|
||||
if (stringWriters.length == 0) {
|
||||
var str = "";
|
||||
|
||||
return {
|
||||
string: () => str,
|
||||
writeKind: text => str += text,
|
||||
writeSymbol: text => str += text,
|
||||
|
||||
// Completely ignore indentation for string writers. And map newlines to
|
||||
// a single space.
|
||||
writeLine: () => str += " ",
|
||||
increaseIndent: () => { },
|
||||
decreaseIndent: () => { },
|
||||
clear: () => str = "",
|
||||
trackSymbol: () => { }
|
||||
};
|
||||
}
|
||||
|
||||
return stringWriters.pop();
|
||||
}
|
||||
|
||||
function releaseDisplayPartWriter(writer: DisplayPartsSymbolWriter) {
|
||||
writer.clear();
|
||||
displayPartWriters.push(writer);
|
||||
}
|
||||
|
||||
function releaseStringWriter(writer: StringSymbolWriter) {
|
||||
writer.clear()
|
||||
stringWriters.push(writer);
|
||||
@@ -997,7 +956,7 @@ module ts {
|
||||
}
|
||||
|
||||
function symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string {
|
||||
var writer = getStringWriter();
|
||||
var writer = getSingleLineStringWriter();
|
||||
writeSymbol(symbol, writer, enclosingDeclaration, meaning);
|
||||
|
||||
var result = writer.string();
|
||||
@@ -1006,20 +965,25 @@ module ts {
|
||||
return result;
|
||||
}
|
||||
|
||||
function symbolToDisplayParts(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): SymbolDisplayPart[] {
|
||||
var writer = getDisplayPartWriter();
|
||||
writeSymbol(symbol, writer, enclosingDeclaration, meaning);
|
||||
|
||||
var result = writer.displayParts();
|
||||
releaseDisplayPartWriter(writer);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Enclosing declaration is optional when we don't want to get qualified name in the enclosing declaration scope
|
||||
// Meaning needs to be specified if the enclosing declaration is given
|
||||
function writeSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags): void {
|
||||
function writeSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void {
|
||||
var parentSymbol: Symbol;
|
||||
function writeSymbolName(symbol: Symbol): void {
|
||||
if (parentSymbol) {
|
||||
// Write type arguments of instantiated class/interface here
|
||||
if (flags & SymbolFormatFlags.WriteTypeParametersOrArguments) {
|
||||
if (symbol.flags & SymbolFlags.Instantiated) {
|
||||
writeTypeArguments(getTypeParametersOfClassOrInterface(parentSymbol),
|
||||
(<TransientSymbol>symbol).mapper, writer, enclosingDeclaration);
|
||||
}
|
||||
else {
|
||||
writeTypeParametersOfSymbol(parentSymbol, writer, enclosingDeclaration);
|
||||
}
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.DotToken);
|
||||
}
|
||||
parentSymbol = symbol;
|
||||
if (symbol.declarations && symbol.declarations.length > 0) {
|
||||
var declaration = symbol.declarations[0];
|
||||
if (declaration.name) {
|
||||
@@ -1031,16 +995,14 @@ module ts {
|
||||
writer.writeSymbol(symbol.name, symbol);
|
||||
}
|
||||
|
||||
// Let the writer know we just wrote out a symbol. The declarationemitter writer uses
|
||||
// this to determine if an import it has previously seen (and not writter out) needs
|
||||
// Let the writer know we just wrote out a symbol. The declaration emitter writer uses
|
||||
// this to determine if an import it has previously seen (and not written out) needs
|
||||
// to be written to the file once the walk of the tree is complete.
|
||||
//
|
||||
// NOTE(cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree
|
||||
// up front (for example, during checking) could determien if we need to emit the imports
|
||||
// up front (for example, during checking) could determine if we need to emit the imports
|
||||
// and we could then access that data during declaration emit.
|
||||
writer.trackSymbol(symbol, enclosingDeclaration, meaning);
|
||||
|
||||
var needsDot = false;
|
||||
function walkSymbol(symbol: Symbol, meaning: SymbolFlags): void {
|
||||
if (symbol) {
|
||||
var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning);
|
||||
@@ -1056,26 +1018,21 @@ module ts {
|
||||
|
||||
if (accessibleSymbolChain) {
|
||||
for (var i = 0, n = accessibleSymbolChain.length; i < n; i++) {
|
||||
if (needsDot) {
|
||||
writePunctuation(writer, SyntaxKind.DotToken);
|
||||
}
|
||||
|
||||
writeSymbolName(accessibleSymbolChain[i]);
|
||||
needsDot = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// If we didn't find accessible symbol chain for this symbol, break if this is external module
|
||||
if (!needsDot && ts.forEach(symbol.declarations, declaration => hasExternalModuleSymbol(declaration))) {
|
||||
if (!parentSymbol && ts.forEach(symbol.declarations, declaration => hasExternalModuleSymbol(declaration))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (needsDot) {
|
||||
writePunctuation(writer, SyntaxKind.DotToken);
|
||||
// if this is anonymous type break
|
||||
if (symbol.flags & SymbolFlags.TypeLiteral || symbol.flags & SymbolFlags.ObjectLiteral) {
|
||||
return;
|
||||
}
|
||||
|
||||
writeSymbolName(symbol);
|
||||
needsDot = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1092,12 +1049,8 @@ module ts {
|
||||
return writeSymbolName(symbol);
|
||||
}
|
||||
|
||||
function writeSymbolToTextWriter(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags, writer: TextWriter) {
|
||||
writer.write(symbolToString(symbol, enclosingDeclaration, meaning));
|
||||
}
|
||||
|
||||
function typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string {
|
||||
var writer = getStringWriter();
|
||||
var writer = getSingleLineStringWriter();
|
||||
writeType(type, writer, enclosingDeclaration, flags);
|
||||
|
||||
var result = writer.string();
|
||||
@@ -1111,23 +1064,15 @@ module ts {
|
||||
return result;
|
||||
}
|
||||
|
||||
function typeToDisplayParts(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[] {
|
||||
var writer = getDisplayPartWriter();
|
||||
writeType(type, writer, enclosingDeclaration, flags);
|
||||
function writeType(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, typeStack?: Type[]) {
|
||||
return writeType(type, flags | TypeFormatFlags.WriteArrowStyleSignature);
|
||||
|
||||
var result = writer.displayParts();
|
||||
releaseDisplayPartWriter(writer);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function writeType(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) {
|
||||
var typeStack: Type[];
|
||||
return writeType(type, /*allowFunctionOrConstructorTypeLiteral*/ true);
|
||||
|
||||
function writeType(type: Type, allowFunctionOrConstructorTypeLiteral: boolean) {
|
||||
function writeType(type: Type, flags: TypeFormatFlags) {
|
||||
// Write undefined/null type as any
|
||||
if (type.flags & TypeFlags.Intrinsic) {
|
||||
writer.writeKind((<IntrinsicType>type).intrinsicName, SymbolDisplayPartKind.keyword);
|
||||
// Special handling for unknown / resolving types, they should show up as any and not unknown or __resolving
|
||||
writer.writeKind(!(flags & TypeFormatFlags.WriteOwnNameForAnyLike) &&
|
||||
(type.flags & TypeFlags.Any) ? "any" : (<IntrinsicType>type).intrinsicName, SymbolDisplayPartKind.keyword);
|
||||
}
|
||||
else if (type.flags & TypeFlags.Reference) {
|
||||
writeTypeReference(<TypeReference>type);
|
||||
@@ -1139,7 +1084,7 @@ module ts {
|
||||
writeTupleType(<TupleType>type);
|
||||
}
|
||||
else if (type.flags & TypeFlags.Anonymous) {
|
||||
writeAnonymousType(<ObjectType>type, allowFunctionOrConstructorTypeLiteral);
|
||||
writeAnonymousType(<ObjectType>type, flags);
|
||||
}
|
||||
else if (type.flags & TypeFlags.StringLiteral) {
|
||||
writer.writeKind((<StringLiteralType>type).text, SymbolDisplayPartKind.stringLiteral);
|
||||
@@ -1161,7 +1106,7 @@ module ts {
|
||||
writePunctuation(writer, SyntaxKind.CommaToken);
|
||||
writeSpace(writer);
|
||||
}
|
||||
writeType(types[i], /*allowFunctionOrConstructorTypeLiteral*/ true);
|
||||
writeType(types[i], flags | TypeFormatFlags.WriteArrowStyleSignature);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1169,7 +1114,7 @@ module ts {
|
||||
if (type.target === globalArrayType && !(flags & TypeFormatFlags.WriteArrayAsGenericType)) {
|
||||
// If we are writing array element type the arrow style signatures are not allowed as
|
||||
// we need to surround it by curlies, e.g. { (): T; }[]; as () => T[] would mean something different
|
||||
writeType(type.typeArguments[0], /*allowFunctionOrConstructorTypeLiteral*/ false);
|
||||
writeType(type.typeArguments[0], flags & ~TypeFormatFlags.WriteArrowStyleSignature);
|
||||
writePunctuation(writer, SyntaxKind.OpenBracketToken);
|
||||
writePunctuation(writer, SyntaxKind.CloseBracketToken);
|
||||
}
|
||||
@@ -1187,7 +1132,7 @@ module ts {
|
||||
writePunctuation(writer, SyntaxKind.CloseBracketToken);
|
||||
}
|
||||
|
||||
function writeAnonymousType(type: ObjectType, allowFunctionOrConstructorTypeLiteral: boolean) {
|
||||
function writeAnonymousType(type: ObjectType, flags: TypeFormatFlags) {
|
||||
// Always use 'typeof T' for type of class, enum, and module objects
|
||||
if (type.symbol && type.symbol.flags & (SymbolFlags.Class | SymbolFlags.Enum | SymbolFlags.ValueModule)) {
|
||||
writeTypeofSymbol(type);
|
||||
@@ -1205,7 +1150,7 @@ module ts {
|
||||
typeStack = [];
|
||||
}
|
||||
typeStack.push(type);
|
||||
writeLiteralType(type, allowFunctionOrConstructorTypeLiteral);
|
||||
writeLiteralType(type, flags);
|
||||
typeStack.pop();
|
||||
}
|
||||
|
||||
@@ -1233,7 +1178,7 @@ module ts {
|
||||
writeSymbol(type.symbol, writer, enclosingDeclaration, SymbolFlags.Value);
|
||||
}
|
||||
|
||||
function writeLiteralType(type: ObjectType, allowFunctionOrConstructorTypeLiteral: boolean) {
|
||||
function writeLiteralType(type: ObjectType, flags: TypeFormatFlags) {
|
||||
var resolved = resolveObjectTypeMembers(type);
|
||||
if (!resolved.properties.length && !resolved.stringIndexType && !resolved.numberIndexType) {
|
||||
if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
|
||||
@@ -1242,15 +1187,15 @@ module ts {
|
||||
return;
|
||||
}
|
||||
|
||||
if (allowFunctionOrConstructorTypeLiteral) {
|
||||
if (flags & TypeFormatFlags.WriteArrowStyleSignature) {
|
||||
if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
|
||||
writeSignature(resolved.callSignatures[0], /*arrowStyle*/ true);
|
||||
writeSignature(resolved.callSignatures[0], writer, enclosingDeclaration, flags, typeStack);
|
||||
return;
|
||||
}
|
||||
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
|
||||
writeKeyword(writer, SyntaxKind.NewKeyword);
|
||||
writeSpace(writer);
|
||||
writeSignature(resolved.constructSignatures[0], /*arrowStyle*/ true);
|
||||
writeSignature(resolved.constructSignatures[0], writer, enclosingDeclaration, flags, typeStack);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1260,7 +1205,7 @@ module ts {
|
||||
writer.writeLine();
|
||||
writer.increaseIndent();
|
||||
for (var i = 0; i < resolved.callSignatures.length; i++) {
|
||||
writeSignature(resolved.callSignatures[i]);
|
||||
writeSignature(resolved.callSignatures[i], writer, enclosingDeclaration, flags & ~TypeFormatFlags.WriteArrowStyleSignature, typeStack);
|
||||
writePunctuation(writer, SyntaxKind.SemicolonToken);
|
||||
writer.writeLine();
|
||||
}
|
||||
@@ -1268,7 +1213,7 @@ module ts {
|
||||
writeKeyword(writer, SyntaxKind.NewKeyword);
|
||||
writeSpace(writer);
|
||||
|
||||
writeSignature(resolved.constructSignatures[i]);
|
||||
writeSignature(resolved.constructSignatures[i], writer, enclosingDeclaration, flags & ~TypeFormatFlags.WriteArrowStyleSignature, typeStack);
|
||||
writePunctuation(writer, SyntaxKind.SemicolonToken);
|
||||
writer.writeLine();
|
||||
}
|
||||
@@ -1282,7 +1227,7 @@ module ts {
|
||||
writePunctuation(writer, SyntaxKind.CloseBracketToken);
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
writeSpace(writer);
|
||||
writeType(resolved.stringIndexType, /*allowFunctionOrConstructorTypeLiteral*/ true);
|
||||
writeType(resolved.stringIndexType, flags | TypeFormatFlags.WriteArrowStyleSignature);
|
||||
writePunctuation(writer, SyntaxKind.SemicolonToken);
|
||||
writer.writeLine();
|
||||
}
|
||||
@@ -1296,7 +1241,7 @@ module ts {
|
||||
writePunctuation(writer, SyntaxKind.CloseBracketToken);
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
writeSpace(writer);
|
||||
writeType(resolved.numberIndexType, /*allowFunctionOrConstructorTypeLiteral*/ true);
|
||||
writeType(resolved.numberIndexType, flags | TypeFormatFlags.WriteArrowStyleSignature);
|
||||
writePunctuation(writer, SyntaxKind.SemicolonToken);
|
||||
writer.writeLine();
|
||||
}
|
||||
@@ -1310,7 +1255,7 @@ module ts {
|
||||
if (isOptionalProperty(p)) {
|
||||
writePunctuation(writer, SyntaxKind.QuestionToken);
|
||||
}
|
||||
writeSignature(signatures[j]);
|
||||
writeSignature(signatures[j], writer, enclosingDeclaration, flags & ~TypeFormatFlags.WriteArrowStyleSignature, typeStack);
|
||||
writePunctuation(writer, SyntaxKind.SemicolonToken);
|
||||
writer.writeLine();
|
||||
}
|
||||
@@ -1322,7 +1267,7 @@ module ts {
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
writeSpace(writer);
|
||||
writeType(t, /*allowFunctionOrConstructorTypeLiteral*/ true);
|
||||
writeType(t, flags | TypeFormatFlags.WriteArrowStyleSignature);
|
||||
writePunctuation(writer, SyntaxKind.SemicolonToken);
|
||||
writer.writeLine();
|
||||
}
|
||||
@@ -1330,59 +1275,93 @@ module ts {
|
||||
writer.decreaseIndent();
|
||||
writePunctuation(writer, SyntaxKind.CloseBraceToken);
|
||||
}
|
||||
}
|
||||
|
||||
function writeSignature(signature: Signature, arrowStyle?: boolean) {
|
||||
if (signature.typeParameters) {
|
||||
writePunctuation(writer, SyntaxKind.LessThanToken);
|
||||
for (var i = 0; i < signature.typeParameters.length; i++) {
|
||||
if (i > 0) {
|
||||
writePunctuation(writer, SyntaxKind.CommaToken);
|
||||
writeSpace(writer);
|
||||
}
|
||||
var tp = signature.typeParameters[i];
|
||||
writeSymbol(tp.symbol, writer);
|
||||
var constraint = getConstraintOfTypeParameter(tp);
|
||||
if (constraint) {
|
||||
writeSpace(writer);
|
||||
writeKeyword(writer, SyntaxKind.ExtendsKeyword);
|
||||
writeSpace(writer);
|
||||
writeType(constraint, /*allowFunctionOrConstructorTypeLiteral*/ true);
|
||||
}
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.GreaterThanToken);
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.OpenParenToken);
|
||||
for (var i = 0; i < signature.parameters.length; i++) {
|
||||
function writeTypeParameter(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, typeStack?: Type[]) {
|
||||
writeSymbol(tp.symbol, writer);
|
||||
var constraint = getConstraintOfTypeParameter(tp);
|
||||
if (constraint) {
|
||||
writeSpace(writer);
|
||||
writeKeyword(writer, SyntaxKind.ExtendsKeyword);
|
||||
writeSpace(writer);
|
||||
writeType(constraint, writer, enclosingDeclaration, flags, typeStack);
|
||||
}
|
||||
}
|
||||
|
||||
function writeTypeParameters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, typeStack?: Type[]) {
|
||||
if (typeParameters && typeParameters.length) {
|
||||
writePunctuation(writer, SyntaxKind.LessThanToken);
|
||||
for (var i = 0; i < typeParameters.length; i++) {
|
||||
if (i > 0) {
|
||||
writePunctuation(writer, SyntaxKind.CommaToken);
|
||||
writeSpace(writer);
|
||||
}
|
||||
var p = signature.parameters[i];
|
||||
if (getDeclarationFlagsFromSymbol(p) & NodeFlags.Rest) {
|
||||
writePunctuation(writer, SyntaxKind.DotDotDotToken);
|
||||
}
|
||||
writeSymbol(p, writer);
|
||||
if (p.valueDeclaration.flags & NodeFlags.QuestionMark || (<VariableDeclaration>p.valueDeclaration).initializer) {
|
||||
writePunctuation(writer, SyntaxKind.QuestionToken);
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
writeSpace(writer);
|
||||
writeTypeParameter(typeParameters[i], writer, enclosingDeclaration, flags, typeStack);
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.GreaterThanToken);
|
||||
}
|
||||
}
|
||||
|
||||
writeType(getTypeOfSymbol(p), /*allowFunctionOrConstructorTypeLiteral*/ true);
|
||||
function writeTypeArguments(typeParameters: TypeParameter[], mapper: TypeMapper, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, typeStack?: Type[]) {
|
||||
if (typeParameters && typeParameters.length) {
|
||||
writePunctuation(writer, SyntaxKind.LessThanToken);
|
||||
for (var i = 0; i < typeParameters.length; i++) {
|
||||
if (i > 0) {
|
||||
writePunctuation(writer, SyntaxKind.CommaToken);
|
||||
writeSpace(writer);
|
||||
}
|
||||
writeType(mapper(typeParameters[i]), writer, enclosingDeclaration, TypeFormatFlags.WriteArrowStyleSignature);
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.GreaterThanToken);
|
||||
}
|
||||
}
|
||||
|
||||
writePunctuation(writer, SyntaxKind.CloseParenToken);
|
||||
if (arrowStyle) {
|
||||
function writeTypeParametersOfSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) {
|
||||
var rootSymbol = getRootSymbol(symbol);
|
||||
if (rootSymbol.flags & SymbolFlags.Class || rootSymbol.flags & SymbolFlags.Interface) {
|
||||
writeTypeParameters(getTypeParametersOfClassOrInterface(symbol), writer, enclosingDeclaraiton, flags);
|
||||
}
|
||||
}
|
||||
|
||||
function writeSignature(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, typeStack?: Type[]) {
|
||||
if (signature.target && (flags & TypeFormatFlags.WriteTypeArgumentsOfSignature)) {
|
||||
// Instantiated signature, write type arguments instead
|
||||
writeTypeArguments(signature.target.typeParameters, signature.mapper, writer, enclosingDeclaration);
|
||||
}
|
||||
else {
|
||||
writeTypeParameters(signature.typeParameters, writer, enclosingDeclaration, flags, typeStack);
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.OpenParenToken);
|
||||
for (var i = 0; i < signature.parameters.length; i++) {
|
||||
if (i > 0) {
|
||||
writePunctuation(writer, SyntaxKind.CommaToken);
|
||||
writeSpace(writer);
|
||||
writePunctuation(writer, SyntaxKind.EqualsGreaterThanToken);
|
||||
}
|
||||
else {
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
var p = signature.parameters[i];
|
||||
if (getDeclarationFlagsFromSymbol(p) & NodeFlags.Rest) {
|
||||
writePunctuation(writer, SyntaxKind.DotDotDotToken);
|
||||
}
|
||||
writeSymbol(p, writer);
|
||||
if (p.valueDeclaration.flags & NodeFlags.QuestionMark || (<VariableDeclaration>p.valueDeclaration).initializer) {
|
||||
writePunctuation(writer, SyntaxKind.QuestionToken);
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
writeSpace(writer);
|
||||
|
||||
writeType(getReturnTypeOfSignature(signature), /*allowFunctionOrConstructorTypeLiteral*/ true);
|
||||
writeType(getTypeOfSymbol(p), writer, enclosingDeclaration, flags, typeStack);
|
||||
}
|
||||
|
||||
writePunctuation(writer, SyntaxKind.CloseParenToken);
|
||||
if (flags & TypeFormatFlags.WriteArrowStyleSignature) {
|
||||
writeSpace(writer);
|
||||
writePunctuation(writer, SyntaxKind.EqualsGreaterThanToken);
|
||||
}
|
||||
else {
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
}
|
||||
writeSpace(writer);
|
||||
|
||||
writeType(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags, typeStack);
|
||||
}
|
||||
|
||||
function isDeclarationVisible(node: Declaration): boolean {
|
||||
@@ -3894,9 +3873,21 @@ module ts {
|
||||
var func = <FunctionDeclaration>parameter.parent;
|
||||
if (func.kind === SyntaxKind.FunctionExpression || func.kind === SyntaxKind.ArrowFunction) {
|
||||
if (isContextSensitiveExpression(func)) {
|
||||
var signature = getContextualSignature(func);
|
||||
if (signature) {
|
||||
return getTypeAtPosition(signature, indexOf(func.parameters, parameter));
|
||||
var contextualSignature = getContextualSignature(func);
|
||||
if (contextualSignature) {
|
||||
|
||||
var funcHasRestParameters = hasRestParameters(func);
|
||||
var len = func.parameters.length - (funcHasRestParameters ? 1 : 0);
|
||||
var indexOfParameter = indexOf(func.parameters, parameter);
|
||||
if (indexOfParameter < len) {
|
||||
return getTypeAtPosition(contextualSignature, indexOfParameter);
|
||||
}
|
||||
|
||||
// If last parameter is contextually rest parameter get its type
|
||||
if (indexOfParameter === (func.parameters.length - 1) &&
|
||||
funcHasRestParameters && contextualSignature.hasRestParameter && func.parameters.length >= contextualSignature.parameters.length) {
|
||||
return getTypeOfSymbol(contextualSignature.parameters[contextualSignature.parameters.length - 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4529,8 +4520,21 @@ module ts {
|
||||
}
|
||||
else {
|
||||
error(node, Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
|
||||
return resolveErrorCall(node);
|
||||
}
|
||||
|
||||
// No signature was applicable. We have already reported the errors for the invalid signature.
|
||||
// If this is a type resolution session, e.g. Language Service, try to get better information that anySignature.
|
||||
// Pick the first candidate that matches the arity. This way we can get a contextual type for cases like:
|
||||
// declare function f(a: { xa: number; xb: number; });
|
||||
// f({ |
|
||||
if (!fullTypeCheck) {
|
||||
for (var i = 0, n = candidates.length; i < n; i++) {
|
||||
if (signatureHasCorrectArity(node, candidates[i])) {
|
||||
return candidates[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return resolveErrorCall(node);
|
||||
|
||||
// The candidate list orders groups in reverse, but within a group signatures are kept in declaration order
|
||||
@@ -7151,6 +7155,22 @@ module ts {
|
||||
return mapToArray(symbols);
|
||||
}
|
||||
|
||||
function isTypeDeclarationName(name: Node): boolean {
|
||||
return name.kind == SyntaxKind.Identifier &&
|
||||
isTypeDeclaration(name.parent) &&
|
||||
(<Declaration>name.parent).name === name;
|
||||
}
|
||||
|
||||
function isTypeDeclaration(node: Node): boolean {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.TypeParameter:
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
case SyntaxKind.InterfaceDeclaration:
|
||||
case SyntaxKind.EnumDeclaration:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// True if the given identifier is part of a type reference
|
||||
function isTypeReferenceIdentifier(entityName: EntityName): boolean {
|
||||
var node: Node = entityName;
|
||||
@@ -7229,6 +7249,78 @@ module ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
function isTypeNode(node: Node): boolean {
|
||||
if (SyntaxKind.FirstTypeNode <= node.kind && node.kind <= SyntaxKind.LastTypeNode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.AnyKeyword:
|
||||
case SyntaxKind.NumberKeyword:
|
||||
case SyntaxKind.StringKeyword:
|
||||
case SyntaxKind.BooleanKeyword:
|
||||
return true;
|
||||
case SyntaxKind.VoidKeyword:
|
||||
return node.parent.kind !== SyntaxKind.PrefixOperator;
|
||||
case SyntaxKind.StringLiteral:
|
||||
// Specialized signatures can have string literals as their parameters' type names
|
||||
return node.parent.kind === SyntaxKind.Parameter;
|
||||
|
||||
// Identifiers and qualified names may be type nodes, depending on their context. Climb
|
||||
// above them to find the lowest container
|
||||
case SyntaxKind.Identifier:
|
||||
// If the identifier is the RHS of a qualified name, then it's a type iff its parent is.
|
||||
if (node.parent.kind === SyntaxKind.QualifiedName) {
|
||||
node = node.parent;
|
||||
}
|
||||
// fall through
|
||||
case SyntaxKind.QualifiedName:
|
||||
// At this point, node is either a qualified name or an identifier
|
||||
Debug.assert(node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName, "'node' was expected to be a qualified name or identifier in 'isTypeNode'.");
|
||||
|
||||
var parent = node.parent;
|
||||
if (parent.kind === SyntaxKind.TypeQuery) {
|
||||
return false;
|
||||
}
|
||||
// Do not recursively call isTypeNode on the parent. In the example:
|
||||
//
|
||||
// var a: A.B.C;
|
||||
//
|
||||
// Calling isTypeNode would consider the qualified name A.B a type node. Only C or
|
||||
// A.B.C is a type node.
|
||||
if (SyntaxKind.FirstTypeNode <= parent.kind && parent.kind <= SyntaxKind.LastTypeNode) {
|
||||
return true;
|
||||
}
|
||||
switch (parent.kind) {
|
||||
case SyntaxKind.TypeParameter:
|
||||
return node === (<TypeParameterDeclaration>parent).constraint;
|
||||
case SyntaxKind.Property:
|
||||
case SyntaxKind.Parameter:
|
||||
case SyntaxKind.VariableDeclaration:
|
||||
return node === (<VariableDeclaration>parent).type;
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
case SyntaxKind.FunctionExpression:
|
||||
case SyntaxKind.ArrowFunction:
|
||||
case SyntaxKind.Constructor:
|
||||
case SyntaxKind.Method:
|
||||
case SyntaxKind.GetAccessor:
|
||||
case SyntaxKind.SetAccessor:
|
||||
return node === (<FunctionDeclaration>parent).type;
|
||||
case SyntaxKind.CallSignature:
|
||||
case SyntaxKind.ConstructSignature:
|
||||
case SyntaxKind.IndexSignature:
|
||||
return node === (<SignatureDeclaration>parent).type;
|
||||
case SyntaxKind.TypeAssertion:
|
||||
return node === (<TypeAssertion>parent).type;
|
||||
case SyntaxKind.CallExpression:
|
||||
case SyntaxKind.NewExpression:
|
||||
return (<CallExpression>parent).typeArguments && (<CallExpression>parent).typeArguments.indexOf(node) >= 0;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function isInRightSideOfImportOrExportAssignment(node: EntityName) {
|
||||
while (node.parent.kind === SyntaxKind.QualifiedName) {
|
||||
node = node.parent;
|
||||
@@ -7595,34 +7687,17 @@ module ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Create a single instance that we can wrap the underlying emitter TextWriter with. That
|
||||
// way we don't have to allocate a new wrapper every time writeTypeAtLocation and
|
||||
// writeReturnTypeOfSignatureDeclaration are called.
|
||||
var emitSymbolWriter = {
|
||||
writer: <TextWriter>undefined,
|
||||
|
||||
writeKind: function (text: string) { this.writer.write(text) },
|
||||
writeSymbol: function (text: string) { this.writer.write(text) },
|
||||
writeLine: function () { this.writer.writeLine() },
|
||||
increaseIndent: function () { this.writer.increaseIndent() },
|
||||
decreaseIndent: function () { this.writer.decreaseIndent() },
|
||||
clear: function () { },
|
||||
trackSymbol: function (symbol: Symbol, declaration: Node, meaning: SymbolFlags) { this.writer.trackSymbol(symbol, declaration, meaning) }
|
||||
};
|
||||
|
||||
function writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: TextWriter) {
|
||||
function writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) {
|
||||
// Get type of the symbol if this is the valid symbol otherwise get type at location
|
||||
var symbol = getSymbolOfNode(location);
|
||||
var type = symbol && !(symbol.flags & SymbolFlags.TypeLiteral) ? getTypeOfSymbol(symbol) : getTypeFromTypeNode(location);
|
||||
|
||||
emitSymbolWriter.writer = writer;
|
||||
writeType(type, emitSymbolWriter, enclosingDeclaration, flags);
|
||||
writeType(type, writer, enclosingDeclaration, flags);
|
||||
}
|
||||
|
||||
function writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: TextWriter) {
|
||||
function writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) {
|
||||
var signature = getSignatureFromDeclaration(signatureDeclaration);
|
||||
emitSymbolWriter.writer = writer;
|
||||
writeType(getReturnTypeOfSignature(signature), emitSymbolWriter, enclosingDeclaration, flags);
|
||||
writeType(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags);
|
||||
}
|
||||
|
||||
function invokeEmitter(targetSourceFile?: SourceFile) {
|
||||
@@ -7680,49 +7755,4 @@ module ts {
|
||||
|
||||
return checker;
|
||||
}
|
||||
|
||||
export function spacePart() {
|
||||
return new SymbolDisplayPart(" ", SymbolDisplayPartKind.space, undefined);
|
||||
}
|
||||
|
||||
export function keywordPart(kind: SyntaxKind) {
|
||||
return new SymbolDisplayPart(tokenToString(kind), SymbolDisplayPartKind.keyword, undefined);
|
||||
}
|
||||
|
||||
export function punctuationPart(kind: SyntaxKind) {
|
||||
return new SymbolDisplayPart(tokenToString(kind), SymbolDisplayPartKind.punctuation, undefined);
|
||||
}
|
||||
|
||||
export function operatorPart(kind: SyntaxKind) {
|
||||
return new SymbolDisplayPart(tokenToString(kind), SymbolDisplayPartKind.operator, undefined);
|
||||
}
|
||||
|
||||
export function textPart(text: string) {
|
||||
return new SymbolDisplayPart(text, SymbolDisplayPartKind.text, undefined);
|
||||
}
|
||||
|
||||
export function symbolPart(text: string, symbol: Symbol) {
|
||||
return new SymbolDisplayPart(text, displayPartKind(symbol), symbol)
|
||||
}
|
||||
|
||||
function displayPartKind(symbol: Symbol): SymbolDisplayPartKind {
|
||||
var flags = symbol.flags;
|
||||
|
||||
if (flags & SymbolFlags.Variable) {
|
||||
return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === SyntaxKind.Parameter
|
||||
? SymbolDisplayPartKind.parameterName
|
||||
: SymbolDisplayPartKind.localName;
|
||||
}
|
||||
else if (flags & SymbolFlags.Property) { return SymbolDisplayPartKind.propertyName; }
|
||||
else if (flags & SymbolFlags.EnumMember) { return SymbolDisplayPartKind.enumMemberName; }
|
||||
else if (flags & SymbolFlags.Function) { return SymbolDisplayPartKind.functionName; }
|
||||
else if (flags & SymbolFlags.Class) { return SymbolDisplayPartKind.className; }
|
||||
else if (flags & SymbolFlags.Interface) { return SymbolDisplayPartKind.interfaceName; }
|
||||
else if (flags & SymbolFlags.Enum) { return SymbolDisplayPartKind.enumName; }
|
||||
else if (flags & SymbolFlags.Module) { return SymbolDisplayPartKind.moduleName; }
|
||||
else if (flags & SymbolFlags.Method) { return SymbolDisplayPartKind.methodName; }
|
||||
else if (flags & SymbolFlags.TypeParameter) { return SymbolDisplayPartKind.typeParameterName; }
|
||||
|
||||
return SymbolDisplayPartKind.text;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-2
@@ -4,7 +4,9 @@
|
||||
/// <reference path="parser.ts"/>
|
||||
|
||||
module ts {
|
||||
interface EmitTextWriter extends TextWriter {
|
||||
interface EmitTextWriter extends SymbolWriter {
|
||||
write(s: string): void;
|
||||
getText(): string;
|
||||
rawWrite(s: string): void;
|
||||
writeLiteral(s: string): void;
|
||||
getTextPos(): number;
|
||||
@@ -14,7 +16,7 @@ module ts {
|
||||
}
|
||||
|
||||
var indentStrings: string[] = ["", " "];
|
||||
function getIndentString(level: number) {
|
||||
export function getIndentString(level: number) {
|
||||
if (indentStrings[level] === undefined) {
|
||||
indentStrings[level] = getIndentString(level - 1) + indentStrings[1];
|
||||
}
|
||||
@@ -147,9 +149,17 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
function writeKind(text: string, kind: SymbolDisplayPartKind) {
|
||||
write(text);
|
||||
}
|
||||
function writeSymbol(text: string, symbol: Symbol) {
|
||||
write(text);
|
||||
}
|
||||
return {
|
||||
write: write,
|
||||
trackSymbol: trackSymbol,
|
||||
writeKind: writeKind,
|
||||
writeSymbol: writeSymbol,
|
||||
rawWrite: rawWrite,
|
||||
writeLiteral: writeLiteral,
|
||||
writeLine: writeLine,
|
||||
@@ -160,6 +170,7 @@ module ts {
|
||||
getLine: () => lineCount + 1,
|
||||
getColumn: () => lineStart ? indent * getIndentSize() + 1 : output.length - linePos + 1,
|
||||
getText: () => output,
|
||||
clear: () => { }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -391,100 +391,6 @@ module ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: this function only works when given a node with valid parent pointers.
|
||||
*/
|
||||
export function isTypeNode(node: Node): boolean {
|
||||
if (node.kind >= SyntaxKind.FirstTypeNode && node.kind <= SyntaxKind.LastTypeNode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.AnyKeyword:
|
||||
case SyntaxKind.NumberKeyword:
|
||||
case SyntaxKind.StringKeyword:
|
||||
case SyntaxKind.BooleanKeyword:
|
||||
return true;
|
||||
case SyntaxKind.VoidKeyword:
|
||||
return node.parent.kind !== SyntaxKind.PrefixOperator;
|
||||
case SyntaxKind.StringLiteral:
|
||||
// Specialized signatures can have string literals as their parameters' type names
|
||||
return node.parent.kind === SyntaxKind.Parameter;
|
||||
// Identifiers and qualified names may be type nodes, depending on their context. Climb
|
||||
// above them to find the lowest container
|
||||
case SyntaxKind.Identifier:
|
||||
// If the identifier is the RHS of a qualified name, then it's a type iff its parent is.
|
||||
if (node.parent.kind === SyntaxKind.QualifiedName) {
|
||||
node = node.parent;
|
||||
}
|
||||
// Fall through
|
||||
case SyntaxKind.QualifiedName:
|
||||
// At this point, node is either a qualified name or an identifier
|
||||
var parent = node.parent;
|
||||
if (parent.kind === SyntaxKind.TypeQuery) {
|
||||
return false;
|
||||
}
|
||||
// Do not recursively call isTypeNode on the parent. In the example:
|
||||
//
|
||||
// var a: A.B.C;
|
||||
//
|
||||
// Calling isTypeNode would consider the qualified name A.B a type node. Only C or
|
||||
// A.B.C is a type node.
|
||||
if (parent.kind >= SyntaxKind.FirstTypeNode && parent.kind <= SyntaxKind.LastTypeNode) {
|
||||
return true;
|
||||
}
|
||||
switch (parent.kind) {
|
||||
case SyntaxKind.TypeParameter:
|
||||
return node === (<TypeParameterDeclaration>parent).constraint;
|
||||
case SyntaxKind.Property:
|
||||
case SyntaxKind.Parameter:
|
||||
case SyntaxKind.VariableDeclaration:
|
||||
return node === (<VariableDeclaration>parent).type;
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
case SyntaxKind.FunctionExpression:
|
||||
case SyntaxKind.ArrowFunction:
|
||||
case SyntaxKind.Constructor:
|
||||
case SyntaxKind.Method:
|
||||
case SyntaxKind.GetAccessor:
|
||||
case SyntaxKind.SetAccessor:
|
||||
return node === (<FunctionDeclaration>parent).type;
|
||||
case SyntaxKind.CallSignature:
|
||||
case SyntaxKind.ConstructSignature:
|
||||
case SyntaxKind.IndexSignature:
|
||||
return node === (<SignatureDeclaration>parent).type;
|
||||
case SyntaxKind.TypeAssertion:
|
||||
return node === (<TypeAssertion>parent).type;
|
||||
case SyntaxKind.CallExpression:
|
||||
case SyntaxKind.NewExpression:
|
||||
return (<CallExpression>parent).typeArguments && (<CallExpression>parent).typeArguments.indexOf(node) >= 0;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: this function only works when given a node with valid parent pointers.
|
||||
*
|
||||
* returns true if the given identifier is the name of a type declaration node (class, interface, enum, type parameter, etc)
|
||||
*/
|
||||
export function isTypeDeclarationName(name: Node): boolean {
|
||||
return name.kind == SyntaxKind.Identifier &&
|
||||
isTypeDeclaration(name.parent) &&
|
||||
(<Declaration>name.parent).name === name;
|
||||
}
|
||||
|
||||
|
||||
export function isTypeDeclaration(node: Node): boolean {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.TypeParameter:
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
case SyntaxKind.InterfaceDeclaration:
|
||||
case SyntaxKind.EnumDeclaration:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export function getContainingFunction(node: Node): SignatureDeclaration {
|
||||
while (true) {
|
||||
node = node.parent;
|
||||
|
||||
+35
-33
@@ -643,14 +643,19 @@ module ts {
|
||||
getTypeOfNode(node: Node): Type;
|
||||
getApparentType(type: Type): ApparentType;
|
||||
typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
|
||||
writeType(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string;
|
||||
typeToDisplayParts(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[];
|
||||
symbolToDisplayParts(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): SymbolDisplayPart[];
|
||||
writeSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void;
|
||||
getFullyQualifiedName(symbol: Symbol): string;
|
||||
getAugmentedPropertiesOfApparentType(type: Type): Symbol[];
|
||||
getRootSymbol(symbol: Symbol): Symbol;
|
||||
getContextualType(node: Node): Type;
|
||||
getResolvedSignature(node: CallExpression, candidatesOutArray?: Signature[]): Signature;
|
||||
getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature;
|
||||
writeSignature(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
writeTypeParameter(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
writeTypeParametersOfSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void;
|
||||
isImplementationOfOverload(node: FunctionDeclaration): boolean;
|
||||
|
||||
// Returns the constant value of this enum member, or 'undefined' if the enum member has a
|
||||
// computed value.
|
||||
@@ -660,20 +665,36 @@ module ts {
|
||||
getAliasedSymbol(symbol: Symbol): Symbol;
|
||||
}
|
||||
|
||||
export interface TextWriter {
|
||||
write(s: string): void;
|
||||
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
|
||||
export interface SymbolWriter {
|
||||
writeKind(text: string, kind: SymbolDisplayPartKind): void;
|
||||
writeSymbol(text: string, symbol: Symbol): void;
|
||||
writeLine(): void;
|
||||
increaseIndent(): void;
|
||||
decreaseIndent(): void;
|
||||
getText(): string;
|
||||
clear(): void;
|
||||
|
||||
// Called when the symbol writer encounters a symbol to write. Currently only used by the
|
||||
// declaration emitter to help determine if it should patch up the final declaration file
|
||||
// with import statements it previously saw (but chose not to emit).
|
||||
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
|
||||
}
|
||||
|
||||
export enum TypeFormatFlags {
|
||||
None = 0x00000000,
|
||||
WriteArrayAsGenericType = 0x00000001, // Write Array<T> instead T[]
|
||||
UseTypeOfFunction = 0x00000002, // Write typeof instead of function type literal
|
||||
NoTruncation = 0x00000004, // Don't truncate typeToString result
|
||||
None = 0x00000000,
|
||||
WriteArrayAsGenericType = 0x00000001, // Write Array<T> instead T[]
|
||||
UseTypeOfFunction = 0x00000002, // Write typeof instead of function type literal
|
||||
NoTruncation = 0x00000004, // Don't truncate typeToString result
|
||||
WriteArrowStyleSignature = 0x00000008, // Write arrow style signature
|
||||
WriteOwnNameForAnyLike = 0x00000010, // Write symbol's own name instead of 'any' for any like types (eg. unknown, __resolving__ etc)
|
||||
WriteTypeArgumentsOfSignature = 0x00000020, // Write the type arguments instead of type parameters of the signature
|
||||
}
|
||||
|
||||
export enum SymbolFormatFlags {
|
||||
None = 0x00000000,
|
||||
WriteTypeParametersOrArguments = 0x00000001, // Write symbols's type argument if it is instantiated symbol
|
||||
// eg. class C<T> { p: T } <-- Show p as C<T>.p here
|
||||
// var a: C<number>;
|
||||
// var p = a.p; <--- Here p is property of C<number> so show it as C<number>.p instead of just C.p
|
||||
}
|
||||
|
||||
export enum SymbolAccessibility {
|
||||
@@ -701,8 +722,8 @@ module ts {
|
||||
hasSemanticErrors(): boolean;
|
||||
isDeclarationVisible(node: Declaration): boolean;
|
||||
isImplementationOfOverload(node: FunctionDeclaration): boolean;
|
||||
writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: TextWriter): void;
|
||||
writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: TextWriter): void;
|
||||
writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
|
||||
writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isImportDeclarationEntityNameReferenceDeclarationVisibile(entityName: EntityName): SymbolAccessiblityResult;
|
||||
|
||||
@@ -743,6 +764,8 @@ module ts {
|
||||
Transient = 0x02000000, // Transient symbol (created during type check)
|
||||
Prototype = 0x04000000, // Symbol for the prototype property (without source code representation)
|
||||
|
||||
Undefined = 0x08000000, // Symbol for the undefined
|
||||
|
||||
Value = Variable | Property | EnumMember | Function | Class | Enum | ValueModule | Method | GetAccessor | SetAccessor,
|
||||
Type = Class | Interface | Enum | TypeLiteral | ObjectLiteral | TypeParameter,
|
||||
Namespace = ValueModule | NamespaceModule,
|
||||
@@ -1190,24 +1213,6 @@ module ts {
|
||||
verticalTab = 0x0B, // \v
|
||||
}
|
||||
|
||||
export class SymbolDisplayPart {
|
||||
constructor(public text: string,
|
||||
public kind: SymbolDisplayPartKind,
|
||||
public symbol: Symbol) {
|
||||
}
|
||||
|
||||
public toJSON() {
|
||||
return {
|
||||
text: this.text,
|
||||
kind: SymbolDisplayPartKind[this.kind]
|
||||
};
|
||||
}
|
||||
|
||||
public static toString(parts: SymbolDisplayPart[]) {
|
||||
return parts.map(p => p.text).join("");
|
||||
}
|
||||
}
|
||||
|
||||
export enum SymbolDisplayPartKind {
|
||||
aliasName,
|
||||
className,
|
||||
@@ -1215,20 +1220,17 @@ module ts {
|
||||
fieldName,
|
||||
interfaceName,
|
||||
keyword,
|
||||
labelName,
|
||||
lineBreak,
|
||||
numericLiteral,
|
||||
stringLiteral,
|
||||
localName,
|
||||
methodName,
|
||||
moduleName,
|
||||
namespaceName,
|
||||
operator,
|
||||
parameterName,
|
||||
propertyName,
|
||||
punctuation,
|
||||
space,
|
||||
anonymousTypeIndicator,
|
||||
text,
|
||||
typeParameterName,
|
||||
enumMemberName,
|
||||
|
||||
+47
-65
@@ -189,6 +189,9 @@ module FourSlash {
|
||||
}
|
||||
|
||||
export var currentTestState: TestState = null;
|
||||
function assertionMessage(msg: string) {
|
||||
return "\nMarker: " + currentTestState.lastKnownMarker + "\nChecking: " + msg + "\n\n";
|
||||
}
|
||||
|
||||
export class TestCancellationToken implements ts.CancellationToken {
|
||||
// 0 - cancelled
|
||||
@@ -527,17 +530,17 @@ module FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyMemberListContains(symbol: string, type?: string, docComment?: string, fullSymbolName?: string, kind?: string) {
|
||||
public verifyMemberListContains(symbol: string, text?: string, documentation?: string, kind?: string) {
|
||||
this.scenarioActions.push('<ShowCompletionList />');
|
||||
this.scenarioActions.push('<VerifyCompletionContainsItem ItemName="' + symbol + '"/>');
|
||||
|
||||
if (type || docComment || fullSymbolName || kind) {
|
||||
if (text || documentation || kind) {
|
||||
this.taoInvalidReason = 'verifyMemberListContains only supports the "symbol" parameter';
|
||||
}
|
||||
|
||||
var members = this.getMemberListAtCaret();
|
||||
if (members) {
|
||||
this.assertItemInCompletionList(members.entries, symbol, type, docComment, fullSymbolName, kind);
|
||||
this.assertItemInCompletionList(members.entries, symbol, text, documentation, kind);
|
||||
}
|
||||
else {
|
||||
this.raiseError("Expected a member list, but none was provided");
|
||||
@@ -636,9 +639,9 @@ module FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyCompletionListContains(symbol: string, type?: string, docComment?: string, fullSymbolName?: string, kind?: string) {
|
||||
public verifyCompletionListContains(symbol: string, text?: string, documentation?: string, kind?: string) {
|
||||
var completions = this.getCompletionListAtCaret();
|
||||
this.assertItemInCompletionList(completions.entries, symbol, type, docComment, fullSymbolName, kind);
|
||||
this.assertItemInCompletionList(completions.entries, symbol, text, documentation, kind);
|
||||
}
|
||||
|
||||
public verifyCompletionListDoesNotContain(symbol: string) {
|
||||
@@ -651,23 +654,19 @@ module FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyCompletionEntryDetails(entryName: string, type: string, docComment?: string, fullSymbolName?: string, kind?: string) {
|
||||
public verifyCompletionEntryDetails(entryName: string, expectedText: string, expectedDocumentation?: string, kind?: string) {
|
||||
this.taoInvalidReason = 'verifyCompletionEntryDetails NYI';
|
||||
|
||||
var details = this.getCompletionEntryDetails(entryName);
|
||||
|
||||
assert.equal(details.type, type);
|
||||
assert.equal(ts.displayPartsToString(details.displayParts), expectedText, assertionMessage("completion entry details text"));
|
||||
|
||||
if (docComment != undefined) {
|
||||
assert.equal(details.docComment, docComment);
|
||||
}
|
||||
|
||||
if (fullSymbolName !== undefined) {
|
||||
assert.equal(details.fullSymbolName, fullSymbolName);
|
||||
if (expectedDocumentation !== undefined) {
|
||||
assert.equal(ts.displayPartsToString(details.documentation), expectedDocumentation, assertionMessage("completion entry documentation"));
|
||||
}
|
||||
|
||||
if (kind !== undefined) {
|
||||
assert.equal(details.kind, kind);
|
||||
assert.equal(details.kind, kind, assertionMessage("completion entry kind"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -766,45 +765,31 @@ module FourSlash {
|
||||
return "\nActual " + name + ":\n\t" + actualValue + "\nExpected value:\n\t" + expectedValue;
|
||||
}
|
||||
|
||||
public verifyQuickInfo(negative: boolean, expectedTypeName?: string, docComment?: string, symbolName?: string, kind?: string) {
|
||||
[expectedTypeName, docComment, symbolName, kind].forEach(str => {
|
||||
public verifyQuickInfo(negative: boolean, expectedText?: string, expectedDocumentation?: string) {
|
||||
[expectedText, expectedDocumentation].forEach(str => {
|
||||
if (str) {
|
||||
this.scenarioActions.push('<ShowQuickInfo />');
|
||||
this.scenarioActions.push('<VerifyQuickInfoTextContains IgnoreSpacing="true" Text="' + escapeXmlAttributeValue(str) + '" ' + (negative ? 'ExpectsFailure="true"' : '') + ' />');
|
||||
}
|
||||
});
|
||||
|
||||
var actualQuickInfo = this.languageService.getTypeAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
var actualQuickInfoMemberName = actualQuickInfo ? actualQuickInfo.memberName.toString() : "";
|
||||
var actualQuickInfoDocComment = actualQuickInfo ? actualQuickInfo.docComment : "";
|
||||
var actualQuickInfoSymbolName = actualQuickInfo ? actualQuickInfo.fullSymbolName : "";
|
||||
var actualQuickInfoKind = actualQuickInfo ? actualQuickInfo.kind : "";
|
||||
var actualQuickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
var actualQuickInfoText = actualQuickInfo ? ts.displayPartsToString(actualQuickInfo.displayParts) : "";
|
||||
var actualQuickInfoDocumentation = actualQuickInfo ? ts.displayPartsToString(actualQuickInfo.documentation) : "";
|
||||
|
||||
if (negative) {
|
||||
if (expectedTypeName !== undefined) {
|
||||
assert.notEqual(actualQuickInfoMemberName, expectedTypeName, this.messageAtLastKnownMarker("quick info member name"));
|
||||
if (expectedText !== undefined) {
|
||||
assert.notEqual(actualQuickInfoText, expectedText, this.messageAtLastKnownMarker("quick info text"));
|
||||
}
|
||||
if (docComment != undefined) {
|
||||
assert.notEqual(actualQuickInfoDocComment, docComment, this.messageAtLastKnownMarker("quick info doc comment"));
|
||||
}
|
||||
if (symbolName !== undefined) {
|
||||
assert.notEqual(actualQuickInfoSymbolName, symbolName, this.messageAtLastKnownMarker("quick info symbol name"));
|
||||
}
|
||||
if (kind !== undefined) {
|
||||
assert.notEqual(actualQuickInfoKind, kind, this.messageAtLastKnownMarker("quick info kind"));
|
||||
if (expectedDocumentation != undefined) {
|
||||
assert.notEqual(actualQuickInfoDocumentation, expectedDocumentation, this.messageAtLastKnownMarker("quick info doc comment"));
|
||||
}
|
||||
} else {
|
||||
if (expectedTypeName !== undefined) {
|
||||
assert.equal(actualQuickInfoMemberName, expectedTypeName, this.messageAtLastKnownMarker("quick info member"));
|
||||
if (expectedText !== undefined) {
|
||||
assert.equal(actualQuickInfoText, expectedText, this.messageAtLastKnownMarker("quick info text"));
|
||||
}
|
||||
if (docComment != undefined) {
|
||||
assert.equal(actualQuickInfoDocComment, docComment, this.messageAtLastKnownMarker("quick info doc"));
|
||||
}
|
||||
if (symbolName !== undefined) {
|
||||
assert.equal(actualQuickInfoSymbolName, symbolName, this.messageAtLastKnownMarker("quick info symbol name"));
|
||||
}
|
||||
if (kind !== undefined) {
|
||||
assert.equal(actualQuickInfoKind, kind, this.messageAtLastKnownMarker("quick info kind"));
|
||||
if (expectedDocumentation != undefined) {
|
||||
assert.equal(actualQuickInfoDocumentation, expectedDocumentation, assertionMessage("quick info doc"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -844,7 +829,7 @@ module FourSlash {
|
||||
public verifyQuickInfoExists(negative: boolean) {
|
||||
this.taoInvalidReason = 'verifyQuickInfoExists NYI';
|
||||
|
||||
var actualQuickInfo = this.languageService.getTypeAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
var actualQuickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
if (negative) {
|
||||
if (actualQuickInfo) {
|
||||
this.raiseError('verifyQuickInfoExists failed. Expected quick info NOT to exist');
|
||||
@@ -862,9 +847,9 @@ module FourSlash {
|
||||
|
||||
var help = this.getActiveSignatureHelpItem();
|
||||
assert.equal(
|
||||
ts.SymbolDisplayPart.toString(help.prefixDisplayParts) +
|
||||
help.parameters.map(p => ts.SymbolDisplayPart.toString(p.displayParts)).join(ts.SymbolDisplayPart.toString(help.separatorDisplayParts)) +
|
||||
ts.SymbolDisplayPart.toString(help.suffixDisplayParts), expected);
|
||||
ts.displayPartsToString(help.prefixDisplayParts) +
|
||||
help.parameters.map(p => ts.displayPartsToString(p.displayParts)).join(ts.displayPartsToString(help.separatorDisplayParts)) +
|
||||
ts.displayPartsToString(help.suffixDisplayParts), expected);
|
||||
}
|
||||
|
||||
public verifyCurrentParameterIsVariable(isVariable: boolean) {
|
||||
@@ -888,7 +873,7 @@ module FourSlash {
|
||||
|
||||
var activeSignature = this.getActiveSignatureHelpItem();
|
||||
var activeParameter = this.getActiveParameter();
|
||||
assert.equal(ts.SymbolDisplayPart.toString(activeParameter.displayParts), parameter);
|
||||
assert.equal(ts.displayPartsToString(activeParameter.displayParts), parameter);
|
||||
}
|
||||
|
||||
public verifyCurrentParameterHelpDocComment(docComment: string) {
|
||||
@@ -896,7 +881,7 @@ module FourSlash {
|
||||
|
||||
var activeParameter = this.getActiveParameter();
|
||||
var activeParameterDocComment = activeParameter.documentation;
|
||||
assert.equal(activeParameterDocComment, docComment);
|
||||
assert.equal(ts.displayPartsToString(activeParameterDocComment), docComment, assertionMessage("current parameter Help DocComment"));
|
||||
}
|
||||
|
||||
public verifyCurrentSignatureHelpParameterCount(expectedCount: number) {
|
||||
@@ -915,7 +900,7 @@ module FourSlash {
|
||||
this.taoInvalidReason = 'verifyCurrentSignatureHelpDocComment NYI';
|
||||
|
||||
var actualDocComment = this.getActiveSignatureHelpItem().documentation;
|
||||
assert.equal(actualDocComment, docComment);
|
||||
assert.equal(ts.displayPartsToString(actualDocComment), docComment, assertionMessage("current signature help doc comment"));
|
||||
}
|
||||
|
||||
public verifySignatureHelpCount(expected: number) {
|
||||
@@ -1084,7 +1069,7 @@ module FourSlash {
|
||||
}
|
||||
|
||||
public printCurrentQuickInfo() {
|
||||
var quickInfo = this.languageService.getTypeAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
var quickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
Harness.IO.log(JSON.stringify(quickInfo));
|
||||
}
|
||||
|
||||
@@ -1755,7 +1740,7 @@ module FourSlash {
|
||||
}
|
||||
|
||||
for (i = 0; i < positions.length; i++) {
|
||||
var nameOf = (type: ts.TypeInfo) => type ? type.fullSymbolName : '(none)';
|
||||
var nameOf = (type: ts.QuickInfo) => type ? ts.displayPartsToString(type.displayParts) : '(none)';
|
||||
|
||||
var pullName: string, refName: string;
|
||||
var anyFailed = false;
|
||||
@@ -1763,7 +1748,7 @@ module FourSlash {
|
||||
var errMsg = '';
|
||||
|
||||
try {
|
||||
var pullType = this.languageService.getTypeAtPosition(this.activeFile.fileName, positions[i]);
|
||||
var pullType = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, positions[i]);
|
||||
pullName = nameOf(pullType);
|
||||
} catch (err1) {
|
||||
errMsg = 'Failed to get pull type check. Exception: ' + err1 + '\r\n';
|
||||
@@ -1773,7 +1758,7 @@ module FourSlash {
|
||||
}
|
||||
|
||||
try {
|
||||
var referenceType = referenceLanguageService.getTypeAtPosition(this.activeFile.fileName, positions[i]);
|
||||
var referenceType = referenceLanguageService.getQuickInfoAtPosition(this.activeFile.fileName, positions[i]);
|
||||
refName = nameOf(referenceType);
|
||||
} catch (err2) {
|
||||
errMsg = 'Failed to get full type check. Exception: ' + err2 + '\r\n';
|
||||
@@ -2025,33 +2010,30 @@ module FourSlash {
|
||||
return result;
|
||||
}
|
||||
|
||||
private assertItemInCompletionList(items: ts.CompletionEntry[], name: string, type?: string, docComment?: string, fullSymbolName?: string, kind?: string) {
|
||||
private assertItemInCompletionList(items: ts.CompletionEntry[], name: string, text?: string, documentation?: string, kind?: string) {
|
||||
this.scenarioActions.push('<ShowCompletionList />');
|
||||
this.scenarioActions.push('<VerifyCompletionContainsItem ItemName="' + name + '"/>');
|
||||
|
||||
if (type || docComment || fullSymbolName || kind) {
|
||||
if (text || documentation || kind) {
|
||||
this.taoInvalidReason = 'assertItemInCompletionList only supports the "name" parameter';
|
||||
}
|
||||
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
var item = items[i];
|
||||
if (item.name == name) {
|
||||
if (docComment != undefined || type !== undefined || fullSymbolName !== undefined) {
|
||||
if (item.name === name) {
|
||||
if (documentation != undefined || text !== undefined) {
|
||||
var details = this.getCompletionEntryDetails(item.name);
|
||||
|
||||
if (docComment != undefined) {
|
||||
assert.equal(details.docComment, docComment);
|
||||
if (documentation !== undefined) {
|
||||
assert.equal(ts.displayPartsToString(details.documentation), documentation, assertionMessage("completion item documentation"));
|
||||
}
|
||||
if (type !== undefined) {
|
||||
assert.equal(details.type, type);
|
||||
}
|
||||
if (fullSymbolName !== undefined) {
|
||||
assert.equal(details.fullSymbolName, fullSymbolName);
|
||||
if (text !== undefined) {
|
||||
assert.equal(ts.displayPartsToString(details.displayParts), text, assertionMessage("completion item detail text"));
|
||||
}
|
||||
}
|
||||
|
||||
if (kind !== undefined) {
|
||||
assert.equal(item.kind, kind);
|
||||
assert.equal(item.kind, kind, assertionMessage("completion item kind"));
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -2060,7 +2042,7 @@ module FourSlash {
|
||||
|
||||
var itemsString = items.map((item) => JSON.stringify({ name: item.name, kind: item.kind })).join(",\n");
|
||||
|
||||
this.raiseError('Expected "' + JSON.stringify({ name: name, type: type, docComment: docComment, fullSymbolName: fullSymbolName, kind: kind }) + '" to be in list [' + itemsString + ']');
|
||||
this.raiseError('Expected "' + JSON.stringify({ name: name, text: text, documentation: documentation, kind: kind }) + '" to be in list [' + itemsString + ']');
|
||||
}
|
||||
|
||||
private findFile(indexOrName: any) {
|
||||
|
||||
@@ -86,7 +86,7 @@ class TypeWriterWalker {
|
||||
column: lineAndCharacter.character,
|
||||
syntaxKind: ts.SyntaxKind[node.kind],
|
||||
sourceText: sourceText,
|
||||
type: this.checker.typeToString(type, node.parent, ts.TypeFormatFlags.NoTruncation)
|
||||
type: this.checker.typeToString(type, node.parent, ts.TypeFormatFlags.NoTruncation | ts.TypeFormatFlags.WriteOwnNameForAnyLike)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
/////<reference path='base64.ts' />
|
||||
/////<reference path='sourceMapping.ts' />
|
||||
/////<reference path='emitter.ts' />
|
||||
/////<reference path='types.ts' />
|
||||
/////<reference path='pathUtils.ts' />
|
||||
/////<reference path='referenceResolution.ts' />
|
||||
/////<reference path='precompile.ts' />
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
///<reference path='references.ts' />
|
||||
|
||||
module TypeScript {
|
||||
export class MemberName {
|
||||
public prefix: string = "";
|
||||
public suffix: string = "";
|
||||
|
||||
public isString() { return false; }
|
||||
public isArray() { return false; }
|
||||
public isMarker() { return !this.isString() && !this.isArray(); }
|
||||
|
||||
public toString(): string {
|
||||
return MemberName.memberNameToString(this);
|
||||
}
|
||||
|
||||
static memberNameToString(memberName: MemberName, markerInfo?: number[], markerBaseLength: number = 0): string {
|
||||
var result = memberName.prefix;
|
||||
|
||||
if (memberName.isString()) {
|
||||
result += (<MemberNameString>memberName).text;
|
||||
}
|
||||
else if (memberName.isArray()) {
|
||||
var ar = <MemberNameArray>memberName;
|
||||
for (var index = 0; index < ar.entries.length; index++) {
|
||||
if (ar.entries[index].isMarker()) {
|
||||
if (markerInfo) {
|
||||
markerInfo.push(markerBaseLength + result.length);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
result += MemberName.memberNameToString(ar.entries[index], markerInfo, markerBaseLength + result.length);
|
||||
result += ar.delim;
|
||||
}
|
||||
}
|
||||
|
||||
result += memberName.suffix;
|
||||
return result;
|
||||
}
|
||||
|
||||
static create(text: string): MemberName;
|
||||
static create(entry: MemberName, prefix: string, suffix: string): MemberName;
|
||||
static create(arg1: any, arg2?: any, arg3?: any): MemberName {
|
||||
if (typeof arg1 === "string") {
|
||||
return new MemberNameString(arg1);
|
||||
}
|
||||
else {
|
||||
var result = new MemberNameArray();
|
||||
if (arg2)
|
||||
result.prefix = arg2;
|
||||
if (arg3)
|
||||
result.suffix = arg3;
|
||||
result.entries.push(arg1);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class MemberNameString extends MemberName {
|
||||
constructor(public text: string) {
|
||||
super();
|
||||
}
|
||||
|
||||
public isString() { return true; }
|
||||
}
|
||||
|
||||
export class MemberNameArray extends MemberName {
|
||||
public delim: string = "";
|
||||
public entries: MemberName[] = [];
|
||||
|
||||
public isArray() { return true; }
|
||||
|
||||
public add(entry: MemberName) {
|
||||
this.entries.push(entry);
|
||||
}
|
||||
|
||||
public addAll(entries: MemberName[]) {
|
||||
for (var i = 0 ; i < entries.length; i++) {
|
||||
this.entries.push(entries[i]);
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
+957
-420
File diff suppressed because it is too large
Load Diff
@@ -85,9 +85,6 @@ module ts {
|
||||
|
||||
getQuickInfoAtPosition(fileName: string, position: number): string;
|
||||
|
||||
// Obsolete. Use getQuickInfoAtPosition instead.
|
||||
getTypeAtPosition(fileName: string, position: number): string;
|
||||
|
||||
getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): string;
|
||||
getBreakpointStatementAtPosition(fileName: string, position: number): string;
|
||||
|
||||
@@ -579,15 +576,6 @@ module ts {
|
||||
}
|
||||
|
||||
|
||||
public getTypeAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getTypeAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
var typeInfo = this.languageService.getTypeAtPosition(fileName, position);
|
||||
return typeInfo;
|
||||
});
|
||||
}
|
||||
|
||||
/// NAMEORDOTTEDNAMESPAN
|
||||
|
||||
/**
|
||||
|
||||
@@ -306,12 +306,12 @@ module ts.SignatureHelp {
|
||||
displayParts.push(punctuationPart(SyntaxKind.ColonToken));
|
||||
displayParts.push(spacePart());
|
||||
|
||||
var typeParts = typeInfoResolver.typeToDisplayParts(typeInfoResolver.getTypeOfSymbol(p), argumentListOrTypeArgumentList);
|
||||
var typeParts = typeToDisplayParts(typeInfoResolver, typeInfoResolver.getTypeOfSymbol(p), argumentListOrTypeArgumentList);
|
||||
displayParts.push.apply(displayParts, typeParts);
|
||||
|
||||
return {
|
||||
name: p.name,
|
||||
documentation: getSymbolDocumentationDisplayParts(p),
|
||||
documentation: p.getDocumentationComment(),
|
||||
displayParts: displayParts,
|
||||
isOptional: isOptional
|
||||
};
|
||||
@@ -320,7 +320,7 @@ module ts.SignatureHelp {
|
||||
var callTargetNode = (<CallExpression>argumentListOrTypeArgumentList.parent).func;
|
||||
var callTargetSymbol = typeInfoResolver.getSymbolInfo(callTargetNode);
|
||||
|
||||
var prefixParts = callTargetSymbol ? typeInfoResolver.symbolToDisplayParts(callTargetSymbol, /*enclosingDeclaration*/ undefined, /*meaning*/ undefined) : [];
|
||||
var prefixParts = callTargetSymbol ? symbolToDisplayParts(typeInfoResolver, callTargetSymbol, /*enclosingDeclaration*/ undefined, /*meaning*/ undefined) : [];
|
||||
|
||||
var separatorParts = [punctuationPart(SyntaxKind.CommaToken), spacePart()];
|
||||
|
||||
@@ -346,7 +346,7 @@ module ts.SignatureHelp {
|
||||
suffixParts.push(punctuationPart(SyntaxKind.ColonToken));
|
||||
suffixParts.push(spacePart());
|
||||
|
||||
var typeParts = typeInfoResolver.typeToDisplayParts(candidateSignature.getReturnType(), argumentListOrTypeArgumentList);
|
||||
var typeParts = typeToDisplayParts(typeInfoResolver, candidateSignature.getReturnType(), argumentListOrTypeArgumentList);
|
||||
suffixParts.push.apply(suffixParts, typeParts);
|
||||
|
||||
return {
|
||||
@@ -355,7 +355,7 @@ module ts.SignatureHelp {
|
||||
suffixDisplayParts: suffixParts,
|
||||
separatorDisplayParts: separatorParts,
|
||||
parameters: parameterHelpItems,
|
||||
documentation: <SymbolDisplayPart[]>null
|
||||
documentation: candidateSignature.getDocumentationComment()
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ tests/cases/compiler/constructorOverloads1.ts(3,5): error TS2392: Multiple const
|
||||
tests/cases/compiler/constructorOverloads1.ts(4,5): error TS2392: Multiple constructor implementations are not allowed.
|
||||
tests/cases/compiler/constructorOverloads1.ts(7,5): error TS2392: Multiple constructor implementations are not allowed.
|
||||
tests/cases/compiler/constructorOverloads1.ts(16,18): error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'number'.
|
||||
tests/cases/compiler/constructorOverloads1.ts(17,18): error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'number'.
|
||||
tests/cases/compiler/constructorOverloads1.ts(17,18): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constructorOverloads1.ts (6 errors) ====
|
||||
@@ -39,7 +39,7 @@ tests/cases/compiler/constructorOverloads1.ts(17,18): error TS2345: Argument of
|
||||
!!! error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'number'.
|
||||
var f4 = new Foo([f1,f2,f3]);
|
||||
~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'number'.
|
||||
!!! error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'number'.
|
||||
|
||||
f1.bar1();
|
||||
f1.bar2();
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
tests/cases/compiler/contextuallyTypingRestParameters.ts(3,9): error TS2323: Type 'string[]' is not assignable to type 'string'.
|
||||
tests/cases/compiler/contextuallyTypingRestParameters.ts(5,9): error TS2323: Type 'string[]' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextuallyTypingRestParameters.ts (2 errors) ====
|
||||
var x: (...y: string[]) => void = function (.../*3*/y) {
|
||||
var t = y;
|
||||
var x2: string = t; // This should be error
|
||||
~~
|
||||
!!! error TS2323: Type 'string[]' is not assignable to type 'string'.
|
||||
var x3: string[] = t; // No error
|
||||
var y2: string = y; // This should be error
|
||||
~~
|
||||
!!! error TS2323: Type 'string[]' is not assignable to type 'string'.
|
||||
var y3: string[] = y; // No error
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
//// [contextuallyTypingRestParameters.ts]
|
||||
var x: (...y: string[]) => void = function (.../*3*/y) {
|
||||
var t = y;
|
||||
var x2: string = t; // This should be error
|
||||
var x3: string[] = t; // No error
|
||||
var y2: string = y; // This should be error
|
||||
var y3: string[] = y; // No error
|
||||
};
|
||||
|
||||
//// [contextuallyTypingRestParameters.js]
|
||||
var x = function () {
|
||||
var y = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
y[_i - 0] = arguments[_i];
|
||||
}
|
||||
var t = y;
|
||||
var x2 = t; // This should be error
|
||||
var x3 = t; // No error
|
||||
var y2 = y; // This should be error
|
||||
var y3 = y; // No error
|
||||
};
|
||||
@@ -2,14 +2,14 @@ tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,5): error TS1098: Typ
|
||||
tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,6): error TS1005: '(' expected.
|
||||
tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,6): error TS1139: Type parameter declaration expected.
|
||||
tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(4,1): error TS1109: Expression expected.
|
||||
tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(1,5): error TS2322: Type 'number' is not assignable to type '{ <>(): any; x: number; }':
|
||||
tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(1,5): error TS2322: Type 'number' is not assignable to type '{ (): any; x: number; }':
|
||||
Property 'x' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/dontShowCompilerGeneratedMembers.ts (5 errors) ====
|
||||
var f: {
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ <>(): any; x: number; }':
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (): any; x: number; }':
|
||||
!!! error TS2322: Property 'x' is missing in type 'Number'.
|
||||
x: number;
|
||||
<-
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/genericConstraint2.ts(5,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/genericConstraint2.ts(11,7): error TS2421: Class 'ComparableString' incorrectly implements interface 'Comparable<string>':
|
||||
Property 'comparer' is missing in type 'ComparableString'.
|
||||
tests/cases/compiler/genericConstraint2.ts(21,17): error TS2343: Type 'ComparableString' does not satisfy the constraint 'Comparable<unknown>':
|
||||
tests/cases/compiler/genericConstraint2.ts(21,17): error TS2343: Type 'ComparableString' does not satisfy the constraint 'Comparable<any>':
|
||||
Property 'comparer' is missing in type 'ComparableString'.
|
||||
|
||||
|
||||
@@ -33,5 +33,5 @@ tests/cases/compiler/genericConstraint2.ts(21,17): error TS2343: Type 'Comparabl
|
||||
var b = new ComparableString("b");
|
||||
var c = compare<ComparableString>(a, b);
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2343: Type 'ComparableString' does not satisfy the constraint 'Comparable<unknown>':
|
||||
!!! error TS2343: Type 'ComparableString' does not satisfy the constraint 'Comparable<any>':
|
||||
!!! error TS2343: Property 'comparer' is missing in type 'ComparableString'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/lambdaArgCrash.ts(27,25): error TS2304: Cannot find name 'ItemSet'.
|
||||
tests/cases/compiler/lambdaArgCrash.ts(29,14): error TS2345: Argument of type '(items: unknown) => void' is not assignable to parameter of type '() => any'.
|
||||
tests/cases/compiler/lambdaArgCrash.ts(29,14): error TS2345: Argument of type '(items: any) => void' is not assignable to parameter of type '() => any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/lambdaArgCrash.ts (2 errors) ====
|
||||
@@ -35,7 +35,7 @@ tests/cases/compiler/lambdaArgCrash.ts(29,14): error TS2345: Argument of type '(
|
||||
|
||||
super.add(listener);
|
||||
~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(items: unknown) => void' is not assignable to parameter of type '() => any'.
|
||||
!!! error TS2345: Argument of type '(items: any) => void' is not assignable to parameter of type '() => any'.
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/maxConstraints.ts(5,6): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
||||
tests/cases/compiler/maxConstraints.ts(8,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable<unknown>'.
|
||||
tests/cases/compiler/maxConstraints.ts(8,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable<any>'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/maxConstraints.ts (2 errors) ====
|
||||
@@ -14,4 +14,4 @@ tests/cases/compiler/maxConstraints.ts(8,22): error TS2345: Argument of type 'nu
|
||||
var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y };
|
||||
var maxResult = max2(1, 2);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable<unknown>'.
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable<any>'.
|
||||
@@ -6,8 +6,8 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(18,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(21,5): error TS2412: Property '3.0' of type 'MyNumber' is not assignable to numeric index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(50,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(68,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: number]: {}; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: unknown; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }':
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(68,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: number]: {}; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: any; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }':
|
||||
Index signatures are incompatible:
|
||||
Type '{}' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(88,9): error TS2304: Cannot find name 'Myn'.
|
||||
@@ -107,7 +107,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo
|
||||
// error
|
||||
var b: { [x: number]: string; } = {
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: {}; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: unknown; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }':
|
||||
!!! error TS2322: Type '{ [x: number]: {}; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: any; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'string'.
|
||||
a: '',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/overloadsWithProvisionalErrors.ts(6,6): error TS2345: Argument of type '(s: string) => {}' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'.
|
||||
tests/cases/compiler/overloadsWithProvisionalErrors.ts(7,17): error TS2304: Cannot find name 'blah'.
|
||||
tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,6): error TS2345: Argument of type '(s: string) => { a: unknown; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'.
|
||||
tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,6): error TS2345: Argument of type '(s: string) => { a: any; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'.
|
||||
tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,17): error TS2304: Cannot find name 'blah'.
|
||||
|
||||
|
||||
@@ -18,6 +18,6 @@ tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,17): error TS2304: Cann
|
||||
!!! error TS2304: Cannot find name 'blah'.
|
||||
func(s => ({ a: blah })); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(s: string) => { a: unknown; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'.
|
||||
!!! error TS2345: Argument of type '(s: string) => { a: any; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'blah'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/undeclaredModuleError.ts(1,21): error TS2307: Cannot find external module 'fs'.
|
||||
tests/cases/compiler/undeclaredModuleError.ts(8,29): error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: unknown, name: string) => boolean'.
|
||||
tests/cases/compiler/undeclaredModuleError.ts(8,29): error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: any, name: string) => boolean'.
|
||||
tests/cases/compiler/undeclaredModuleError.ts(11,41): error TS2304: Cannot find name 'IDoNotExist'.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ tests/cases/compiler/undeclaredModuleError.ts(11,41): error TS2304: Cannot find
|
||||
~~~~~~~
|
||||
} , (error: Error, files: {}[]) => {
|
||||
~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: unknown, name: string) => boolean'.
|
||||
!!! error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: any, name: string) => boolean'.
|
||||
files.forEach((file) => {
|
||||
var fullPath = join(IDoNotExist);
|
||||
~~~~~~~~~~~
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
var x: (...y: string[]) => void = function (.../*3*/y) {
|
||||
var t = y;
|
||||
var x2: string = t; // This should be error
|
||||
var x3: string[] = t; // No error
|
||||
var y2: string = y; // This should be error
|
||||
var y3: string[] = y; // No error
|
||||
};
|
||||
@@ -11,11 +11,11 @@
|
||||
//// }
|
||||
|
||||
goTo.marker('className');
|
||||
verify.quickInfoSymbolNameIs('Sphere');
|
||||
verify.quickInfoIs('class Sphere');
|
||||
|
||||
goTo.marker('insertHere');
|
||||
edit.insert("ray: Ray;");
|
||||
|
||||
goTo.marker('className');
|
||||
|
||||
verify.quickInfoSymbolNameIs('Sphere');
|
||||
verify.quickInfoIs('class Sphere');
|
||||
@@ -12,10 +12,10 @@ edit.disableFormatting();
|
||||
diagnostics.setEditValidation(IncrementalEditValidation.SyntacticOnly);
|
||||
|
||||
goTo.marker('check');
|
||||
verify.quickInfoSymbolNameIs('Mod');
|
||||
verify.quickInfoIs('module Mod');
|
||||
|
||||
goTo.marker('insert');
|
||||
edit.insert("x: number;\n");
|
||||
|
||||
goTo.marker('check');
|
||||
verify.quickInfoSymbolNameIs('Mod');
|
||||
verify.quickInfoIs('module Mod');
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
////module A {
|
||||
//// /*var*/
|
||||
////}
|
||||
////module A/*check*/ {
|
||||
////module /*check*/A {
|
||||
//// var p;
|
||||
////}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
goTo.marker();
|
||||
var text = "this.children = ch";
|
||||
edit.insert(text);
|
||||
verify.completionListContains("children", "string[]");
|
||||
verify.completionListContains("children", "(parameter) children: string[]");
|
||||
@@ -13,31 +13,31 @@
|
||||
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('any[]');
|
||||
verify.quickInfoIs('(var) a1: any[]');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('any[]');
|
||||
verify.quickInfoIs('(var) a2: any[]');
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('boolean[]');
|
||||
verify.quickInfoIs('(var) a3: boolean[]');
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs('boolean[]');
|
||||
verify.quickInfoIs('(var) a4: boolean[]');
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs('string[]');
|
||||
verify.quickInfoIs('(var) a5: string[]');
|
||||
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs('any[]');
|
||||
verify.quickInfoIs('(var) a6: any[]');
|
||||
|
||||
goTo.marker('7');
|
||||
verify.quickInfoIs('any[]');
|
||||
verify.quickInfoIs('(var) a7: any[]');
|
||||
|
||||
goTo.marker('8');
|
||||
verify.quickInfoIs('boolean[]');
|
||||
verify.quickInfoIs('(var) a8: boolean[]');
|
||||
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs('boolean[]');
|
||||
verify.quickInfoIs('(var) a9: boolean[]');
|
||||
|
||||
goTo.marker('10');
|
||||
verify.quickInfoIs('string[]');
|
||||
verify.quickInfoIs('(var) a10: string[]');
|
||||
@@ -6,4 +6,4 @@
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs('any');
|
||||
verify.quickInfoIs('(parameter) bb: any');
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
////r./*2*/
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains('prototype', 'c5b');
|
||||
verify.completionListContains('prototype', '(property) c5b.prototype: c5b');
|
||||
edit.insert('y;');
|
||||
goTo.marker('2');
|
||||
verify.completionListContains('foo', '(): void');
|
||||
verify.completionListContains('foo', '(method) c5b.foo(): void');
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
////r./*2*/
|
||||
|
||||
goTo.marker('1');
|
||||
verify.not.completionListContains('y', 'number');
|
||||
verify.not.completionListContains('y', '(var) y: number');
|
||||
edit.backspace(4);
|
||||
goTo.marker('2');
|
||||
verify.completionListContains('foo', '(): void');
|
||||
verify.completionListContains('foo', '(method) c5b.foo(): void');
|
||||
@@ -0,0 +1,14 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class c/*1*/5b { public foo() { } }
|
||||
////module c/*2*/5b { export var y = 2; } // should be ok
|
||||
/////*3*/
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("class c5b\nmodule c5b");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("class c5b\nmodule c5b");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.completionListContains("c5b", "class c5b\nmodule c5b");
|
||||
+2
-3
@@ -4,13 +4,12 @@
|
||||
//// export interface I { foo(): void; }
|
||||
////}
|
||||
////var m1c = 1; // Should be allowed
|
||||
|
||||
////var x: m1c./*1*/;
|
||||
////var r/*2*/ = m1c;
|
||||
////var /*2*/r = m1c;
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains('I');
|
||||
verify.not.completionListContains('foo');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('number');
|
||||
verify.quickInfoIs('(var) r: number');
|
||||
@@ -3,20 +3,20 @@
|
||||
////function /*11*/m2f(x: number) { };
|
||||
////module m2f { export interface I { foo(): void } }
|
||||
////var x: m2f./*1*/
|
||||
////var r/*2*/ = m2f/*3*/;
|
||||
////var /*2*/r = m2f/*3*/;
|
||||
|
||||
//goTo.marker('11');
|
||||
//verify.quickInfoIs('(x: number): void');
|
||||
goTo.marker('11');
|
||||
verify.quickInfoIs('(function) m2f(x: number): void\nmodule m2f');
|
||||
|
||||
//goTo.marker('1');
|
||||
//verify.completionListContains('I');
|
||||
goTo.marker('1');
|
||||
verify.completionListContains('I');
|
||||
|
||||
//edit.insert('I.');
|
||||
//verify.not.completionListContains('foo');
|
||||
//edit.backspace(1);
|
||||
edit.insert('I.');
|
||||
verify.not.completionListContains('foo');
|
||||
edit.backspace(1);
|
||||
|
||||
//goTo.marker('2');
|
||||
//verify.quickInfoIs('typeof m2f');
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('(var) r: (x: number) => void');
|
||||
|
||||
goTo.marker('3');
|
||||
edit.insert('(');
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
////function m2g() { };
|
||||
////module m2g { export class C { foo(x: number) { } } }
|
||||
////var x: m2g./*1*/;
|
||||
////var r/*2*/ = m2g/*3*/;
|
||||
////var /*2*/r = m2g/*3*/;
|
||||
|
||||
//goTo.marker('1');
|
||||
//verify.completionListContains('C');
|
||||
goTo.marker('1');
|
||||
verify.completionListContains('C');
|
||||
|
||||
//edit.insert('C.');
|
||||
//verify.not.completionListContains('foo');
|
||||
//edit.backspace(1);
|
||||
edit.insert('C.');
|
||||
verify.not.completionListContains('foo');
|
||||
edit.backspace(1);
|
||||
|
||||
//goTo.marker('2');
|
||||
//verify.quickInfoIs("typeof m2g", undefined, "r", "var");
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("(var) r: typeof m2g");
|
||||
|
||||
goTo.marker('3');
|
||||
edit.insert('(');
|
||||
|
||||
+4
-4
@@ -2,12 +2,12 @@
|
||||
|
||||
////module m3d { export var y = 2; }
|
||||
////declare class m3d { foo(): void }
|
||||
////var r/*1*/ = new m3d();
|
||||
////var /*1*/r = new m3d();
|
||||
////r./*2*/
|
||||
////var r2/*4*/ = m3d./*3*/
|
||||
////var /*4*/r2 = m3d./*3*/
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('m3d');
|
||||
verify.quickInfoIs('(var) r: m3d');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains('foo');
|
||||
@@ -18,4 +18,4 @@ verify.completionListContains('y');
|
||||
edit.insert('y;');
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs('number');
|
||||
verify.quickInfoIs('(var) r2: number');
|
||||
+4
-4
@@ -2,12 +2,12 @@
|
||||
|
||||
////declare class m3e { foo(): void }
|
||||
////module m3e { export var y = 2; }
|
||||
////var r/*1*/ = new m3e();
|
||||
////var /*1*/r = new m3e();
|
||||
////r./*2*/
|
||||
////var r2/*4*/ = m3e./*3*/
|
||||
////var /*4*/r2 = m3e./*3*/
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('m3e');
|
||||
verify.quickInfoIs('(var) r: m3e');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains('foo');
|
||||
@@ -19,4 +19,4 @@ verify.completionListContains('y');
|
||||
edit.insert('y;');
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs('number');
|
||||
verify.quickInfoIs('(var) r2: number');
|
||||
@@ -3,32 +3,33 @@
|
||||
////declare class m3f { foo(x: number): void }
|
||||
////module m3f { export interface I { foo(): void } }
|
||||
////var x: m3f./*1*/
|
||||
////var r/*4*/ = new /*2*/m3f(/*3*/);
|
||||
////var /*4*/r = new /*2*/m3f(/*3*/);
|
||||
////r./*5*/
|
||||
////var r2: m3f.I = r;
|
||||
////r2./*6*/
|
||||
|
||||
//goTo.marker('1');
|
||||
//verify.completionListContains('I');
|
||||
goTo.marker('1');
|
||||
verify.completionListContains('I');
|
||||
|
||||
//verify.not.completionListContains('foo');
|
||||
//edit.insert('I;');
|
||||
// bug #837
|
||||
verify.completionListContains('foo');
|
||||
edit.insert('I;');
|
||||
|
||||
//goTo.marker('2');
|
||||
//verify.completionListContains('m3f');
|
||||
goTo.marker('2');
|
||||
verify.completionListContains('m3f');
|
||||
|
||||
goTo.marker('3');
|
||||
verify.currentSignatureHelpIs('m3f(): m3f');
|
||||
|
||||
//goTo.marker('4');
|
||||
//verify.quickInfoIs('m3f');
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs('(var) r: m3f');
|
||||
|
||||
//goTo.marker('5');
|
||||
//verify.completionListContains('foo');
|
||||
//edit.insert('foo(1)');
|
||||
goTo.marker('5');
|
||||
verify.completionListContains('foo');
|
||||
edit.insert('foo(1)');
|
||||
|
||||
goTo.marker('6');
|
||||
//verify.completionListContains('foo');
|
||||
verify.completionListContains('foo');
|
||||
edit.insert('foo(');
|
||||
// verify.currentSignatureHelpIs('foo(): void');
|
||||
verify.currentSignatureHelpIs('foo(): void');
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class A<T> { }
|
||||
////class B<T> {/*B*/ }
|
||||
////class C<T> { /*C*/constructor(val: T) { } }
|
||||
////class D<T> { constructor(/*D*/val: T) { } }
|
||||
////
|
||||
////new /*Asig*/A<string>();
|
||||
////new /*Bsig*/B("");
|
||||
////new /*Csig*/C("");
|
||||
////new /*Dsig*/D<string>();
|
||||
|
||||
var A = 'A';
|
||||
var B = 'B';
|
||||
var C = 'C';
|
||||
var D = 'D'
|
||||
goTo.marker(B);
|
||||
edit.insert('constructor(val: T) { }');
|
||||
goTo.marker('Asig');
|
||||
verify.quickInfoIs("(constructor) A<string>(): A<string>");
|
||||
|
||||
goTo.marker('Bsig');
|
||||
verify.quickInfoIs("(constructor) B<string>(val: string): B<string>");
|
||||
|
||||
goTo.marker('Csig');
|
||||
verify.quickInfoIs("(constructor) C<string>(val: string): C<string>");
|
||||
|
||||
goTo.marker('Dsig');
|
||||
verify.quickInfoIs("(constructor) D<T>(val: T): D<T>"); // Cannot resolve signature
|
||||
|
||||
goTo.marker(C);
|
||||
edit.deleteAtCaret('constructor(val: T) { }'.length);
|
||||
goTo.marker('Asig');
|
||||
verify.quickInfoIs("(constructor) A<string>(): A<string>");
|
||||
|
||||
goTo.marker('Bsig');
|
||||
verify.quickInfoIs("(constructor) B<string>(val: string): B<string>");
|
||||
|
||||
goTo.marker('Csig');
|
||||
verify.quickInfoIs("(constructor) C<T>(): C<T>"); // Cannot resolve signature
|
||||
|
||||
goTo.marker('Dsig');
|
||||
verify.quickInfoIs("(constructor) D<T>(val: T): D<T>"); // Cannot resolve signature
|
||||
|
||||
goTo.marker(D);
|
||||
edit.deleteAtCaret("val: T".length);
|
||||
goTo.marker('Asig');
|
||||
verify.quickInfoIs("(constructor) A<string>(): A<string>");
|
||||
|
||||
goTo.marker('Bsig');
|
||||
verify.quickInfoIs("(constructor) B<string>(val: string): B<string>");
|
||||
|
||||
goTo.marker('Csig');
|
||||
verify.quickInfoIs("(constructor) C<T>(): C<T>"); // Cannot resolve signature
|
||||
|
||||
goTo.marker('Dsig');
|
||||
verify.quickInfoIs("(constructor) D<string>(): D<string>");
|
||||
+10
-10
@@ -2,16 +2,16 @@
|
||||
|
||||
////var a = { name: 'bob', age: 18 };
|
||||
////var b = { name: 'jim', age: 20 };
|
||||
////var c/*1*/ = [a, b];
|
||||
////var /*1*/c = [a, b];
|
||||
|
||||
////var a1 = { name: 'bob', age: 18 };
|
||||
////var b1 = { name: 'jim', age: 20, dob: new Date() };
|
||||
////var c1/*2*/ = [a1, b1];
|
||||
////var /*2*/c1 = [a1, b1];
|
||||
|
||||
////var a2 = { name: 'bob', age: 18, address: 'springfield' };
|
||||
////var b2 = { name: 'jim', age: 20, dob: new Date() };
|
||||
////var c2/*3*/ = [a2, b2];
|
||||
////var c2a/*4*/ = [a2, b2, a1];
|
||||
////var /*3*/c2 = [a2, b2];
|
||||
////var /*4*/c2a = [a2, b2, a1];
|
||||
|
||||
////interface I {
|
||||
//// name: string;
|
||||
@@ -19,19 +19,19 @@
|
||||
////}
|
||||
|
||||
////var i: I;
|
||||
////var c3/*5*/ = [a2, b2, i];
|
||||
////var /*5*/c3 = [a2, b2, i];
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('{ name: string; age: number; }[]');
|
||||
verify.quickInfoIs('(var) c: {\n name: string;\n age: number;\n}[]');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('{ name: string; age: number; }[]');
|
||||
verify.quickInfoIs('(var) c1: {\n name: string;\n age: number;\n}[]');
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('{}[]');
|
||||
verify.quickInfoIs('(var) c2: {}[]');
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs('{ name: string; age: number; }[]');
|
||||
verify.quickInfoIs('(var) c2a: {\n name: string;\n age: number;\n}[]');
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs('I[]');
|
||||
verify.quickInfoIs('(var) c3: I[]');
|
||||
@@ -10,10 +10,10 @@
|
||||
//// }
|
||||
|
||||
goTo.marker('className');
|
||||
verify.quickInfoSymbolNameIs('Sphere');
|
||||
verify.quickInfoIs('class Sphere');
|
||||
|
||||
goTo.marker('interfaceGoesHere');
|
||||
edit.insert("\r\ninterface Surface {\r\n reflect: () => number;\r\n}\r\n");
|
||||
|
||||
goTo.marker('className');
|
||||
verify.quickInfoSymbolNameIs('Sphere');
|
||||
verify.quickInfoIs('class Sphere');
|
||||
|
||||
+4
-4
@@ -8,8 +8,8 @@
|
||||
////module C {
|
||||
//// export function f(x: typeof C) {
|
||||
//// x./*1*/
|
||||
//// var r/*3*/ = new /*2*/x<number>();
|
||||
//// var r2/*5*/ = r./*4*/
|
||||
//// var /*3*/r = new /*2*/x<number>();
|
||||
//// var /*5*/r2 = r./*4*/
|
||||
//// return typeof r;
|
||||
//// }
|
||||
////}
|
||||
@@ -27,13 +27,13 @@ goTo.marker('2');
|
||||
verify.completionListContains('x');
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('C<number>');
|
||||
verify.quickInfoIs('(local var) r: C<number>');
|
||||
|
||||
goTo.marker('4');
|
||||
verify.completionListContains('x');
|
||||
edit.insert('x;');
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs('number');
|
||||
verify.quickInfoIs('(local var) r2: number');
|
||||
|
||||
verify.numberOfErrorsInCurrentFile(0);
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
//// foo() { }
|
||||
//// }
|
||||
//// export module C {
|
||||
//// export var C/**/ = M.C
|
||||
//// export var /**/C = M.C
|
||||
//// }
|
||||
////}
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs('typeof C');
|
||||
verify.quickInfoIs('(var) M.C.C: typeof M.C');
|
||||
verify.numberOfErrorsInCurrentFile(0);
|
||||
@@ -0,0 +1,176 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////** This is class c2 without constuctor*/
|
||||
////class c/*1*/2 {
|
||||
////}
|
||||
////var i/*2*/2 = new c/*28*/2(/*3*/);
|
||||
////var i2/*4*/_c = c/*5*/2;
|
||||
////class c/*6*/3 {
|
||||
//// /** Constructor comment*/
|
||||
//// constructor() {
|
||||
//// }
|
||||
////}
|
||||
////var i/*7*/3 = new c/*29*/3(/*8*/);
|
||||
////var i3/*9*/_c = c/*10*/3;
|
||||
/////** Class comment*/
|
||||
////class c/*11*/4 {
|
||||
//// /** Constructor comment*/
|
||||
//// constructor() {
|
||||
//// }
|
||||
////}
|
||||
////var i/*12*/4 = new c/*30*/4(/*13*/);
|
||||
////var i4/*14*/_c = c/*15*/4;
|
||||
/////** Class with statics*/
|
||||
////class c/*16*/5 {
|
||||
//// static s1: number;
|
||||
////}
|
||||
////var i/*17*/5 = new c/*31*/5(/*18*/);
|
||||
////var i5_/*19*/c = c/*20*/5;
|
||||
/////** class with statics and constructor*/
|
||||
////class c/*21*/6 {
|
||||
//// /** s1 comment*/
|
||||
//// static s1: number;
|
||||
//// /** constructor comment*/
|
||||
//// constructor() {
|
||||
//// }
|
||||
////}
|
||||
////var i/*22*/6 = new c/*32*/6(/*23*/);
|
||||
////var i6/*24*/_c = c/*25*/6;
|
||||
/////*26*/
|
||||
////class a {
|
||||
//// /**
|
||||
//// constructor for a
|
||||
//// @param a this is my a
|
||||
//// */
|
||||
//// constructor(a: string) {
|
||||
//// }
|
||||
////}
|
||||
////new a(/*27*/"Hello");
|
||||
////module m {
|
||||
//// export module m2 {
|
||||
//// /** class comment */
|
||||
//// export class c1 {
|
||||
//// /** constructor comment*/
|
||||
//// constructor() {
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
////var myVar = new m.m2.c/*33*/1();
|
||||
|
||||
// this line triggers a semantic/syntactic error check, remove line when 788570 is fixed
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("class c2", "This is class c2 without constuctor");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("(var) i2: c2", "");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs("(var) i2_c: typeof c2", "");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs("class c2", "This is class c2 without constuctor");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs("class c3", "");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.quickInfoIs("(var) i3: c3", "");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.currentSignatureHelpDocCommentIs("Constructor comment");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs("(var) i3_c: typeof c3", "");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.quickInfoIs("class c3", "");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.quickInfoIs("class c4", "Class comment");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.quickInfoIs("(var) i4: c4", "");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.currentSignatureHelpDocCommentIs("Constructor comment");
|
||||
|
||||
goTo.marker('14');
|
||||
verify.quickInfoIs("(var) i4_c: typeof c4", "");
|
||||
|
||||
goTo.marker('15');
|
||||
verify.quickInfoIs("class c4", "Class comment");
|
||||
|
||||
goTo.marker('16');
|
||||
verify.quickInfoIs("class c5", "Class with statics");
|
||||
|
||||
goTo.marker('17');
|
||||
verify.quickInfoIs("(var) i5: c5", "");
|
||||
|
||||
goTo.marker('18');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('19');
|
||||
verify.quickInfoIs("(var) i5_c: typeof c5", "");
|
||||
|
||||
goTo.marker('20');
|
||||
verify.quickInfoIs("class c5", "Class with statics");
|
||||
|
||||
goTo.marker('21');
|
||||
verify.quickInfoIs("class c6", "class with statics and constructor");
|
||||
|
||||
goTo.marker('22');
|
||||
verify.quickInfoIs("(var) i6: c6", "");
|
||||
|
||||
goTo.marker('23');
|
||||
verify.currentSignatureHelpDocCommentIs("constructor comment");
|
||||
|
||||
goTo.marker('24');
|
||||
verify.quickInfoIs("(var) i6_c: typeof c6", "");
|
||||
|
||||
goTo.marker('25');
|
||||
verify.quickInfoIs("class c6", "class with statics and constructor");
|
||||
|
||||
goTo.marker('26');
|
||||
verify.completionListContains("c2", "class c2", "This is class c2 without constuctor");
|
||||
verify.completionListContains("i2", "(var) i2: c2", "");
|
||||
verify.completionListContains("i2_c", "(var) i2_c: typeof c2", "");
|
||||
verify.completionListContains("c3", "class c3", "");
|
||||
verify.completionListContains("i3", "(var) i3: c3", "");
|
||||
verify.completionListContains("i3_c", "(var) i3_c: typeof c3", "");
|
||||
verify.completionListContains("c4", "class c4", "Class comment");
|
||||
verify.completionListContains("i4", "(var) i4: c4", "");
|
||||
verify.completionListContains("i4_c", "(var) i4_c: typeof c4", "");
|
||||
verify.completionListContains("c5", "class c5", "Class with statics");
|
||||
verify.completionListContains("i5", "(var) i5: c5", "");
|
||||
verify.completionListContains("i5_c", "(var) i5_c: typeof c5");
|
||||
verify.completionListContains("c6", "class c6", "class with statics and constructor");
|
||||
verify.completionListContains("i6", "(var) i6: c6", "");
|
||||
verify.completionListContains("i6_c", "(var) i6_c: typeof c6", "");
|
||||
|
||||
goTo.marker('27');
|
||||
verify.currentSignatureHelpDocCommentIs("constructor for a");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is my a");
|
||||
|
||||
goTo.marker('28');
|
||||
verify.quickInfoIs("(constructor) c2(): c2", "");
|
||||
|
||||
goTo.marker('29');
|
||||
verify.quickInfoIs("(constructor) c3(): c3", "Constructor comment");
|
||||
|
||||
goTo.marker('30');
|
||||
verify.quickInfoIs("(constructor) c4(): c4", "Constructor comment");
|
||||
|
||||
goTo.marker('31');
|
||||
verify.quickInfoIs("(constructor) c5(): c5", "");
|
||||
|
||||
goTo.marker('32');
|
||||
verify.quickInfoIs("(constructor) c6(): c6", "constructor comment");
|
||||
|
||||
goTo.marker('33');
|
||||
verify.quickInfoIs("(constructor) m.m2.c1(): m.m2.c1", "constructor comment");
|
||||
@@ -0,0 +1,706 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////** This is comment for c1*/
|
||||
////class c/*1*/1 {
|
||||
//// /** p1 is property of c1*/
|
||||
//// public p/*2*/1: number;
|
||||
//// /** sum with property*/
|
||||
//// public p/*3*/2(/** number to add*/b: number) {
|
||||
//// return this./*4*/p1 + /*5*/b;
|
||||
//// }
|
||||
//// /** getter property*/
|
||||
//// public get p/*6*/3() {
|
||||
//// return this./*7*/p/*8q*/2(/*8*/this./*9*/p1);
|
||||
//// }
|
||||
//// /** setter property*/
|
||||
//// public set p/*10*/3(/** this is value*/value: number) {
|
||||
//// this./*11*/p1 = this./*12*/p/*13q*/2(/*13*/value);
|
||||
//// }
|
||||
//// /** pp1 is property of c1*/
|
||||
//// private p/*14*/p1: number;
|
||||
//// /** sum with property*/
|
||||
//// private p/*15*/p2(/** number to add*/b: number) {
|
||||
//// return this./*16*/p1 + /*17*/b;
|
||||
//// }
|
||||
//// /** getter property*/
|
||||
//// private get p/*18*/p3() {
|
||||
//// return this./*19*/p/*20q*/p2(/*20*/this./*21*/pp1);
|
||||
//// }
|
||||
//// /** setter property*/
|
||||
//// private set p/*22*/p3( /** this is value*/value: number) {
|
||||
//// this./*23*/pp1 = this./*24*/p/*25q*/p2(/*25*/value);
|
||||
//// }
|
||||
//// /** Constructor method*/
|
||||
//// constru/*26*/ctor() {
|
||||
//// }
|
||||
//// /** s1 is static property of c1*/
|
||||
//// static s/*27*/1: number;
|
||||
//// /** static sum with property*/
|
||||
//// static s/*28*/2(/** number to add*/b: number) {
|
||||
//// return /*29*/c1./*30*/s1 + /*31*/b;
|
||||
//// }
|
||||
//// /** static getter property*/
|
||||
//// static get s/*32*/3() {
|
||||
//// return /*33*/c1./*34*/s/*35q*/2(/*35*/c1./*36*/s1);
|
||||
//// }
|
||||
//// /** setter property*/
|
||||
//// static set s/*37*/3( /** this is value*/value: number) {
|
||||
//// /*38*/c1./*39*/s1 = /*40*/c1./*41*/s/*42q*/2(/*42*/value);
|
||||
//// }
|
||||
//// public nc_/*43*/p1: number;
|
||||
//// public nc_/*44*/p2(b: number) {
|
||||
//// return this.nc_p1 + /*45*/b;
|
||||
//// }
|
||||
//// public get nc_/*46*/p3() {
|
||||
//// return this.nc/*47q*/_p2(/*47*/this.nc_p1);
|
||||
//// }
|
||||
//// public set nc/*48*/_p3(value: number) {
|
||||
//// this.nc_p1 = this.nc/*49q*/_p2(/*49*/value);
|
||||
//// }
|
||||
//// private nc/*50*/_pp1: number;
|
||||
//// private nc_/*51*/pp2(b: number) {
|
||||
//// return this.nc_pp1 + /*52*/b;
|
||||
//// }
|
||||
//// private get nc/*53*/_pp3() {
|
||||
//// return this.nc_/*54q*/pp2(/*54*/this.nc_pp1);
|
||||
//// }
|
||||
//// private set nc_p/*55*/p3(value: number) {
|
||||
//// this.nc_pp1 = this./*56q*/nc_pp2(/*56*/value);
|
||||
//// }
|
||||
//// static nc/*57*/_s1: number;
|
||||
//// static nc/*58*/_s2(b: number) {
|
||||
//// return c1.nc_s1 + /*59*/b;
|
||||
//// }
|
||||
//// static get nc/*60*/_s3() {
|
||||
//// return c1.nc/*61q*/_s2(/*61*/c1.nc_s1);
|
||||
//// }
|
||||
//// static set nc/*62*/_s3(value: number) {
|
||||
//// c1.nc_s1 = c1.nc_/*63q*/s2(/*63*/value);
|
||||
//// }
|
||||
////}
|
||||
////var i/*64*/1 = new c/*65q*/1(/*65*/);
|
||||
////var i1/*66*/_p = i1./*67*/p1;
|
||||
////var i1/*68*/_f = i1.p/*69*/2;
|
||||
////var i1/*70*/_r = i1.p/*71q*/2(/*71*/20);
|
||||
////var i1_p/*72*/rop = i1./*73*/p3;
|
||||
////i1./*74*/p3 = i1_/*75*/prop;
|
||||
////var i1_/*76*/nc_p = i1.n/*77*/c_p1;
|
||||
////var i1/*78*/_ncf = i1.nc_/*79*/p2;
|
||||
////var i1_/*80*/ncr = i1.nc/*81q*/_p2(/*81*/20);
|
||||
////var i1_n/*82*/cprop = i1.n/*83*/c_p3;
|
||||
////i1.nc/*84*/_p3 = i1_/*85*/ncprop;
|
||||
////var i1_/*86*/s_p = /*87*/c1./*88*/s1;
|
||||
////var i1_s/*89*/_f = c1./*90*/s2;
|
||||
////var i1_/*91*/s_r = c1.s/*92q*/2(/*92*/20);
|
||||
////var i1_s/*93*/_prop = c1.s/*94*/3;
|
||||
////c1.s/*95*/3 = i1_s/*96*/_prop;
|
||||
////var i1_s/*97*/_nc_p = c1.n/*98*/c_s1;
|
||||
////var i1_s_/*99*/ncf = c1.nc/*100*/_s2;
|
||||
////var i1_s_/*101*/ncr = c1.n/*102q*/c_s2(/*102*/20);
|
||||
////var i1_s_n/*103*/cprop = c1.nc/*104*/_s3;
|
||||
////c1.nc/*105*/_s3 = i1_s_nc/*106*/prop;
|
||||
////var i1/*107*/_c = c/*108*/1;
|
||||
/////*109*/
|
||||
////class cProperties {
|
||||
//// private val: number;
|
||||
//// /** getter only property*/
|
||||
//// public get p1() {
|
||||
//// return this.val;
|
||||
//// }
|
||||
//// public get nc_p1() {
|
||||
//// return this.val;
|
||||
//// }
|
||||
//// /**setter only property*/
|
||||
//// public set p2(value: number) {
|
||||
//// this.val = value;
|
||||
//// }
|
||||
//// public set nc_p2(value: number) {
|
||||
//// this.val = value;
|
||||
//// }
|
||||
////}
|
||||
////var cProperties_i = new cProperties();
|
||||
////cProperties_i./*110*/p2 = cProperties_i.p/*111*/1;
|
||||
////cProperties_i.nc/*112*/_p2 = cProperties_i.nc/*113*/_p1;
|
||||
////class cWithConstructorProperty {
|
||||
//// /**
|
||||
//// * this is class cWithConstructorProperty's constructor
|
||||
//// * @param a this is first parameter a
|
||||
//// */
|
||||
//// /*119*/constructor(/**more info about a*/public a: number) {
|
||||
//// var b/*118*/bbb = 10;
|
||||
//// th/*116*/is./*114*/a = /*115*/a + 2 + bb/*117*/bb;
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("class c1", "This is comment for c1");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("(property) c1.p1: number", "p1 is property of c1");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("(method) c1.p2(b: number): number", "sum with property");
|
||||
|
||||
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\nsetter property");
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.completionListContains("b", "(parameter) b: number", "number to add");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs("(property) c1.p3: number", "getter property\nsetter property");
|
||||
|
||||
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\nsetter property");
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.currentSignatureHelpDocCommentIs("sum with property");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("number to add");
|
||||
goTo.marker('8q');
|
||||
verify.quickInfoIs("(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\nsetter property");
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.quickInfoIs("(property) c1.p3: number", "getter property\nsetter property");
|
||||
|
||||
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\nsetter property");
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
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\nsetter property");
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.currentSignatureHelpDocCommentIs("sum with property");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("number to add");
|
||||
verify.completionListContains("value", "(parameter) value: number", "this is value");
|
||||
goTo.marker('13q');
|
||||
verify.quickInfoIs("(method) c1.p2(b: number): number", "sum with property");
|
||||
|
||||
goTo.marker('14');
|
||||
verify.quickInfoIs("(property) c1.pp1: number", "pp1 is property of c1");
|
||||
|
||||
goTo.marker('15');
|
||||
verify.quickInfoIs("(method) c1.pp2(b: number): number", "sum with property");
|
||||
|
||||
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\nsetter property");
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
goTo.marker('17');
|
||||
verify.completionListContains("b", "(parameter) b: number", "number to add");
|
||||
|
||||
goTo.marker('18');
|
||||
verify.quickInfoIs("(property) c1.pp3: number", "getter property\nsetter property");
|
||||
|
||||
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\nsetter property");
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
goTo.marker('20');
|
||||
verify.currentSignatureHelpDocCommentIs("sum with property");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("number to add");
|
||||
goTo.marker('20q');
|
||||
verify.quickInfoIs("(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\nsetter property");
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
goTo.marker('22');
|
||||
verify.quickInfoIs("(property) c1.pp3: number", "getter property\nsetter property");
|
||||
|
||||
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\nsetter property");
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
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\nsetter property");
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
goTo.marker('25');
|
||||
verify.currentSignatureHelpDocCommentIs("sum with property");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("number to add");
|
||||
verify.completionListContains("value", "(parameter) value: number", "this is value");
|
||||
goTo.marker('25q');
|
||||
verify.quickInfoIs("(method) c1.pp2(b: number): number", "sum with property");
|
||||
|
||||
goTo.marker('26');
|
||||
verify.quickInfoIs("(constructor) c1(): c1", "Constructor method");
|
||||
|
||||
goTo.marker('27');
|
||||
verify.quickInfoIs("(property) c1.s1: number", "s1 is static property of c1");
|
||||
|
||||
goTo.marker('28');
|
||||
verify.quickInfoIs("(method) c1.s2(b: number): number", "static sum with property");
|
||||
|
||||
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");
|
||||
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", "");
|
||||
|
||||
goTo.marker('31');
|
||||
verify.completionListContains("b", "(parameter) b: number", "number to add");
|
||||
|
||||
goTo.marker('32');
|
||||
verify.quickInfoIs("(property) c1.s3: number", "static getter property\nsetter property");
|
||||
|
||||
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");
|
||||
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", "");
|
||||
|
||||
goTo.marker('35');
|
||||
verify.currentSignatureHelpDocCommentIs("static sum with property");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("number to add");
|
||||
verify.completionListContains("c1", "class c1", "This is comment for c1");
|
||||
goTo.marker('35q');
|
||||
verify.quickInfoIs("(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");
|
||||
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", "");
|
||||
|
||||
goTo.marker('37');
|
||||
verify.quickInfoIs("(property) c1.s3: number", "static getter property\nsetter property");
|
||||
|
||||
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");
|
||||
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", "");
|
||||
|
||||
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");
|
||||
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", "");
|
||||
|
||||
goTo.marker('42');
|
||||
verify.currentSignatureHelpDocCommentIs("static sum with property");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("number to add");
|
||||
verify.completionListContains("value", "(parameter) value: number", "this is value");
|
||||
goTo.marker('42q');
|
||||
verify.quickInfoIs("(method) c1.s2(b: number): number", "static sum with property");
|
||||
|
||||
goTo.marker('43');
|
||||
verify.quickInfoIs("(property) c1.nc_p1: number", "");
|
||||
|
||||
goTo.marker('44');
|
||||
verify.quickInfoIs("(method) c1.nc_p2(b: number): number", "");
|
||||
|
||||
goTo.marker('45');
|
||||
verify.completionListContains("b", "(parameter) b: number", "");
|
||||
|
||||
goTo.marker('46');
|
||||
verify.quickInfoIs("(property) c1.nc_p3: number", "");
|
||||
|
||||
goTo.marker('47');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('47q');
|
||||
verify.quickInfoIs("(method) c1.nc_p2(b: number): number", "");
|
||||
|
||||
goTo.marker('48');
|
||||
verify.quickInfoIs("(property) c1.nc_p3: number", "");
|
||||
|
||||
goTo.marker('49');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
verify.completionListContains("value", "(parameter) value: number", "");
|
||||
goTo.marker('49q');
|
||||
verify.quickInfoIs("(method) c1.nc_p2(b: number): number", "");
|
||||
|
||||
goTo.marker('50');
|
||||
verify.quickInfoIs("(property) c1.nc_pp1: number", "");
|
||||
|
||||
goTo.marker('51');
|
||||
verify.quickInfoIs("(method) c1.nc_pp2(b: number): number", "");
|
||||
|
||||
goTo.marker('52');
|
||||
verify.completionListContains("b", "(parameter) b: number", "");
|
||||
|
||||
goTo.marker('53');
|
||||
verify.quickInfoIs("(property) c1.nc_pp3: number", "");
|
||||
|
||||
goTo.marker('54');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('54q');
|
||||
verify.quickInfoIs("(method) c1.nc_pp2(b: number): number", "");
|
||||
|
||||
goTo.marker('55');
|
||||
verify.quickInfoIs("(property) c1.nc_pp3: number", "");
|
||||
|
||||
goTo.marker('56');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
verify.completionListContains("value", "(parameter) value: number", "");
|
||||
goTo.marker('56q');
|
||||
verify.quickInfoIs("(method) c1.nc_pp2(b: number): number", "");
|
||||
|
||||
goTo.marker('57');
|
||||
verify.quickInfoIs("(property) c1.nc_s1: number", "");
|
||||
|
||||
goTo.marker('58');
|
||||
verify.quickInfoIs("(method) c1.nc_s2(b: number): number", "");
|
||||
|
||||
goTo.marker('59');
|
||||
verify.completionListContains("b", "(parameter) b: number", "");
|
||||
|
||||
goTo.marker('60');
|
||||
verify.quickInfoIs("(property) c1.nc_s3: number", "");
|
||||
|
||||
goTo.marker('61');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('61q');
|
||||
verify.quickInfoIs("(method) c1.nc_s2(b: number): number", "");
|
||||
|
||||
goTo.marker('62');
|
||||
verify.quickInfoIs("(property) c1.nc_s3: number", "");
|
||||
|
||||
goTo.marker('63');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
verify.completionListContains("value", "(parameter) value: number", "");
|
||||
goTo.marker('63q');
|
||||
verify.quickInfoIs("(method) c1.nc_s2(b: number): number", "");
|
||||
|
||||
goTo.marker('64');
|
||||
verify.quickInfoIs("(var) i1: c1", "");
|
||||
|
||||
goTo.marker('65');
|
||||
verify.currentSignatureHelpDocCommentIs("Constructor method");
|
||||
goTo.marker('65q');
|
||||
verify.quickInfoIs("(constructor) c1(): c1", "Constructor method");
|
||||
|
||||
goTo.marker('66');
|
||||
verify.quickInfoIs("(var) i1_p: number", "");
|
||||
|
||||
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\nsetter property");
|
||||
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", "");
|
||||
|
||||
goTo.marker('68');
|
||||
verify.quickInfoIs("(var) i1_f: (b: number) => number", "");
|
||||
|
||||
goTo.marker('69');
|
||||
verify.quickInfoIs("(method) c1.p2(b: number): number", "sum with property");
|
||||
|
||||
goTo.marker('70');
|
||||
verify.quickInfoIs("(var) i1_r: number", "");
|
||||
|
||||
goTo.marker('71');
|
||||
verify.currentSignatureHelpDocCommentIs("sum with property");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("number to add");
|
||||
goTo.marker('71q');
|
||||
verify.quickInfoIs("(method) c1.p2(b: number): number", "sum with property");
|
||||
|
||||
goTo.marker('72');
|
||||
verify.quickInfoIs("(var) i1_prop: number", "");
|
||||
goTo.marker('73');
|
||||
verify.quickInfoIs("(property) c1.p3: number", "getter property\nsetter property");
|
||||
goTo.marker('74');
|
||||
verify.quickInfoIs("(property) c1.p3: number", "getter property\nsetter property");
|
||||
goTo.marker('75');
|
||||
verify.quickInfoIs("(var) i1_prop: number", "");
|
||||
|
||||
goTo.marker('76');
|
||||
verify.quickInfoIs("(var) i1_nc_p: number", "");
|
||||
|
||||
goTo.marker('77');
|
||||
verify.quickInfoIs("(property) c1.nc_p1: number", "");
|
||||
|
||||
goTo.marker('78');
|
||||
verify.quickInfoIs("(var) i1_ncf: (b: number) => number", "");
|
||||
|
||||
goTo.marker('79');
|
||||
verify.quickInfoIs("(method) c1.nc_p2(b: number): number", "");
|
||||
|
||||
goTo.marker('80');
|
||||
verify.quickInfoIs("(var) i1_ncr: number", "");
|
||||
|
||||
goTo.marker('81');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('81q');
|
||||
verify.quickInfoIs("(method) c1.nc_p2(b: number): number", "");
|
||||
|
||||
goTo.marker('82');
|
||||
verify.quickInfoIs("(var) i1_ncprop: number", "");
|
||||
goTo.marker('83');
|
||||
verify.quickInfoIs("(property) c1.nc_p3: number", "");
|
||||
goTo.marker('84');
|
||||
verify.quickInfoIs("(property) c1.nc_p3: number", "");
|
||||
goTo.marker('85');
|
||||
verify.quickInfoIs("(var) i1_ncprop: number", "");
|
||||
|
||||
goTo.marker('86');
|
||||
verify.quickInfoIs("(var) i1_s_p: number", "");
|
||||
|
||||
goTo.marker('87');
|
||||
verify.quickInfoIs("class c1", "This is comment for c1");
|
||||
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");
|
||||
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", "");
|
||||
|
||||
goTo.marker('89');
|
||||
verify.quickInfoIs("(var) i1_s_f: (b: number) => number", "");
|
||||
|
||||
goTo.marker('90');
|
||||
verify.quickInfoIs("(method) c1.s2(b: number): number", "static sum with property");
|
||||
|
||||
goTo.marker('91');
|
||||
verify.quickInfoIs("(var) i1_s_r: number", "");
|
||||
|
||||
goTo.marker('92');
|
||||
verify.currentSignatureHelpDocCommentIs("static sum with property");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("number to add");
|
||||
goTo.marker('92q');
|
||||
verify.quickInfoIs("(method) c1.s2(b: number): number", "static sum with property");
|
||||
|
||||
goTo.marker('93');
|
||||
verify.quickInfoIs("(var) i1_s_prop: number", "");
|
||||
goTo.marker('94');
|
||||
verify.quickInfoIs("(property) c1.s3: number", "static getter property\nsetter property");
|
||||
goTo.marker('95');
|
||||
verify.quickInfoIs("(property) c1.s3: number", "static getter property\nsetter property");
|
||||
goTo.marker('96');
|
||||
verify.quickInfoIs("(var) i1_s_prop: number", "");
|
||||
|
||||
goTo.marker('97');
|
||||
verify.quickInfoIs("(var) i1_s_nc_p: number", "");
|
||||
|
||||
goTo.marker('98');
|
||||
verify.quickInfoIs("(property) c1.nc_s1: number", "");
|
||||
|
||||
goTo.marker('99');
|
||||
verify.quickInfoIs("(var) i1_s_ncf: (b: number) => number", "");
|
||||
|
||||
goTo.marker('100');
|
||||
verify.quickInfoIs("(method) c1.nc_s2(b: number): number", "");
|
||||
|
||||
goTo.marker('101');
|
||||
verify.quickInfoIs("(var) i1_s_ncr: number", "");
|
||||
|
||||
goTo.marker('102');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('102q');
|
||||
verify.quickInfoIs("(method) c1.nc_s2(b: number): number", "");
|
||||
|
||||
goTo.marker('103');
|
||||
verify.quickInfoIs("(var) i1_s_ncprop: number", "");
|
||||
goTo.marker('104');
|
||||
verify.quickInfoIs("(property) c1.nc_s3: number", "");
|
||||
goTo.marker('105');
|
||||
verify.quickInfoIs("(property) c1.nc_s3: number", "");
|
||||
goTo.marker('106');
|
||||
verify.quickInfoIs("(var) i1_s_ncprop: number", "");
|
||||
|
||||
goTo.marker('107');
|
||||
verify.quickInfoIs("(var) i1_c: typeof c1", "");
|
||||
|
||||
goTo.marker('108');
|
||||
verify.quickInfoIs("class c1", "This is comment for c1");
|
||||
|
||||
goTo.marker('109');
|
||||
verify.completionListContains("c1", "class c1", "This is comment for c1");
|
||||
verify.completionListContains("i1", "(var) i1: c1", "");
|
||||
verify.completionListContains("i1_p", "(var) i1_p: number", "");
|
||||
verify.completionListContains("i1_f", "(var) i1_f: (b: number) => number", "");
|
||||
verify.completionListContains("i1_r", "(var) i1_r: number", "");
|
||||
verify.completionListContains("i1_prop", "(var) i1_prop: number", "");
|
||||
verify.completionListContains("i1_nc_p", "(var) i1_nc_p: number", "");
|
||||
verify.completionListContains("i1_ncf", "(var) i1_ncf: (b: number) => number", "");
|
||||
verify.completionListContains("i1_ncr", "(var) i1_ncr: number", "");
|
||||
verify.completionListContains("i1_ncprop", "(var) i1_ncprop: number", "");
|
||||
verify.completionListContains("i1_s_p", "(var) i1_s_p: number", "");
|
||||
verify.completionListContains("i1_s_f", "(var) i1_s_f: (b: number) => number", "");
|
||||
verify.completionListContains("i1_s_r", "(var) i1_s_r: number", "");
|
||||
verify.completionListContains("i1_s_prop", "(var) i1_s_prop: number", "");
|
||||
verify.completionListContains("i1_s_nc_p", "(var) i1_s_nc_p: number", "");
|
||||
verify.completionListContains("i1_s_ncf", "(var) i1_s_ncf: (b: number) => number", "");
|
||||
verify.completionListContains("i1_s_ncr", "(var) i1_s_ncr: number", "");
|
||||
verify.completionListContains("i1_s_ncprop", "(var) i1_s_ncprop: number", "");
|
||||
|
||||
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", "");
|
||||
|
||||
goTo.marker('111');
|
||||
verify.quickInfoIs("(property) cProperties.p1: number", "getter only property");
|
||||
goTo.marker('112');
|
||||
verify.quickInfoIs("(property) cProperties.nc_p2: number", "");
|
||||
goTo.marker('113');
|
||||
verify.quickInfoIs("(property) cProperties.nc_p1: number", "");
|
||||
|
||||
goTo.marker('114');
|
||||
verify.memberListContains("a", "(property) cWithConstructorProperty.a: number", "more info about a");
|
||||
verify.quickInfoIs("(property) cWithConstructorProperty.a: number", "more info about a");
|
||||
|
||||
goTo.marker('115');
|
||||
verify.completionListContains("a", "(parameter) a: number", "this is first parameter a\nmore info about a");
|
||||
verify.quickInfoIs("(parameter) a: number", "this is first parameter a\nmore info about a");
|
||||
|
||||
goTo.marker('116');
|
||||
verify.quickInfoIs("class cWithConstructorProperty", "");
|
||||
|
||||
goTo.marker('117');
|
||||
verify.quickInfoIs("(local var) bbbb: number", "");
|
||||
|
||||
goTo.marker('118');
|
||||
verify.quickInfoIs("(local var) bbbb: number", "");
|
||||
|
||||
goTo.marker('119');
|
||||
verify.quickInfoIs("(constructor) cWithConstructorProperty(a: number): cWithConstructorProperty", "this is class cWithConstructorProperty's constructor");
|
||||
+111
-57
@@ -43,7 +43,7 @@
|
||||
////jsDocMix/*6q*/edComments1(/*6*/);
|
||||
////
|
||||
/////// Triple slash comment
|
||||
/////** jsdoc comment */ /*** another jsDocComment*/
|
||||
/////** jsdoc comment */ /** another jsDocComment*/
|
||||
////function jsDocMixedComments2() {
|
||||
////}
|
||||
////jsDocMi/*7q*/xedComments2(/*7*/);
|
||||
@@ -54,7 +54,7 @@
|
||||
////}
|
||||
////jsDocMixe/*8q*/dComments3(/*8*/);
|
||||
////
|
||||
/////** jsdoc comment */ /*** another jsDocComment*/
|
||||
/////** jsdoc comment */ /** another jsDocComment*/
|
||||
/////// Triple slash comment
|
||||
/////// Triple slash comment 2
|
||||
////function jsDocMixedComments4() {
|
||||
@@ -62,14 +62,14 @@
|
||||
////jsDocMixed/*9q*/Comments4(/*9*/);
|
||||
////
|
||||
/////// Triple slash comment 1
|
||||
/////** jsdoc comment */ /*** another jsDocComment*/
|
||||
/////** jsdoc comment */ /** another jsDocComment*/
|
||||
/////// Triple slash comment
|
||||
/////// Triple slash comment 2
|
||||
////function jsDocMixedComments5() {
|
||||
////}
|
||||
////jsDocM/*10q*/ixedComments5(/*10*/);
|
||||
////
|
||||
/////*** another jsDocComment*/
|
||||
/////** another jsDocComment*/
|
||||
/////// Triple slash comment 1
|
||||
/////// Triple slash comment
|
||||
/////// Triple slash comment 2
|
||||
@@ -95,7 +95,7 @@
|
||||
//// * @param {number} a first number
|
||||
//// * @param b second number
|
||||
//// */
|
||||
////function sum(a: number, b: number) {
|
||||
////function sum(/*16aq*/a: number, /*17aq*/b: number) {
|
||||
//// return /*18*/a + b;
|
||||
////}
|
||||
/////*15*/s/*16q*/um(/*16*/10, /*17*/20);
|
||||
@@ -106,14 +106,14 @@
|
||||
/////** @param c {
|
||||
//// @param d @anotherTag*/
|
||||
/////** @param e LastParam @anotherTag*/
|
||||
////function multiply(a: number, b: number, c?: number, d?, e?) {
|
||||
////function multiply(/*19aq*/a: number, /*20aq*/b: number, /*21aq*/c?: number, /*22aq*/d?, /*23aq*/e?) {
|
||||
////}
|
||||
////mult/*19q*/iply(/*19*/10,/*20*/ 20,/*21*/ 30, /*22*/40, /*23*/50);
|
||||
/////** fn f1 with number
|
||||
////* @param { string} b about b
|
||||
////*/
|
||||
////function f1(a: number);
|
||||
////function f1(b: string);
|
||||
////function f1(/*25aq*/a: number);
|
||||
////function f1(/*26aq*/b: string);
|
||||
/////**@param opt optional parameter*/
|
||||
////function f1(aOrb, opt?) {
|
||||
//// return /*24*/aOrb;
|
||||
@@ -129,7 +129,7 @@
|
||||
////@param { { () => string; } } e this is optional param e
|
||||
////@param { { { () => string; } } f this is optional param f
|
||||
////*/
|
||||
////function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) {
|
||||
////function subtract(/*28aq*/a: number, /*29aq*/b: number, /*30aq*/c?: () => string, /*31aq*/d?: () => string, /*32aq*/e?: () => string, /*33aq*/f?: () => string) {
|
||||
////}
|
||||
////subt/*28q*/ract(/*28*/10, /*29*/ 20, /*30*/ null, /*31*/ null, /*32*/ null, /*33*/null);
|
||||
/////** this is square function
|
||||
@@ -137,7 +137,7 @@
|
||||
////@param { number } a this is input number
|
||||
////@returnType { number } it is return type
|
||||
////*/
|
||||
////function square(a: number) {
|
||||
////function square(/*34aq*/a: number) {
|
||||
//// return a * a;
|
||||
////}
|
||||
////squ/*34q*/are(/*34*/10);
|
||||
@@ -146,7 +146,7 @@
|
||||
////@paramTag { number } g this is optional param g
|
||||
////@param { number} b this is b
|
||||
////*/
|
||||
////function divide(a: number, b: number) {
|
||||
////function divide(/*35aq*/a: number, /*36aq*/b: number) {
|
||||
////}
|
||||
////div/*35q*/ide(/*35*/10, /*36*/20);
|
||||
/////**
|
||||
@@ -154,7 +154,7 @@
|
||||
////@param {string} foo is string
|
||||
////@param {string} bar is second string
|
||||
////*/
|
||||
////function fooBar(foo: string, bar: string) {
|
||||
////function fooBar(/*37aq*/foo: string, /*38aq*/bar: string) {
|
||||
//// return foo + bar;
|
||||
////}
|
||||
////fo/*37q*/oBar(/*37*/"foo",/*38*/"bar");
|
||||
@@ -168,7 +168,7 @@
|
||||
////*@param a it is first parameter
|
||||
////*@param c it is third parameter
|
||||
////*/
|
||||
////function jsDocParamTest(/** this is inline comment for a */a: number, /** this is inline comment for b*/ b: number, c: number, d: number) {
|
||||
////function jsDocParamTest(/** this is inline comment for a *//*40aq*/a: number, /** this is inline comment for b*/ /*41aq*/b: number, /*42aq*/c: number, /*43aq*/d: number) {
|
||||
//// return /*39*/a + b + c + d;
|
||||
////}
|
||||
/////*44*/jsD/*40q*/ocParamTest(/*40*/30, /*41*/40, /*42*/50, /*43*/60);
|
||||
@@ -195,7 +195,7 @@
|
||||
//// * @param c this is info about b
|
||||
//// * not aligned text about parameter will eat only one space
|
||||
//// */
|
||||
////function jsDocCommentAlignmentTest3(a: string, b, c) {
|
||||
////function jsDocCommentAlignmentTest3(/*47aq*/a: string, /*48aq*/b, /*49aq*/c) {
|
||||
////}
|
||||
////jsDocComme/*47q*/ntAlignmentTest3(/*47*/"hello",/*48*/1, /*49*/2);
|
||||
/////**/
|
||||
@@ -205,237 +205,291 @@
|
||||
goTo.marker('1');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('1q');
|
||||
verify.quickInfoIs("(): void", "", "simple", "function");
|
||||
verify.quickInfoIs("(function) simple(): void", "");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('2q');
|
||||
verify.quickInfoIs("(): void", "", "multiLine", "function");
|
||||
verify.quickInfoIs("(function) multiLine(): void", "");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.currentSignatureHelpDocCommentIs("this is eg of single line jsdoc style comment ");
|
||||
goTo.marker('3q');
|
||||
verify.quickInfoIs("(): void", "this is eg of single line jsdoc style comment ", "jsDocSingleLine", "function");
|
||||
verify.quickInfoIs("(function) jsDocSingleLine(): void", "this is eg of single line jsdoc style comment ");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.currentSignatureHelpDocCommentIs("this is multiple line jsdoc stule comment\nNew line1\nNew Line2");
|
||||
goTo.marker('4q');
|
||||
verify.quickInfoIs("(): void", "this is multiple line jsdoc stule comment\nNew line1\nNew Line2", "jsDocMultiLine", "function");
|
||||
verify.quickInfoIs("(function) jsDocMultiLine(): void", "this is multiple line jsdoc stule comment\nNew line1\nNew Line2");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.currentSignatureHelpDocCommentIs("this is multiple line jsdoc stule comment\nNew line1\nNew Line2\nShoul mege this line as well\nand this too\nAnother this one too");
|
||||
goTo.marker('5q');
|
||||
verify.quickInfoIs("(): void", "this is multiple line jsdoc stule comment\nNew line1\nNew Line2\nShoul mege this line as well\nand this too\nAnother this one too", "jsDocMultiLineMerge", "function");
|
||||
verify.quickInfoIs("(function) jsDocMultiLineMerge(): void", "this is multiple line jsdoc stule comment\nNew line1\nNew Line2\nShoul mege this line as well\nand this too\nAnother this one too");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.currentSignatureHelpDocCommentIs("jsdoc comment ");
|
||||
goTo.marker('6q');
|
||||
verify.quickInfoIs("(): void", "jsdoc comment ", "jsDocMixedComments1", "function");
|
||||
verify.quickInfoIs("(function) jsDocMixedComments1(): void", "jsdoc comment ");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.currentSignatureHelpDocCommentIs("jsdoc comment \nanother jsDocComment");
|
||||
goTo.marker('7q');
|
||||
verify.quickInfoIs("(): void", "jsdoc comment \nanother jsDocComment", "jsDocMixedComments2", "function");
|
||||
verify.quickInfoIs("(function) jsDocMixedComments2(): void", "jsdoc comment \nanother jsDocComment");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.currentSignatureHelpDocCommentIs("jsdoc comment \nanother jsDocComment");
|
||||
verify.currentSignatureHelpDocCommentIs("jsdoc comment \n* another jsDocComment");
|
||||
goTo.marker('8q');
|
||||
verify.quickInfoIs("(): void", "jsdoc comment \nanother jsDocComment", "jsDocMixedComments3", "function");
|
||||
verify.quickInfoIs("(function) jsDocMixedComments3(): void", "jsdoc comment \n* another jsDocComment");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.currentSignatureHelpDocCommentIs("jsdoc comment \nanother jsDocComment");
|
||||
goTo.marker('9q');
|
||||
verify.quickInfoIs("(): void", "jsdoc comment \nanother jsDocComment", "jsDocMixedComments4", "function");
|
||||
verify.quickInfoIs("(function) jsDocMixedComments4(): void", "jsdoc comment \nanother jsDocComment");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.currentSignatureHelpDocCommentIs("jsdoc comment \nanother jsDocComment");
|
||||
goTo.marker('10q');
|
||||
verify.quickInfoIs("(): void", "jsdoc comment \nanother jsDocComment", "jsDocMixedComments5", "function");
|
||||
verify.quickInfoIs("(function) jsDocMixedComments5(): void", "jsdoc comment \nanother jsDocComment");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.currentSignatureHelpDocCommentIs("another jsDocComment\njsdoc comment ");
|
||||
goTo.marker('11q');
|
||||
verify.quickInfoIs("(): void", "another jsDocComment\njsdoc comment ", "jsDocMixedComments6", "function");
|
||||
verify.quickInfoIs("(function) jsDocMixedComments6(): void", "another jsDocComment\njsdoc comment ");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('12q');
|
||||
verify.quickInfoIs("(): void", "", "noHelpComment1", "function");
|
||||
verify.quickInfoIs("(function) noHelpComment1(): void", "");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('13q');
|
||||
verify.quickInfoIs("(): void", "", "noHelpComment2", "function");
|
||||
verify.quickInfoIs("(function) noHelpComment2(): void", "");
|
||||
|
||||
goTo.marker('14');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('14q');
|
||||
verify.quickInfoIs("(): void", "", "noHelpComment3", "function");
|
||||
verify.quickInfoIs("(function) noHelpComment3(): void", "");
|
||||
|
||||
goTo.marker('15');
|
||||
verify.completionListContains("sum", "(a: number, b: number): number", "Adds two integers and returns the result", "sum", "function");
|
||||
verify.completionListContains("sum", "(function) sum(a: number, b: number): number", "Adds two integers and returns the result");
|
||||
|
||||
goTo.marker('16');
|
||||
verify.currentSignatureHelpDocCommentIs("Adds two integers and returns the result");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("first number");
|
||||
goTo.marker('16q');
|
||||
verify.quickInfoIs("(a: number, b: number): number", "Adds two integers and returns the result", "sum", "function");
|
||||
verify.quickInfoIs("(function) sum(a: number, b: number): number", "Adds two integers and returns the result");
|
||||
goTo.marker('16aq');
|
||||
verify.quickInfoIs("(parameter) a: number", "first number");
|
||||
|
||||
goTo.marker('17');
|
||||
verify.currentSignatureHelpDocCommentIs("Adds two integers and returns the result");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("second number");
|
||||
goTo.marker('17aq');
|
||||
verify.quickInfoIs("(parameter) b: number", "second number");
|
||||
|
||||
goTo.marker('18');
|
||||
verify.quickInfoIs("number", "first number", "a", "parameter");
|
||||
verify.completionListContains("a", "number", "first number", "a", "parameter");
|
||||
verify.completionListContains("b", "number", "second number", "b", "parameter");
|
||||
verify.quickInfoIs("(parameter) a: number", "first number");
|
||||
verify.completionListContains("a", "(parameter) a: number", "first number");
|
||||
verify.completionListContains("b", "(parameter) b: number", "second number");
|
||||
|
||||
goTo.marker('19');
|
||||
verify.currentSignatureHelpDocCommentIs("This is multiplication function\n@anotherTag\n@anotherTag");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("first number");
|
||||
goTo.marker('19q');
|
||||
verify.quickInfoIs("(a: number, b: number, c?: number, d?: any, e?: any): void", "This is multiplication function\n@anotherTag\n@anotherTag", "multiply", "function");
|
||||
verify.quickInfoIs("(function) multiply(a: number, b: number, c?: number, d?: any, e?: any): void", "This is multiplication function\n@anotherTag\n@anotherTag");
|
||||
goTo.marker('19aq');
|
||||
verify.quickInfoIs("(parameter) a: number", "first number");
|
||||
|
||||
goTo.marker('20');
|
||||
verify.currentSignatureHelpDocCommentIs("This is multiplication function\n@anotherTag\n@anotherTag");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('20aq');
|
||||
verify.quickInfoIs("(parameter) b: number", "");
|
||||
|
||||
goTo.marker('21');
|
||||
verify.currentSignatureHelpDocCommentIs("This is multiplication function\n@anotherTag\n@anotherTag");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("{");
|
||||
goTo.marker('21aq');
|
||||
verify.quickInfoIs("(parameter) c: number", "{");
|
||||
|
||||
goTo.marker('22');
|
||||
verify.currentSignatureHelpDocCommentIs("This is multiplication function\n@anotherTag\n@anotherTag");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('22aq');
|
||||
verify.quickInfoIs("(parameter) d: any", "");
|
||||
|
||||
goTo.marker('23');
|
||||
verify.currentSignatureHelpDocCommentIs("This is multiplication function\n@anotherTag\n@anotherTag");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("LastParam ");
|
||||
goTo.marker('23aq');
|
||||
verify.quickInfoIs("(parameter) e: any", "LastParam ");
|
||||
|
||||
goTo.marker('24');
|
||||
verify.completionListContains("aOrb", "any", "", "aOrb", "parameter");
|
||||
verify.completionListContains("opt", "any", "optional parameter", "opt", "parameter");
|
||||
verify.completionListContains("aOrb", "(parameter) aOrb: any", "");
|
||||
verify.completionListContains("opt", "(parameter) opt: any", "optional parameter");
|
||||
|
||||
goTo.marker('25');
|
||||
verify.currentSignatureHelpDocCommentIs("fn f1 with number");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('25q');
|
||||
verify.quickInfoIs("(a: number): any (+ 1 overload(s))", "fn f1 with number", "f1", "function");
|
||||
verify.quickInfoIs("(function) f1(a: number): any (+1 overload)", "fn f1 with number");
|
||||
goTo.marker('25aq');
|
||||
verify.quickInfoIs("(parameter) a: number", "");
|
||||
|
||||
goTo.marker('26');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('26q');
|
||||
verify.quickInfoIs("(b: string): any (+ 1 overload(s))", "", "f1", "function");
|
||||
verify.quickInfoIs("(function) f1(b: string): any (+1 overload)", "");
|
||||
goTo.marker('26aq');
|
||||
verify.quickInfoIs("(parameter) b: string", "");
|
||||
|
||||
goTo.marker('27');
|
||||
verify.completionListContains("multiply", "(a: number, b: number, c?: number, d?: any, e?: any): void", "This is multiplication function\n@anotherTag\n@anotherTag", "multiply", "function");
|
||||
verify.completionListContains("f1", "(a: number): any (+ 1 overload(s))", "fn f1 with number", "f1", "function");
|
||||
verify.completionListContains("multiply", "(function) multiply(a: number, b: number, c?: number, d?: any, e?: any): void", "This is multiplication function\n@anotherTag\n@anotherTag");
|
||||
verify.completionListContains("f1", "(function) f1(a: number): any (+1 overload)", "fn f1 with number");
|
||||
|
||||
goTo.marker('28');
|
||||
verify.currentSignatureHelpDocCommentIs("This is subtract function");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('28q');
|
||||
verify.quickInfoIs("(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", "This is subtract function", "subtract", "function");
|
||||
verify.quickInfoIs("(function) subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", "This is subtract function");
|
||||
goTo.marker('28aq');
|
||||
verify.quickInfoIs("(parameter) a: number", "");
|
||||
|
||||
goTo.marker('29');
|
||||
verify.currentSignatureHelpDocCommentIs("This is subtract function");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is about b");
|
||||
goTo.marker('29aq');
|
||||
verify.quickInfoIs("(parameter) b: number", "this is about b");
|
||||
|
||||
goTo.marker('30');
|
||||
verify.currentSignatureHelpDocCommentIs("This is subtract function");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is optional param c");
|
||||
goTo.marker('30aq');
|
||||
verify.quickInfoIs("(parameter) c: () => string", "this is optional param c");
|
||||
|
||||
goTo.marker('31');
|
||||
verify.currentSignatureHelpDocCommentIs("This is subtract function");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('31aq');
|
||||
verify.quickInfoIs("(parameter) d: () => string", "");
|
||||
|
||||
goTo.marker('32');
|
||||
verify.currentSignatureHelpDocCommentIs("This is subtract function");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is optional param e");
|
||||
goTo.marker('32aq');
|
||||
verify.quickInfoIs("(parameter) e: () => string", "this is optional param e");
|
||||
|
||||
goTo.marker('33');
|
||||
verify.currentSignatureHelpDocCommentIs("This is subtract function");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('33aq');
|
||||
verify.quickInfoIs("(parameter) f: () => string", "");
|
||||
|
||||
goTo.marker('34');
|
||||
verify.currentSignatureHelpDocCommentIs("this is square function\n@paramTag { number } a this is input number of paramTag\n@returnType { number } it is return type");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is input number");
|
||||
goTo.marker('34q');
|
||||
verify.quickInfoIs("(a: number): number", "this is square function\n@paramTag { number } a this is input number of paramTag\n@returnType { number } it is return type", "square", "function");
|
||||
verify.quickInfoIs("(function) square(a: number): number", "this is square function\n@paramTag { number } a this is input number of paramTag\n@returnType { number } it is return type");
|
||||
goTo.marker('34aq');
|
||||
verify.quickInfoIs("(parameter) a: number", "this is input number");
|
||||
|
||||
goTo.marker('35');
|
||||
verify.currentSignatureHelpDocCommentIs("this is divide function\n@paramTag { number } g this is optional param g");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is a");
|
||||
goTo.marker('35q');
|
||||
verify.quickInfoIs("(a: number, b: number): void", "this is divide function\n@paramTag { number } g this is optional param g", "divide", "function");
|
||||
verify.quickInfoIs("(function) divide(a: number, b: number): void", "this is divide function\n@paramTag { number } g this is optional param g");
|
||||
goTo.marker('35aq');
|
||||
verify.quickInfoIs("(parameter) a: number", "this is a");
|
||||
|
||||
goTo.marker('36');
|
||||
verify.currentSignatureHelpDocCommentIs("this is divide function\n@paramTag { number } g this is optional param g");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is b");
|
||||
goTo.marker('36aq');
|
||||
verify.quickInfoIs("(parameter) b: number", "this is b");
|
||||
|
||||
goTo.marker('37');
|
||||
verify.currentSignatureHelpDocCommentIs("Function returns string concat of foo and bar");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("is string");
|
||||
goTo.marker('37q');
|
||||
verify.quickInfoIs("(foo: string, bar: string): string", "Function returns string concat of foo and bar", "fooBar", "function");
|
||||
verify.quickInfoIs("(function) fooBar(foo: string, bar: string): string", "Function returns string concat of foo and bar");
|
||||
goTo.marker('37aq');
|
||||
verify.quickInfoIs("(parameter) foo: string", "is string");
|
||||
|
||||
goTo.marker('38');
|
||||
verify.currentSignatureHelpDocCommentIs("Function returns string concat of foo and bar");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("is second string");
|
||||
goTo.marker('38aq');
|
||||
verify.quickInfoIs("(parameter) bar: string", "is second string");
|
||||
|
||||
goTo.marker('39');
|
||||
verify.completionListContains("a", "number", "it is first parameter\nthis is inline comment for a ", "a", "parameter");
|
||||
verify.completionListContains("b", "number", "this is inline comment for b", "b", "parameter");
|
||||
verify.completionListContains("c", "number", "it is third parameter", "c", "parameter");
|
||||
verify.completionListContains("d", "number", "", "d", "parameter");
|
||||
verify.completionListContains("a", "(parameter) a: number", "it is first parameter\nthis is inline comment for a ");
|
||||
verify.completionListContains("b", "(parameter) b: number", "this is inline comment for b");
|
||||
verify.completionListContains("c", "(parameter) c: number", "it is third parameter");
|
||||
verify.completionListContains("d", "(parameter) d: number", "");
|
||||
|
||||
goTo.marker('40');
|
||||
verify.currentSignatureHelpDocCommentIs("this is jsdoc style function with param tag as well as inline parameter help");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("it is first parameter\nthis is inline comment for a ");
|
||||
goTo.marker('40q');
|
||||
verify.quickInfoIs("(a: number, b: number, c: number, d: number): number", "this is jsdoc style function with param tag as well as inline parameter help", "jsDocParamTest", "function");
|
||||
verify.quickInfoIs("(function) jsDocParamTest(a: number, b: number, c: number, d: number): number", "this is jsdoc style function with param tag as well as inline parameter help");
|
||||
goTo.marker('40aq');
|
||||
verify.quickInfoIs("(parameter) a: number", "it is first parameter\nthis is inline comment for a ");
|
||||
|
||||
goTo.marker('41');
|
||||
verify.currentSignatureHelpDocCommentIs("this is jsdoc style function with param tag as well as inline parameter help");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is inline comment for b");
|
||||
goTo.marker('41aq');
|
||||
verify.quickInfoIs("(parameter) b: number", "this is inline comment for b");
|
||||
|
||||
goTo.marker('42');
|
||||
verify.currentSignatureHelpDocCommentIs("this is jsdoc style function with param tag as well as inline parameter help");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("it is third parameter");
|
||||
goTo.marker('42aq');
|
||||
verify.quickInfoIs("(parameter) c: number", "it is third parameter");
|
||||
|
||||
goTo.marker('43');
|
||||
verify.currentSignatureHelpDocCommentIs("this is jsdoc style function with param tag as well as inline parameter help");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('43aq');
|
||||
verify.quickInfoIs("(parameter) d: number", "");
|
||||
|
||||
goTo.marker('44');
|
||||
verify.completionListContains("jsDocParamTest", "(a: number, b: number, c: number, d: number): number", "this is jsdoc style function with param tag as well as inline parameter help", "jsDocParamTest", "function");
|
||||
verify.completionListContains("x", "any", "This is a comment ", "x", "var");
|
||||
verify.completionListContains("y", "any", "This is a comment ", "y", "var");
|
||||
verify.completionListContains("jsDocParamTest", "(function) jsDocParamTest(a: number, b: number, c: number, d: number): number", "this is jsdoc style function with param tag as well as inline parameter help");
|
||||
verify.completionListContains("x", "(var) x: any", "This is a comment ");
|
||||
verify.completionListContains("y", "(var) y: any", "This is a comment ");
|
||||
|
||||
goTo.marker('45');
|
||||
verify.currentSignatureHelpDocCommentIs("This is function comment\nAnd properly aligned comment ");
|
||||
goTo.marker('45q');
|
||||
verify.quickInfoIs("(): void", "This is function comment\nAnd properly aligned comment ", "jsDocCommentAlignmentTest1", "function");
|
||||
verify.quickInfoIs("(function) jsDocCommentAlignmentTest1(): void", "This is function comment\nAnd properly aligned comment ");
|
||||
|
||||
goTo.marker('46');
|
||||
verify.currentSignatureHelpDocCommentIs("This is function comment\n And aligned with 4 space char margin");
|
||||
goTo.marker('46q');
|
||||
verify.quickInfoIs("(): void", "This is function comment\n And aligned with 4 space char margin", "jsDocCommentAlignmentTest2", "function");
|
||||
verify.quickInfoIs("(function) jsDocCommentAlignmentTest2(): void", "This is function comment\n And aligned with 4 space char margin");
|
||||
|
||||
goTo.marker('47');
|
||||
verify.currentSignatureHelpDocCommentIs("This is function comment\n And aligned with 4 space char margin");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is info about a\nspanning on two lines and aligned perfectly");
|
||||
goTo.marker('47q');
|
||||
verify.quickInfoIs("(a: string, b: any, c: any): void", "This is function comment\n And aligned with 4 space char margin", "jsDocCommentAlignmentTest3", "function");
|
||||
verify.quickInfoIs("(function) jsDocCommentAlignmentTest3(a: string, b: any, c: any): void", "This is function comment\n And aligned with 4 space char margin");
|
||||
goTo.marker('47aq');
|
||||
verify.quickInfoIs("(parameter) a: string", "this is info about a\nspanning on two lines and aligned perfectly");
|
||||
|
||||
goTo.marker('48');
|
||||
verify.currentSignatureHelpDocCommentIs("This is function comment\n And aligned with 4 space char margin");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin");
|
||||
goTo.marker('48aq');
|
||||
verify.quickInfoIs("(parameter) b: any", "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin");
|
||||
|
||||
goTo.marker('49');
|
||||
verify.currentSignatureHelpDocCommentIs("This is function comment\n And aligned with 4 space char margin");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is info about b\nnot aligned text about parameter will eat only one space");
|
||||
goTo.marker('49aq');
|
||||
verify.quickInfoIs("(parameter) c: any", "this is info about b\nnot aligned text about parameter will eat only one space");
|
||||
|
||||
goTo.marker('50');
|
||||
verify.quickInfoIs(undefined, "", "NoQuickInfoClass", "class");
|
||||
verify.quickInfoIs("class NoQuickInfoClass", "");
|
||||
@@ -0,0 +1,37 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////** Enum of colors*/
|
||||
////enum /*1*/Colors {
|
||||
//// /** Fancy name for 'blue'*/
|
||||
//// /*2*/Cornflower,
|
||||
//// /** Fancy name for 'pink'*/
|
||||
//// /*3*/FancyPink
|
||||
////}
|
||||
////var /*4*/x = /*5*/Colors./*6*/Cornflower;
|
||||
////x = Colors./*7*/FancyPink;
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("enum Colors", "Enum of colors");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("(enum member) Colors.Cornflower = 0", "Fancy name for 'blue'");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("(enum member) Colors.FancyPink = 1", "Fancy name for 'pink'");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs("(var) x: Colors", "");
|
||||
|
||||
goTo.marker('5');
|
||||
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.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.quickInfoIs("(enum member) Colors.FancyPink = 1", "Fancy name for 'pink'");
|
||||
@@ -0,0 +1,95 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: commentsExternalModules_file0.ts
|
||||
/////** Module comment*/
|
||||
////export module m/*1*/1 {
|
||||
//// /** b's comment*/
|
||||
//// export var b: number;
|
||||
//// /** foo's comment*/
|
||||
//// function foo() {
|
||||
//// return /*2*/b;
|
||||
//// }
|
||||
//// /** m2 comments*/
|
||||
//// export module m2 {
|
||||
//// /** class comment;*/
|
||||
//// export class c {
|
||||
//// };
|
||||
//// /** i*/
|
||||
//// export var i = new c();
|
||||
//// }
|
||||
//// /** exported function*/
|
||||
//// export function fooExport() {
|
||||
//// return f/*3q*/oo(/*3*/);
|
||||
//// }
|
||||
////}
|
||||
/////*4*/m1./*5*/fooEx/*6q*/port(/*6*/);
|
||||
////var my/*7*/var = new m1.m2./*8*/c();
|
||||
|
||||
// @Filename: commentsExternalModules_file1.ts
|
||||
/////**This is on import declaration*/
|
||||
////import ex/*9*/tMod = require("commentsExternalModules_file0");
|
||||
/////*10*/extMod./*11*/m1./*12*/fooExp/*13q*/ort(/*13*/);
|
||||
////var new/*14*/Var = new extMod.m1.m2./*15*/c();
|
||||
|
||||
// this line triggers a semantic/syntactic error check, remove line when 788570 is fixed
|
||||
edit.insert('');
|
||||
|
||||
goTo.file("commentsExternalModules_file0.ts");
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("module m1", "Module comment");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains("b", "(var) m1.b: number", "b's comment");
|
||||
verify.completionListContains("foo", "(function) foo(): number", "foo's comment");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.currentSignatureHelpDocCommentIs("foo's comment");
|
||||
goTo.marker('3q');
|
||||
verify.quickInfoIs("(function) foo(): number", "foo's comment");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.completionListContains("m1", "module m1", "Module 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", "module m1.m2");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.currentSignatureHelpDocCommentIs("exported function");
|
||||
goTo.marker('6q');
|
||||
verify.quickInfoIs("(function) m1.fooExport(): number", "exported function");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.quickInfoIs("(var) myvar: m1.m2.c", "");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.memberListContains("c", "class m1.m2.c", "class comment;");
|
||||
verify.memberListContains("i", "(var) m1.m2.i: m1.m2.c", "i");
|
||||
|
||||
goTo.file("commentsExternalModules_file1.ts");
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs('(alias) extMod', "This is on import declaration");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.completionListContains("extMod", "(alias) extMod", "This is on import declaration");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.memberListContains("m1", "module 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", "module extMod.m1.m2");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.currentSignatureHelpDocCommentIs("exported function");
|
||||
goTo.marker('13q');
|
||||
verify.quickInfoIs("(function) extMod.m1.fooExport(): number", "exported function");
|
||||
|
||||
goTo.marker('14');
|
||||
verify.quickInfoIs("(var) newVar: extMod.m1.m2.c", "");
|
||||
|
||||
goTo.marker('15');
|
||||
verify.memberListContains("c", "class extMod.m1.m2.c", "class comment;");
|
||||
verify.memberListContains("i", "(var) extMod.m1.m2.i: extMod.m1.m2.c", "i");
|
||||
+30
-29
@@ -46,36 +46,36 @@ verify.currentSignatureHelpDocCommentIs("This is comment for function signature"
|
||||
verify.currentParameterHelpArgumentDocCommentIs("this is comment for b");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.completionListContains('foo', '(): void', 'This comment should appear for foo', "foo", "function");
|
||||
verify.completionListContains('foo', '(function) foo(): void', 'This comment should appear for foo');
|
||||
|
||||
goTo.marker('5');
|
||||
verify.completionListContains('fooWithParameters', '(a: string, b: number): void', 'This is comment for function signature', "fooWithParameters", "function");
|
||||
verify.completionListContains('fooWithParameters', '(function) fooWithParameters(a: string, b: number): void', 'This is comment for function signature');
|
||||
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs("(): void", "This comment should appear for foo", "foo", "function");
|
||||
verify.quickInfoIs("(function) foo(): void", "This comment should appear for foo");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.quickInfoIs("(): void", "This comment should appear for foo", "foo", "function");
|
||||
verify.quickInfoIs("(function) foo(): void", "This comment should appear for foo");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.quickInfoIs("(a: string, b: number): void", "This is comment for function signature", "fooWithParameters", "function");
|
||||
verify.quickInfoIs("(function) fooWithParameters(a: string, b: number): void", "This is comment for function signature");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs("(a: string, b: number): void", "This is comment for function signature", "fooWithParameters", "function");
|
||||
verify.quickInfoIs("(function) fooWithParameters(a: string, b: number): void", "This is comment for function signature");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.completionListContains('a', 'string', 'this is comment about a', "a", "parameter");
|
||||
verify.completionListContains('b', 'number', 'this is comment for b', "b", "parameter");
|
||||
verify.completionListContains('a', '(parameter) a: string', 'this is comment about a');
|
||||
verify.completionListContains('b', '(parameter) b: number', 'this is comment for b');
|
||||
|
||||
goTo.marker('11');
|
||||
verify.quickInfoIs("(a: number, b: number) => number", "lamdaFoo var comment", "lambdaFoo", "var");
|
||||
verify.quickInfoIs("(var) lambdaFoo: (a: number, b: number) => number", "lamdaFoo var comment");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.quickInfoIs("(a: number, b: number) => number", "", "lambddaNoVarComment", "var");
|
||||
verify.quickInfoIs("(var) lambddaNoVarComment: (a: number, b: number) => number", "");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.completionListContains('lambdaFoo', '(a: number, b: number) => number', 'lamdaFoo var comment', "lambdaFoo", "var");
|
||||
verify.completionListContains('lambddaNoVarComment', '(a: number, b: number) => number', '', "lambddaNoVarComment", "var");
|
||||
verify.completionListContains('lambdaFoo', '(var) lambdaFoo: (a: number, b: number) => number', 'lamdaFoo var comment');
|
||||
verify.completionListContains('lambddaNoVarComment', '(var) lambddaNoVarComment: (a: number, b: number) => number', '');
|
||||
|
||||
goTo.marker('14');
|
||||
verify.currentParameterHelpArgumentDocCommentIs("param a");
|
||||
@@ -90,42 +90,43 @@ goTo.marker('17');
|
||||
verify.currentParameterHelpArgumentDocCommentIs("param b");
|
||||
|
||||
goTo.marker('18');
|
||||
verify.completionListContains('a', 'number', 'param a', "a", "parameter");
|
||||
verify.completionListContains('b', 'number', 'param b', "b", "parameter");
|
||||
verify.completionListContains('a', '(parameter) a: number', 'param a');
|
||||
verify.completionListContains('b', '(parameter) b: number', 'param b');
|
||||
|
||||
goTo.marker('19');
|
||||
verify.currentSignatureHelpDocCommentIs("Does something");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("a string");
|
||||
|
||||
goTo.marker('20');
|
||||
verify.quickInfoIs('string', '', 'd', "local var");
|
||||
verify.quickInfoIs('(local var) d: string', '');
|
||||
|
||||
goTo.marker('20a');
|
||||
verify.quickInfoIs('(a: number) => number', '', 'lambdaAnotherFunc', "var");
|
||||
verify.quickInfoIs('(var) lambdaAnotherFunc: (a: number) => number', '');
|
||||
goTo.marker('21');
|
||||
verify.quickInfoIs('number', '', 'a', "parameter");
|
||||
verify.quickInfoIs('(parameter) a: number', '');
|
||||
goTo.marker('22');
|
||||
verify.quickInfoIs('number', '', 'bbbb', "local var");
|
||||
verify.quickInfoIs('(local var) bbbb: number', '');
|
||||
goTo.marker('23');
|
||||
verify.quickInfoIs('number', '', 'bbbb', "local var");
|
||||
verify.quickInfoIs('(local var) bbbb: number', '');
|
||||
goTo.marker('24');
|
||||
verify.quickInfoIs('number', '', 'a', "parameter");
|
||||
verify.quickInfoIs('(parameter) a: number', '');
|
||||
|
||||
goTo.marker('25');
|
||||
verify.quickInfoIs('(a: number): string', '', 'anotherFunc', "function");
|
||||
verify.quickInfoIs('(function) anotherFunc(a: number): string', '');
|
||||
goTo.marker('26');
|
||||
verify.quickInfoIs('number', '', 'a', "parameter");
|
||||
verify.quickInfoIs('(parameter) a: number', '');
|
||||
goTo.marker('27a');
|
||||
verify.quickInfoIs('(b: string) => string', '', 'lambdaVar', "local var");
|
||||
verify.quickInfoIs('(local var) lambdaVar: (b: string) => string', '');
|
||||
goTo.marker('27');
|
||||
verify.quickInfoIs('string', '', 'b', "parameter");
|
||||
verify.quickInfoIs('(parameter) b: string', '');
|
||||
goTo.marker('28');
|
||||
verify.quickInfoIs('string', '', 'localVar', "local var");
|
||||
verify.quickInfoIs('(local var) localVar: string', '');
|
||||
goTo.marker('29');
|
||||
verify.quickInfoIs('string', '', 'localVar', "local var");
|
||||
verify.quickInfoIs('(local var) localVar: string', '');
|
||||
goTo.marker('30');
|
||||
verify.quickInfoIs('string', '', 'b', "parameter");
|
||||
verify.quickInfoIs('(parameter) b: string', '');
|
||||
goTo.marker('31');
|
||||
verify.quickInfoIs('(b: string) => string', '', 'lambdaVar', "local var");
|
||||
debugger;
|
||||
verify.quickInfoIs('(local var) lambdaVar: (b: string) => string', '');
|
||||
goTo.marker('32');
|
||||
verify.quickInfoIs('number', '', 'a', "parameter");
|
||||
verify.quickInfoIs('(parameter) a: number', '');
|
||||
+11
-11
@@ -20,32 +20,32 @@
|
||||
// @Filename: commentsImportDeclaration_file1.ts
|
||||
///////<reference path='commentsImportDeclaration_file0.ts'/>
|
||||
/////** Import declaration*/
|
||||
////import extMod/*3*/ = require("commentsImportDeclaration_file0/*4*/");
|
||||
////import /*3*/extMod = require("commentsImportDeclaration_file0/*4*/");
|
||||
////extMod./*6*/m1./*7*/fooEx/*8q*/port(/*8*/);
|
||||
////var new/*9*/Var = new extMod.m1.m2./*10*/c();
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("m1", "ModuleComment", "m1", "module");
|
||||
verify.quickInfoIs("module m1", "ModuleComment");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("extMod", "Import declaration", "extMod", "module");
|
||||
verify.quickInfoIs("(alias) extMod", "Import declaration");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.memberListContains("m1", "extMod.m1");
|
||||
verify.memberListContains("m1", "module extMod.m1");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.memberListContains("b", "number", "b's comment", "extMod.m1.b", "var");
|
||||
verify.memberListContains("fooExport", "(): number", "exported function", "extMod.m1.fooExport", "function");
|
||||
verify.memberListContains("m2", "extMod.m1.m2");
|
||||
verify.memberListContains("b", "(var) extMod.m1.b: number", "b's comment");
|
||||
verify.memberListContains("fooExport", "(function) extMod.m1.fooExport(): number", "exported function");
|
||||
verify.memberListContains("m2", "module extMod.m1.m2");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.currentSignatureHelpDocCommentIs("exported function");
|
||||
goTo.marker('8q');
|
||||
verify.quickInfoIs("(): number", "exported function", "extMod.m1.fooExport", "function");
|
||||
verify.quickInfoIs("(function) extMod.m1.fooExport(): number", "exported function");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs("extMod.m1.m2.c", "", "newVar", "var");
|
||||
verify.quickInfoIs("(var) newVar: extMod.m1.m2.c", "");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.memberListContains("c", undefined, "class comment;", "extMod.m1.m2.c", "class");
|
||||
verify.memberListContains("i", "extMod.m1.m2.c", "i", "extMod.m1.m2.i", "var");
|
||||
verify.memberListContains("c", "class extMod.m1.m2.c", "class comment;");
|
||||
verify.memberListContains("i", "(var) extMod.m1.m2.i: extMod.m1.m2.c", "i");
|
||||
@@ -0,0 +1,679 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////** i1 is interface with properties*/
|
||||
////interface i1 {
|
||||
//// /** i1_p1*/
|
||||
//// i1_p1: number;
|
||||
//// /** i1_f1*/
|
||||
//// i1_f1(): void;
|
||||
//// /** i1_l1*/
|
||||
//// i1_l1: () => void;
|
||||
//// i1_nc_p1: number;
|
||||
//// i1_nc_f1(): void;
|
||||
//// i1_nc_l1: () => void;
|
||||
//// p1: number;
|
||||
//// f1(): void;
|
||||
//// l1: () => void;
|
||||
//// nc_p1: number;
|
||||
//// nc_f1(): void;
|
||||
//// nc_l1: () => void;
|
||||
////}
|
||||
////class c1 implements i1 {
|
||||
//// public i1_p1: number;
|
||||
//// public i1_f1() {
|
||||
//// }
|
||||
//// public i1_l1: () => void;
|
||||
//// public i1_nc_p1: number;
|
||||
//// public i1_nc_f1() {
|
||||
//// }
|
||||
//// public i1_nc_l1: () => void;
|
||||
//// /** c1_p1*/
|
||||
//// public p1: number;
|
||||
//// /** c1_f1*/
|
||||
//// public f1() {
|
||||
//// }
|
||||
//// /** c1_l1*/
|
||||
//// public l1: () => void;
|
||||
//// /** c1_nc_p1*/
|
||||
//// public nc_p1: number;
|
||||
//// /** c1_nc_f1*/
|
||||
//// public nc_f1() {
|
||||
//// }
|
||||
//// /** c1_nc_l1*/
|
||||
//// public nc_l1: () => void;
|
||||
////}
|
||||
////var i1/*1iq*/_i: /*16i*/i1;
|
||||
////i1_i./*1*/i/*2q*/1_f1(/*2*/);
|
||||
////i1_i.i1_n/*3q*/c_f1(/*3*/);
|
||||
////i1_i.f/*4q*/1(/*4*/);
|
||||
////i1_i.nc/*5q*/_f1(/*5*/);
|
||||
////i1_i.i1/*l2q*/_l1(/*l2*/);
|
||||
////i1_i.i1_/*l3q*/nc_l1(/*l3*/);
|
||||
////i1_i.l/*l4q*/1(/*l4*/);
|
||||
////i1_i.nc/*l5q*/_l1(/*l5*/);
|
||||
////var c1/*6iq*/_i = new c1();
|
||||
////c1_i./*6*/i1/*7q*/_f1(/*7*/);
|
||||
////c1_i.i1_nc/*8q*/_f1(/*8*/);
|
||||
////c1_i.f/*9q*/1(/*9*/);
|
||||
////c1_i.nc/*10q*/_f1(/*10*/);
|
||||
////c1_i.i1/*l7q*/_l1(/*l7*/);
|
||||
////c1_i.i1_n/*l8q*/c_l1(/*l8*/);
|
||||
////c1_i.l/*l9q*/1(/*l9*/);
|
||||
////c1_i.nc/*l10q*/_l1(/*l10*/);
|
||||
////// assign to interface
|
||||
////i1_i = c1_i;
|
||||
////i1_i./*11*/i1/*12q*/_f1(/*12*/);
|
||||
////i1_i.i1_nc/*13q*/_f1(/*13*/);
|
||||
////i1_i.f/*14q*/1(/*14*/);
|
||||
////i1_i.nc/*15q*/_f1(/*15*/);
|
||||
////i1_i.i1/*l12q*/_l1(/*l12*/);
|
||||
////i1_i.i1/*l13q*/_nc_l1(/*l13*/);
|
||||
////i1_i.l/*l14q*/1(/*l14*/);
|
||||
////i1_i.nc/*l15q*/_l1(/*l15*/);
|
||||
/////*16*/
|
||||
////class c2 {
|
||||
//// /** c2 c2_p1*/
|
||||
//// public c2_p1: number;
|
||||
//// /** c2 c2_f1*/
|
||||
//// public c2_f1() {
|
||||
//// }
|
||||
//// /** c2 c2_prop*/
|
||||
//// public get c2_prop() {
|
||||
//// return 10;
|
||||
//// }
|
||||
//// public c2_nc_p1: number;
|
||||
//// public c2_nc_f1() {
|
||||
//// }
|
||||
//// public get c2_nc_prop() {
|
||||
//// return 10;
|
||||
//// }
|
||||
//// /** c2 p1*/
|
||||
//// public p1: number;
|
||||
//// /** c2 f1*/
|
||||
//// public f1() {
|
||||
//// }
|
||||
//// /** c2 prop*/
|
||||
//// public get prop() {
|
||||
//// return 10;
|
||||
//// }
|
||||
//// public nc_p1: number;
|
||||
//// public nc_f1() {
|
||||
//// }
|
||||
//// public get nc_prop() {
|
||||
//// return 10;
|
||||
//// }
|
||||
//// /** c2 constructor*/
|
||||
//// constr/*55*/uctor(a: number) {
|
||||
//// this.c2_p1 = a;
|
||||
//// }
|
||||
////}
|
||||
////class c3 extends c2 {
|
||||
//// cons/*56*/tructor() {
|
||||
//// su/*18sq*/per(10);
|
||||
//// this.p1 = s/*18spropq*/uper./*18spropProp*/c2_p1;
|
||||
//// }
|
||||
//// /** c3 p1*/
|
||||
//// public p1: number;
|
||||
//// /** c3 f1*/
|
||||
//// public f1() {
|
||||
//// }
|
||||
//// /** c3 prop*/
|
||||
//// public get prop() {
|
||||
//// return 10;
|
||||
//// }
|
||||
//// public nc_p1: number;
|
||||
//// public nc_f1() {
|
||||
//// }
|
||||
//// public get nc_prop() {
|
||||
//// return 10;
|
||||
//// }
|
||||
////}
|
||||
////var c/*17iq*/2_i = new c/*17q*/2(/*17*/10);
|
||||
////var c/*18iq*/3_i = new c/*18q*/3(/*18*/);
|
||||
////c2_i./*19*/c2/*20q*/_f1(/*20*/);
|
||||
////c2_i.c2_nc/*21q*/_f1(/*21*/);
|
||||
////c2_i.f/*22q*/1(/*22*/);
|
||||
////c2_i.nc/*23q*/_f1(/*23*/);
|
||||
////c3_i./*24*/c2/*25q*/_f1(/*25*/);
|
||||
////c3_i.c2_nc/*26q*/_f1(/*26*/);
|
||||
////c3_i.f/*27q*/1(/*27*/);
|
||||
////c3_i.nc/*28q*/_f1(/*28*/);
|
||||
////// assign
|
||||
////c2_i = c3_i;
|
||||
////c2_i./*29*/c2/*30q*/_f1(/*30*/);
|
||||
////c2_i.c2_nc_/*31q*/f1(/*31*/);
|
||||
////c2_i.f/*32q*/1(/*32*/);
|
||||
////c2_i.nc/*33q*/_f1(/*33*/);
|
||||
////class c4 extends c2 {
|
||||
////}
|
||||
////var c4/*34iq*/_i = new c/*34q*/4(/*34*/10);
|
||||
/////*35*/
|
||||
////interface i2 {
|
||||
//// /** i2_p1*/
|
||||
//// i2_p1: number;
|
||||
//// /** i2_f1*/
|
||||
//// i2_f1(): void;
|
||||
//// /** i2_l1*/
|
||||
//// i2_l1: () => void;
|
||||
//// i2_nc_p1: number;
|
||||
//// i2_nc_f1(): void;
|
||||
//// i2_nc_l1: () => void;
|
||||
//// /** i2 p1*/
|
||||
//// p1: number;
|
||||
//// /** i2 f1*/
|
||||
//// f1(): void;
|
||||
//// /** i2 l1*/
|
||||
//// l1: () => void;
|
||||
//// nc_p1: number;
|
||||
//// nc_f1(): void;
|
||||
//// nc_l1: () => void;
|
||||
////}
|
||||
////interface i3 extends i2 {
|
||||
//// /** i3 p1*/
|
||||
//// p1: number;
|
||||
//// /** i3 f1*/
|
||||
//// f1(): void;
|
||||
//// /** i3 l1*/
|
||||
//// l1: () => void;
|
||||
//// nc_p1: number;
|
||||
//// nc_f1(): void;
|
||||
//// nc_l1: () => void;
|
||||
////}
|
||||
////var i2/*36iq*/_i: /*51i*/i2;
|
||||
////var i3/*37iq*/_i: i3;
|
||||
////i2_i./*36*/i2/*37q*/_f1(/*37*/);
|
||||
////i2_i.i2_n/*38q*/c_f1(/*38*/);
|
||||
////i2_i.f/*39q*/1(/*39*/);
|
||||
////i2_i.nc/*40q*/_f1(/*40*/);
|
||||
////i2_i.i2_/*l37q*/l1(/*l37*/);
|
||||
////i2_i.i2_nc/*l38q*/_l1(/*l38*/);
|
||||
////i2_i.l/*l39q*/1(/*l39*/);
|
||||
////i2_i.nc_/*l40q*/l1(/*l40*/);
|
||||
////i3_i./*41*/i2_/*42q*/f1(/*42*/);
|
||||
////i3_i.i2_nc/*43q*/_f1(/*43*/);
|
||||
////i3_i.f/*44q*/1(/*44*/);
|
||||
////i3_i.nc_/*45q*/f1(/*45*/);
|
||||
////i3_i.i2_/*l42q*/l1(/*l42*/);
|
||||
////i3_i.i2_nc/*l43q*/_l1(/*l43*/);
|
||||
////i3_i.l/*l44q*/1(/*l44*/);
|
||||
////i3_i.nc_/*l45q*/l1(/*l45*/);
|
||||
////// assign to interface
|
||||
////i2_i = i3_i;
|
||||
////i2_i./*46*/i2/*47q*/_f1(/*47*/);
|
||||
////i2_i.i2_nc_/*48q*/f1(/*48*/);
|
||||
////i2_i.f/*49q*/1(/*49*/);
|
||||
////i2_i.nc/*50q*/_f1(/*50*/);
|
||||
////i2_i.i2_/*l47q*/l1(/*l47*/);
|
||||
////i2_i.i2_nc/*l48q*/_l1(/*l48*/);
|
||||
////i2_i.l/*l49q*/1(/*l49*/);
|
||||
////i2_i.nc_/*l50q*/l1(/*l50*/);
|
||||
/////*51*/
|
||||
/////**c5 class*/
|
||||
////class c5 {
|
||||
//// public b: number;
|
||||
////}
|
||||
////class c6 extends c5 {
|
||||
//// public d;
|
||||
//// const/*57*/ructor() {
|
||||
//// /*52*/super();
|
||||
//// this.d = /*53*/super./*54*/b;
|
||||
//// }
|
||||
////}
|
||||
|
||||
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", "i1_l1");
|
||||
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", "");
|
||||
goTo.marker('2');
|
||||
verify.currentSignatureHelpDocCommentIs("i1_f1");
|
||||
goTo.marker('3');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('4');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('5');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l2');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l3');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l4');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l5');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('1iq');
|
||||
verify.quickInfoIs("(var) i1_i: i1", "");
|
||||
goTo.marker('2q');
|
||||
verify.quickInfoIs("(method) i1.i1_f1(): void", "i1_f1");
|
||||
goTo.marker('3q');
|
||||
verify.quickInfoIs("(method) i1.i1_nc_f1(): void", "");
|
||||
goTo.marker('4q');
|
||||
verify.quickInfoIs("(method) i1.f1(): void", "");
|
||||
goTo.marker('5q');
|
||||
verify.quickInfoIs("(method) i1.nc_f1(): void", "");
|
||||
goTo.marker('l2q');
|
||||
verify.quickInfoIs("(property) i1.i1_l1: () => void", "");
|
||||
goTo.marker('l3q');
|
||||
verify.quickInfoIs("(property) i1.i1_nc_l1: () => void", "");
|
||||
goTo.marker('l4q');
|
||||
verify.quickInfoIs("(property) i1.l1: () => void", "");
|
||||
goTo.marker('l5q');
|
||||
verify.quickInfoIs("(property) i1.nc_l1: () => void", "");
|
||||
|
||||
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", "c1_l1");
|
||||
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", "c1_nc_l1");
|
||||
goTo.marker('7');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('8');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('9');
|
||||
verify.currentSignatureHelpDocCommentIs("c1_f1");
|
||||
goTo.marker('10');
|
||||
verify.currentSignatureHelpDocCommentIs("c1_nc_f1");
|
||||
goTo.marker('l7');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l8');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l9');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l10');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('6iq');
|
||||
verify.quickInfoIs("(var) c1_i: c1", "");
|
||||
goTo.marker('7q');
|
||||
verify.quickInfoIs("(method) c1.i1_f1(): void", "");
|
||||
goTo.marker('8q');
|
||||
verify.quickInfoIs("(method) c1.i1_nc_f1(): void", "");
|
||||
goTo.marker('9q');
|
||||
verify.quickInfoIs("(method) c1.f1(): void", "c1_f1");
|
||||
goTo.marker('10q');
|
||||
verify.quickInfoIs("(method) c1.nc_f1(): void", "c1_nc_f1");
|
||||
goTo.marker('l7q');
|
||||
verify.quickInfoIs("(property) c1.i1_l1: () => void", "");
|
||||
goTo.marker('l8q');
|
||||
verify.quickInfoIs("(property) c1.i1_nc_l1: () => void", "");
|
||||
goTo.marker('l9q');
|
||||
verify.quickInfoIs("(property) c1.l1: () => void", "");
|
||||
goTo.marker('l10q');
|
||||
verify.quickInfoIs("(property) c1.nc_l1: () => void", "");
|
||||
|
||||
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", "i1_l1");
|
||||
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", "");
|
||||
goTo.marker('12');
|
||||
verify.currentSignatureHelpDocCommentIs("i1_f1");
|
||||
goTo.marker('13');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('14');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('15');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l12');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l13');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l14');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l15');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('12q');
|
||||
verify.quickInfoIs("(method) i1.i1_f1(): void", "i1_f1");
|
||||
goTo.marker('13q');
|
||||
verify.quickInfoIs("(method) i1.i1_nc_f1(): void", "");
|
||||
goTo.marker('14q');
|
||||
verify.quickInfoIs("(method) i1.f1(): void", "");
|
||||
goTo.marker('15q');
|
||||
verify.quickInfoIs("(method) i1.nc_f1(): void", "");
|
||||
goTo.marker('l12q');
|
||||
verify.quickInfoIs("(property) i1.i1_l1: () => void", "");
|
||||
goTo.marker('l13q');
|
||||
verify.quickInfoIs("(property) i1.i1_nc_l1: () => void", "");
|
||||
goTo.marker('l14q');
|
||||
verify.quickInfoIs("(property) i1.l1: () => void", "");
|
||||
goTo.marker('l15q');
|
||||
verify.quickInfoIs("(property) i1.nc_l1: () => void", "");
|
||||
|
||||
goTo.marker('16');
|
||||
verify.completionListContains("i1", "interface i1", "i1 is interface with properties");
|
||||
verify.completionListContains("i1_i", "(var) i1_i: i1", "");
|
||||
verify.completionListContains("c1", "class c1", "");
|
||||
verify.completionListContains("c1_i", "(var) c1_i: c1", "");
|
||||
|
||||
goTo.marker('16i');
|
||||
verify.completionListContains("i1", "interface i1", "i1 is interface with properties");
|
||||
|
||||
goTo.marker('17iq');
|
||||
verify.quickInfoIs("(var) c2_i: c2", "");
|
||||
goTo.marker('18iq');
|
||||
verify.quickInfoIs("(var) c3_i: c3", "");
|
||||
|
||||
goTo.marker('17');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 constructor");
|
||||
|
||||
goTo.marker('18');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('18sq');
|
||||
verify.quickInfoIs("(constructor) c2(a: number): c2", "c2 constructor");
|
||||
|
||||
goTo.marker('18spropq');
|
||||
verify.quickInfoIs("class c2", "");
|
||||
goTo.marker('18spropProp');
|
||||
verify.quickInfoIs("(property) c2.c2_p1: number", "c2 c2_p1");
|
||||
|
||||
goTo.marker('17q');
|
||||
verify.quickInfoIs("(constructor) c2(a: number): c2", "c2 constructor");
|
||||
goTo.marker('18q');
|
||||
verify.quickInfoIs("(constructor) c3(): c3", "");
|
||||
|
||||
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", "");
|
||||
goTo.marker('20');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 c2_f1");
|
||||
goTo.marker('21');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('22');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 f1");
|
||||
goTo.marker('23');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('20q');
|
||||
verify.quickInfoIs("(method) c2.c2_f1(): void", "c2 c2_f1");
|
||||
goTo.marker('21q');
|
||||
verify.quickInfoIs("(method) c2.c2_nc_f1(): void", "");
|
||||
goTo.marker('22q');
|
||||
verify.quickInfoIs("(method) c2.f1(): void", "c2 f1");
|
||||
goTo.marker('23q');
|
||||
verify.quickInfoIs("(method) c2.nc_f1(): void", "");
|
||||
|
||||
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", "");
|
||||
goTo.marker('25');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 c2_f1");
|
||||
goTo.marker('26');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('27');
|
||||
verify.currentSignatureHelpDocCommentIs("c3 f1");
|
||||
goTo.marker('28');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('25q');
|
||||
verify.quickInfoIs("(method) c2.c2_f1(): void", "c2 c2_f1");
|
||||
goTo.marker('26q');
|
||||
verify.quickInfoIs("(method) c2.c2_nc_f1(): void", "");
|
||||
goTo.marker('27q');
|
||||
verify.quickInfoIs("(method) c3.f1(): void", "c3 f1");
|
||||
goTo.marker('28q');
|
||||
verify.quickInfoIs("(method) c3.nc_f1(): void", "");
|
||||
|
||||
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", "");
|
||||
goTo.marker('30');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 c2_f1");
|
||||
goTo.marker('31');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('32');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 f1");
|
||||
goTo.marker('33');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('30q');
|
||||
verify.quickInfoIs("(method) c2.c2_f1(): void", "c2 c2_f1");
|
||||
goTo.marker('31q');
|
||||
verify.quickInfoIs("(method) c2.c2_nc_f1(): void", "");
|
||||
goTo.marker('32q');
|
||||
verify.quickInfoIs("(method) c2.f1(): void", "c2 f1");
|
||||
goTo.marker('33q');
|
||||
verify.quickInfoIs("(method) c2.nc_f1(): void", "");
|
||||
|
||||
goTo.marker('34');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 constructor");
|
||||
goTo.marker('34iq');
|
||||
verify.quickInfoIs("(var) c4_i: c4", "");
|
||||
goTo.marker('34q');
|
||||
verify.quickInfoIs("(constructor) c4(a: number): c4", "c2 constructor");
|
||||
|
||||
goTo.marker('35');
|
||||
verify.completionListContains("c2", "class c2", "");
|
||||
verify.completionListContains("c2_i", "(var) c2_i: c2", "");
|
||||
verify.completionListContains("c3", "class c3", "");
|
||||
verify.completionListContains("c3_i", "(var) c3_i: c3", "");
|
||||
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", "i2_l1");
|
||||
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", "i2 l1");
|
||||
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", "");
|
||||
goTo.marker('37');
|
||||
verify.currentSignatureHelpDocCommentIs("i2_f1");
|
||||
goTo.marker('38');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('39');
|
||||
verify.currentSignatureHelpDocCommentIs("i2 f1");
|
||||
goTo.marker('40');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l37');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l38');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l39');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l40');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('36iq');
|
||||
verify.quickInfoIs("(var) i2_i: i2", "");
|
||||
goTo.marker('37iq');
|
||||
verify.quickInfoIs("(var) i3_i: i3", "");
|
||||
goTo.marker('37q');
|
||||
verify.quickInfoIs("(method) i2.i2_f1(): void", "i2_f1");
|
||||
goTo.marker('38q');
|
||||
verify.quickInfoIs("(method) i2.i2_nc_f1(): void", "");
|
||||
goTo.marker('39q');
|
||||
verify.quickInfoIs("(method) i2.f1(): void", "i2 f1");
|
||||
goTo.marker('40q');
|
||||
verify.quickInfoIs("(method) i2.nc_f1(): void", "");
|
||||
goTo.marker('l37q');
|
||||
verify.quickInfoIs("(property) i2.i2_l1: () => void", "");
|
||||
goTo.marker('l38q');
|
||||
verify.quickInfoIs("(property) i2.i2_nc_l1: () => void", "");
|
||||
goTo.marker('l39q');
|
||||
verify.quickInfoIs("(property) i2.l1: () => void", "");
|
||||
goTo.marker('l40q');
|
||||
verify.quickInfoIs("(property) i2.nc_l1: () => void", "");
|
||||
|
||||
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", "i2_l1");
|
||||
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", "i3 l1");
|
||||
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", "");
|
||||
goTo.marker('42');
|
||||
verify.currentSignatureHelpDocCommentIs("i2_f1");
|
||||
goTo.marker('43');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('44');
|
||||
verify.currentSignatureHelpDocCommentIs("i3 f1");
|
||||
goTo.marker('45');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l42');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l43');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l44');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l45');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('42q');
|
||||
verify.quickInfoIs("(method) i2.i2_f1(): void", "i2_f1");
|
||||
goTo.marker('43q');
|
||||
verify.quickInfoIs("(method) i2.i2_nc_f1(): void", "");
|
||||
goTo.marker('44q');
|
||||
verify.quickInfoIs("(method) i3.f1(): void", "i3 f1");
|
||||
goTo.marker('45q');
|
||||
verify.quickInfoIs("(method) i3.nc_f1(): void", "");
|
||||
goTo.marker('l42q');
|
||||
verify.quickInfoIs("(property) i2.i2_l1: () => void", "");
|
||||
goTo.marker('l43q');
|
||||
verify.quickInfoIs("(property) i2.i2_nc_l1: () => void", "");
|
||||
goTo.marker('l44q');
|
||||
verify.quickInfoIs("(property) i3.l1: () => void", "");
|
||||
goTo.marker('l45q');
|
||||
verify.quickInfoIs("(property) i3.nc_l1: () => void", "");
|
||||
|
||||
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", "i2_l1");
|
||||
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", "i2 l1");
|
||||
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", "");
|
||||
goTo.marker('47');
|
||||
verify.currentSignatureHelpDocCommentIs("i2_f1");
|
||||
goTo.marker('48');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('49');
|
||||
verify.currentSignatureHelpDocCommentIs("i2 f1");
|
||||
goTo.marker('50');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l47');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l48');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l49');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('l50');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
|
||||
goTo.marker('47q');
|
||||
verify.quickInfoIs("(method) i2.i2_f1(): void", "i2_f1");
|
||||
goTo.marker('48q');
|
||||
verify.quickInfoIs("(method) i2.i2_nc_f1(): void", "");
|
||||
goTo.marker('49q');
|
||||
verify.quickInfoIs("(method) i2.f1(): void", "i2 f1");
|
||||
goTo.marker('50q');
|
||||
verify.quickInfoIs("(method) i2.nc_f1(): void", "");
|
||||
goTo.marker('l47q');
|
||||
verify.quickInfoIs("(property) i2.i2_l1: () => void", "");
|
||||
goTo.marker('l48q');
|
||||
verify.quickInfoIs("(property) i2.i2_nc_l1: () => void", "");
|
||||
goTo.marker('l49q');
|
||||
verify.quickInfoIs("(property) i2.l1: () => void", "");
|
||||
goTo.marker('l50q');
|
||||
verify.quickInfoIs("(property) i2.nc_l1: () => void", "");
|
||||
|
||||
goTo.marker('51');
|
||||
verify.completionListContains("i2", "interface i2", "");
|
||||
verify.completionListContains("i2_i", "(var) i2_i: i2", "");
|
||||
verify.completionListContains("i3", "interface i3", "");
|
||||
verify.completionListContains("i3_i", "(var) i3_i: i3", "");
|
||||
|
||||
goTo.marker('51i');
|
||||
verify.completionListContains("i2", "interface i2", "");
|
||||
verify.completionListContains("i3", "interface i3", "");
|
||||
|
||||
goTo.marker('52');
|
||||
verify.quickInfoIs("(constructor) c5(): c5", "");
|
||||
|
||||
goTo.marker('53');
|
||||
verify.quickInfoIs("class c5", "c5 class");
|
||||
|
||||
goTo.marker('54');
|
||||
verify.quickInfoIs("(property) c5.b: number", "");
|
||||
|
||||
goTo.marker('55');
|
||||
verify.quickInfoIs("(constructor) c2(a: number): c2", "c2 constructor");
|
||||
|
||||
goTo.marker('56');
|
||||
verify.quickInfoIs("(constructor) c3(): c3", "");
|
||||
|
||||
goTo.marker('57');
|
||||
verify.quickInfoIs("(constructor) c6(): c6", "");
|
||||
@@ -0,0 +1,264 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////** this is interface 1*/
|
||||
////interface i/*1*/1 {
|
||||
////}
|
||||
////var i1/*2*/_i: i1;
|
||||
////interface nc_/*3*/i1 {
|
||||
////}
|
||||
////var nc_/*4*/i1_i: nc_i1;
|
||||
/////** this is interface 2 with memebers*/
|
||||
////interface i/*5*/2 {
|
||||
//// /** this is x*/
|
||||
//// x: number;
|
||||
//// /** this is foo*/
|
||||
//// foo: (/**param help*/b: number) => string;
|
||||
//// /** this is indexer*/
|
||||
//// [/**string param*/i: string]: number;
|
||||
//// /**new method*/
|
||||
//// new (/** param*/i: i1);
|
||||
//// nc_x: number;
|
||||
//// nc_foo: (b: number) => string;
|
||||
//// [i: number]: number;
|
||||
//// /** this is call signature*/
|
||||
//// (/**paramhelp a*/a: number,/**paramhelp b*/ b: number) : number;
|
||||
//// /** this is fnfoo*/
|
||||
//// fnfoo(/**param help*/b: number): string;
|
||||
//// nc_fnfoo(b: number): string;
|
||||
////}
|
||||
////var i2/*6*/_i: /*34i*/i2;
|
||||
////var i2_i/*7*/_x = i2_i./*8*/x;
|
||||
////var i2_i/*9*/_foo = i2_i.f/*10*/oo;
|
||||
////var i2_i_f/*11*/oo_r = i2_i.f/*12q*/oo(/*12*/30);
|
||||
////var i2_i_i2_/*13*/si = i2/*13q*/_i["hello"];
|
||||
////var i2_i_i2/*14*/_ii = i2/*14q*/_i[30];
|
||||
////var i2_/*15*/i_n = new i2/*16q*/_i(/*16*/i1_i);
|
||||
////var i2_i/*17*/_nc_x = i2_i.n/*18*/c_x;
|
||||
////var i2_i_/*19*/nc_foo = i2_i.n/*20*/c_foo;
|
||||
////var i2_i_nc_f/*21*/oo_r = i2_i.nc/*22q*/_foo(/*22*/30);
|
||||
////var i2/*23*/_i_r = i2/*24q*/_i(/*24*/10, /*25*/20);
|
||||
////var i2_i/*26*/_fnfoo = i2_i.fn/*27*/foo;
|
||||
////var i2_i_/*28*/fnfoo_r = i2_i.fn/*29q*/foo(/*29*/10);
|
||||
////var i2_i/*30*/_nc_fnfoo = i2_i.nc_fn/*31*/foo;
|
||||
////var i2_i_nc_/*32*/fnfoo_r = i2_i.nc/*33q*/_fnfoo(/*33*/10);
|
||||
/////*34*/
|
||||
////interface i3 {
|
||||
//// /** Comment i3 x*/
|
||||
//// x: number;
|
||||
//// /** Function i3 f*/
|
||||
//// f(/**number parameter*/a: number): string;
|
||||
//// /** i3 l*/
|
||||
//// l: (/**comment i3 l b*/b: number) => string;
|
||||
//// nc_x: number;
|
||||
//// nc_f(a: number): string;
|
||||
//// nc_l: (b: number) => string;
|
||||
////}
|
||||
////var i3_i: i3;
|
||||
////i3_i = {
|
||||
//// /*35*/f: /**own f*/ (/**i3_i a*/a: number) => "Hello" + /*36*/a,
|
||||
//// l: this./*37*/f,
|
||||
//// /** own x*/
|
||||
//// x: this.f(/*38*/10),
|
||||
//// nc_x: this.l(/*39*/this.x),
|
||||
//// nc_f: this.f,
|
||||
//// nc_l: this.l
|
||||
////};
|
||||
/////*40*/i/*40q*/3_i./*41*/f(/*42*/10);
|
||||
////i3_i./*43q*/l(/*43*/10);
|
||||
////i3_i.nc_/*44q*/f(/*44*/10);
|
||||
////i3_i.nc/*45q*/_l(/*45*/10);
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("interface i1", "this is interface 1");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("(var) i1_i: i1", "");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("interface nc_i1", "");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs("(var) nc_i1_i: nc_i1", "");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs("interface i2", "this is interface 2 with memebers");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs("(var) i2_i: i2", "");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.quickInfoIs("(var) i2_i_x: number", "");
|
||||
|
||||
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", "");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs("(var) i2_i_foo: (b: number) => string", "");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.quickInfoIs("(property) i2.foo: (b: number) => string", "this is foo");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.quickInfoIs("(var) i2_i_foo_r: string", "");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("param help");
|
||||
goTo.marker('12q');
|
||||
verify.quickInfoIs("(property) i2.foo: (b: number) => string", "");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.quickInfoIs("(var) i2_i_i2_si: number", "");
|
||||
goTo.marker('13q');
|
||||
verify.quickInfoIs("(var) i2_i: i2", "");
|
||||
|
||||
goTo.marker('14');
|
||||
verify.quickInfoIs("(var) i2_i_i2_ii: number", "");
|
||||
goTo.marker('14q');
|
||||
verify.quickInfoIs("(var) i2_i: i2", "");
|
||||
|
||||
goTo.marker('15');
|
||||
verify.quickInfoIs("(var) i2_i_n: any", "");
|
||||
|
||||
goTo.marker('16');
|
||||
verify.currentSignatureHelpDocCommentIs("new method");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("param");
|
||||
goTo.marker('16q');
|
||||
verify.quickInfoIs("(var) i2_i: new i2(i: i1) => any", "new method");
|
||||
|
||||
goTo.marker('17');
|
||||
verify.quickInfoIs("(var) i2_i_nc_x: number", "");
|
||||
|
||||
goTo.marker('18');
|
||||
verify.quickInfoIs("(property) i2.nc_x: number", "");
|
||||
|
||||
goTo.marker('19');
|
||||
verify.quickInfoIs("(var) i2_i_nc_foo: (b: number) => string", "");
|
||||
|
||||
goTo.marker('20');
|
||||
verify.quickInfoIs("(property) i2.nc_foo: (b: number) => string", "");
|
||||
|
||||
goTo.marker('21');
|
||||
verify.quickInfoIs("(var) i2_i_nc_foo_r: string", "");
|
||||
|
||||
goTo.marker('22');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('22q');
|
||||
verify.quickInfoIs("(property) i2.nc_foo: (b: number) => string", "");
|
||||
|
||||
goTo.marker('23');
|
||||
verify.quickInfoIs("(var) i2_i_r: number", "");
|
||||
|
||||
goTo.marker('24');
|
||||
verify.currentSignatureHelpDocCommentIs("this is call signature");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("paramhelp a");
|
||||
goTo.marker('24q');
|
||||
verify.quickInfoIs("(var) i2_i: i2(a: number, b: number) => number", "this is call signature");
|
||||
|
||||
goTo.marker('25');
|
||||
verify.currentSignatureHelpDocCommentIs("this is call signature");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("paramhelp b");
|
||||
|
||||
goTo.marker('26');
|
||||
verify.quickInfoIs("(var) i2_i_fnfoo: (b: number) => string", "");
|
||||
|
||||
goTo.marker('27');
|
||||
verify.quickInfoIs("(method) i2.fnfoo(b: number): string", "this is fnfoo");
|
||||
|
||||
goTo.marker('28');
|
||||
verify.quickInfoIs("(var) i2_i_fnfoo_r: string", "");
|
||||
|
||||
goTo.marker('29');
|
||||
verify.currentSignatureHelpDocCommentIs("this is fnfoo");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("param help");
|
||||
goTo.marker('29q');
|
||||
verify.quickInfoIs("(method) i2.fnfoo(b: number): string", "this is fnfoo");
|
||||
|
||||
goTo.marker('30');
|
||||
verify.quickInfoIs("(var) i2_i_nc_fnfoo: (b: number) => string", "");
|
||||
|
||||
goTo.marker('31');
|
||||
verify.quickInfoIs("(method) i2.nc_fnfoo(b: number): string", "");
|
||||
|
||||
goTo.marker('32');
|
||||
verify.quickInfoIs("(var) i2_i_nc_fnfoo_r: string", "");
|
||||
|
||||
goTo.marker('33');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('33q');
|
||||
verify.quickInfoIs("(method) i2.nc_fnfoo(b: number): string", "");
|
||||
|
||||
goTo.marker('34');
|
||||
verify.completionListContains("i1", "interface i1", "this is interface 1");
|
||||
verify.completionListContains("i1_i", "(var) i1_i: i1", "");
|
||||
verify.completionListContains("nc_i1", "interface nc_i1", "");
|
||||
verify.completionListContains("nc_i1_i", "(var) nc_i1_i: nc_i1", "");
|
||||
verify.completionListContains("i2", "interface i2", "this is interface 2 with memebers");
|
||||
verify.completionListContains("i2_i", "(var) i2_i: i2", "");
|
||||
verify.completionListContains("i2_i_x", "(var) i2_i_x: number", "");
|
||||
verify.completionListContains("i2_i_foo", "(var) i2_i_foo: (b: number) => string", "");
|
||||
verify.completionListContains("i2_i_foo_r", "(var) i2_i_foo_r: string", "");
|
||||
verify.completionListContains("i2_i_i2_si", "(var) i2_i_i2_si: number", "");
|
||||
verify.completionListContains("i2_i_i2_ii", "(var) i2_i_i2_ii: number", "");
|
||||
verify.completionListContains("i2_i_n", "(var) i2_i_n: any", "");
|
||||
verify.completionListContains("i2_i_nc_x", "(var) i2_i_nc_x: number", "");
|
||||
verify.completionListContains("i2_i_nc_foo", "(var) i2_i_nc_foo: (b: number) => string", "");
|
||||
verify.completionListContains("i2_i_nc_foo_r", "(var) i2_i_nc_foo_r: string", "");
|
||||
verify.completionListContains("i2_i_r", "(var) i2_i_r: number", "");
|
||||
verify.completionListContains("i2_i_fnfoo", "(var) i2_i_fnfoo: (b: number) => string", "");
|
||||
verify.completionListContains("i2_i_fnfoo_r", "(var) i2_i_fnfoo_r: string", "");
|
||||
verify.completionListContains("i2_i_nc_fnfoo", "(var) i2_i_nc_fnfoo: (b: number) => string", "");
|
||||
verify.completionListContains("i2_i_nc_fnfoo_r", "(var) i2_i_nc_fnfoo_r: string", "");
|
||||
|
||||
goTo.marker('34i');
|
||||
verify.completionListContains("i1", "interface i1", "this is interface 1");
|
||||
verify.completionListContains("nc_i1", "interface nc_i1", "");
|
||||
verify.completionListContains("i2", "interface i2", "this is interface 2 with memebers");
|
||||
|
||||
goTo.marker('36');
|
||||
verify.completionListContains("a", "(parameter) a: number", "i3_i a");
|
||||
|
||||
goTo.marker('40q');
|
||||
verify.quickInfoIs("(var) i3_i: i3", "");
|
||||
goTo.marker('40');
|
||||
verify.completionListContains("i3", "interface i3", "");
|
||||
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", "i3 l");
|
||||
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", "");
|
||||
|
||||
goTo.marker('42');
|
||||
verify.currentSignatureHelpDocCommentIs("Function i3 f");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("number parameter");
|
||||
|
||||
goTo.marker('43');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("comment i3 l b");
|
||||
goTo.marker('43q');
|
||||
verify.quickInfoIs("(property) i3.l: (b: number) => string", "");
|
||||
|
||||
goTo.marker('44');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('44q');
|
||||
verify.quickInfoIs("(method) i3.nc_f(a: number): string", "");
|
||||
|
||||
goTo.marker('45');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('45q');
|
||||
verify.quickInfoIs("(property) i3.nc_l: (b: number) => string", "");
|
||||
@@ -0,0 +1,251 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////** Module comment*/
|
||||
////module m/*1*/1 {
|
||||
//// /** b's comment*/
|
||||
//// export var b: number;
|
||||
//// /** foo's comment*/
|
||||
//// function foo() {
|
||||
//// return /*2*/b;
|
||||
//// }
|
||||
//// /** m2 comments*/
|
||||
//// export module m2 {
|
||||
//// /** class comment;*/
|
||||
//// export class c {
|
||||
//// };
|
||||
//// /** i*/
|
||||
//// export var i = new c();
|
||||
//// }
|
||||
//// /** exported function*/
|
||||
//// export function fooExport() {
|
||||
//// return fo/*3q*/o(/*3*/);
|
||||
//// }
|
||||
////}
|
||||
/////*4*/m1./*5*/fooExport(/*6*/);
|
||||
////var my/*7*/var = new m1.m2./*8*/c();
|
||||
/////** module comment of m2.m3*/
|
||||
////module m2.m3 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
////}
|
||||
////new /*9*/m2./*10*/m3./*11*/c();
|
||||
/////** module comment of m3.m4.m5*/
|
||||
////module m3.m4.m5 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
////}
|
||||
////new /*12*/m3./*13*/m4./*14*/m5./*15*/c();
|
||||
/////** module comment of m4.m5.m6*/
|
||||
////module m4.m5.m6 {
|
||||
//// export module m7 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
////new /*16*/m4./*17*/m5./*18*/m6./*19*/m7./*20*/c();
|
||||
/////** module comment of m5.m6.m7*/
|
||||
////module m5.m6.m7 {
|
||||
//// /** module m8 comment*/
|
||||
//// export module m8 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
////new /*21*/m5./*22*/m6./*23*/m7./*24*/m8./*25*/c();
|
||||
////module m6.m7 {
|
||||
//// export module m8 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
////new /*26*/m6./*27*/m7./*28*/m8./*29*/c();
|
||||
////module m7.m8 {
|
||||
//// /** module m9 comment*/
|
||||
//// export module m9 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
////new /*30*/m7./*31*/m8./*32*/m9./*33*/c();
|
||||
////declare module "quotedM" {
|
||||
//// export class c {
|
||||
//// }
|
||||
//// export var b: /*34*/c;
|
||||
////}
|
||||
////module complexM {
|
||||
//// export module m1 {
|
||||
//// export class c {
|
||||
//// public foo() {
|
||||
//// return 30;
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//// export module m2 {
|
||||
//// export class c {
|
||||
//// public foo2() {
|
||||
//// return new complexM.m1.c();
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
////var myComp/*35*/lexVal = new compl/*36*/exM.m/*37*/2./*38*/c().f/*39*/oo2().f/*40*/oo();
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("module m1", "Module comment");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains("b", "(var) m1.b: number", "b's comment");
|
||||
verify.completionListContains("foo", "(function) foo(): number", "foo's comment");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.currentSignatureHelpDocCommentIs("foo's comment");
|
||||
goTo.marker('3q');
|
||||
verify.quickInfoIs("(function) foo(): number", "foo's comment");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.completionListContains("m1", "module m1", "Module 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", "module m1.m2");
|
||||
verify.quickInfoIs("(function) m1.fooExport(): number", "exported function");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.currentSignatureHelpDocCommentIs("exported function");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.quickInfoIs("(var) myvar: m1.m2.c", "");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.quickInfoIs("(constructor) m1.m2.c(): m1.m2.c", "");
|
||||
verify.memberListContains("c", "class m1.m2.c", "class comment;");
|
||||
verify.memberListContains("i", "(var) m1.m2.i: m1.m2.c", "i");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.completionListContains("m2", "module m2", "");
|
||||
verify.quickInfoIs("module m2", "");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.memberListContains("m3", "module m2.m3");
|
||||
verify.quickInfoIs("module m2.m3", "module comment of m2.m3");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.quickInfoIs("(constructor) m2.m3.c(): m2.m3.c", "");
|
||||
verify.memberListContains("c", "class m2.m3.c", "Exported class comment");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.completionListContains("m3", "module m3", "");
|
||||
verify.quickInfoIs("module m3", "");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.memberListContains("m4", "module m3.m4", "");
|
||||
verify.quickInfoIs("module m3.m4", "");
|
||||
|
||||
goTo.marker('14');
|
||||
verify.memberListContains("m5", "module m3.m4.m5");
|
||||
verify.quickInfoIs("module m3.m4.m5", "module comment of m3.m4.m5");
|
||||
|
||||
goTo.marker('15');
|
||||
verify.memberListContains("c", "class m3.m4.m5.c", "Exported class comment");
|
||||
verify.quickInfoIs("(constructor) m3.m4.m5.c(): m3.m4.m5.c", "");
|
||||
|
||||
goTo.marker('16');
|
||||
verify.completionListContains("m4", "module m4", "");
|
||||
verify.quickInfoIs("module m4", "");
|
||||
|
||||
goTo.marker('17');
|
||||
verify.memberListContains("m5", "module m4.m5", "");
|
||||
verify.quickInfoIs("module m4.m5", "");
|
||||
|
||||
goTo.marker('18');
|
||||
verify.memberListContains("m6", "module m4.m5.m6");
|
||||
verify.quickInfoIs("module m4.m5.m6", "module comment of m4.m5.m6");
|
||||
|
||||
goTo.marker('19');
|
||||
verify.memberListContains("m7", "module m4.m5.m6.m7");
|
||||
verify.quickInfoIs("module m4.m5.m6.m7", "");
|
||||
|
||||
goTo.marker('20');
|
||||
verify.memberListContains("c", "class m4.m5.m6.m7.c", "Exported class comment");
|
||||
verify.quickInfoIs("(constructor) m4.m5.m6.m7.c(): m4.m5.m6.m7.c", "");
|
||||
|
||||
goTo.marker('21');
|
||||
verify.completionListContains("m5", "module m5");
|
||||
verify.quickInfoIs("module m5", "");
|
||||
|
||||
goTo.marker('22');
|
||||
verify.memberListContains("m6", "module m5.m6");
|
||||
verify.quickInfoIs("module m5.m6", "");
|
||||
|
||||
goTo.marker('23');
|
||||
verify.memberListContains("m7", "module m5.m6.m7");
|
||||
verify.quickInfoIs("module m5.m6.m7", "module comment of m5.m6.m7");
|
||||
|
||||
goTo.marker('24');
|
||||
verify.memberListContains("m8", "module m5.m6.m7.m8");
|
||||
verify.quickInfoIs("module m5.m6.m7.m8", "module m8 comment");
|
||||
|
||||
goTo.marker('25');
|
||||
verify.memberListContains("c", "class m5.m6.m7.m8.c", "Exported class comment");
|
||||
verify.quickInfoIs("(constructor) m5.m6.m7.m8.c(): m5.m6.m7.m8.c", "");
|
||||
|
||||
goTo.marker('26');
|
||||
verify.completionListContains("m6", "module m6");
|
||||
verify.quickInfoIs("module m6", "");
|
||||
|
||||
goTo.marker('27');
|
||||
verify.memberListContains("m7", "module m6.m7");
|
||||
verify.quickInfoIs("module m6.m7", "");
|
||||
|
||||
goTo.marker('28');
|
||||
verify.memberListContains("m8", "module m6.m7.m8");
|
||||
verify.quickInfoIs("module m6.m7.m8", "");
|
||||
|
||||
goTo.marker('29');
|
||||
verify.memberListContains("c", "class m6.m7.m8.c", "Exported class comment");
|
||||
verify.quickInfoIs("(constructor) m6.m7.m8.c(): m6.m7.m8.c", "");
|
||||
|
||||
goTo.marker('30');
|
||||
verify.completionListContains("m7", "module m7");
|
||||
verify.quickInfoIs("module m7", "");
|
||||
|
||||
goTo.marker('31');
|
||||
verify.memberListContains("m8", "module m7.m8");
|
||||
verify.quickInfoIs("module m7.m8", "");
|
||||
|
||||
goTo.marker('32');
|
||||
verify.memberListContains("m9", "module m7.m8.m9");
|
||||
verify.quickInfoIs("module m7.m8.m9", "module m9 comment");
|
||||
|
||||
goTo.marker('33');
|
||||
verify.memberListContains("c", "class m7.m8.m9.c", "Exported class comment");
|
||||
verify.quickInfoIs("(constructor) m7.m8.m9.c(): m7.m8.m9.c", "");
|
||||
|
||||
goTo.marker('34');
|
||||
verify.completionListContains("c", 'class c', "");
|
||||
verify.quickInfoIs('class c', "");
|
||||
|
||||
goTo.marker('35');
|
||||
verify.quickInfoIs("(var) myComplexVal: number", "");
|
||||
|
||||
goTo.marker('36');
|
||||
verify.quickInfoIs("module complexM", "");
|
||||
|
||||
goTo.marker('37');
|
||||
verify.quickInfoIs("module complexM.m2", "");
|
||||
|
||||
goTo.marker('38');
|
||||
verify.quickInfoIs("(constructor) complexM.m2.c(): complexM.m2.c", "");
|
||||
|
||||
goTo.marker('39');
|
||||
verify.quickInfoIs("(method) complexM.m2.c.foo2(): complexM.m1.c", "");
|
||||
|
||||
goTo.marker('40');
|
||||
verify.quickInfoIs("(method) complexM.m1.c.foo(): number", "");
|
||||
@@ -0,0 +1,54 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: commentsMultiModuleMultiFile_0.ts
|
||||
/////** this is multi declare module*/
|
||||
////module mult/*3*/iM {
|
||||
//// /** class b*/
|
||||
//// export class b {
|
||||
//// }
|
||||
////}
|
||||
/////** thi is multi module 2*/
|
||||
////module mu/*2*/ltiM {
|
||||
//// /** class c comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////new /*1*/mu/*4*/ltiM.b();
|
||||
////new mu/*5*/ltiM.c();
|
||||
|
||||
// @Filename: commentsMultiModuleMultiFile_1.ts
|
||||
/////** this is multi module 3 comment*/
|
||||
////module mu/*6*/ltiM {
|
||||
//// /** class d comment*/
|
||||
//// export class d {
|
||||
//// }
|
||||
////}
|
||||
////new /*7*/mu/*8*/ltiM.d();
|
||||
|
||||
// this line triggers a semantic/syntactic error check, remove line when 788570 is fixed
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("multiM", "module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.completionListContains("multiM", "module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
@@ -0,0 +1,35 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////** this is multi declare module*/
|
||||
////module mult/*3*/iM {
|
||||
//// /** class b*/
|
||||
//// export class b {
|
||||
//// }
|
||||
////}
|
||||
/////** thi is multi module 2*/
|
||||
////module mu/*2*/ltiM {
|
||||
//// /** class c comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////new /*1*/mu/*4*/ltiM.b();
|
||||
////new mu/*5*/ltiM.c();
|
||||
|
||||
// this line triggers a semantic/syntactic error check, remove line when 788570 is fixed
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("multiM", "module multiM", "this is multi declare module\nthi is multi module 2");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2");
|
||||
+150
-146
@@ -226,15 +226,15 @@
|
||||
////foo(null);
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "this is signature 1", "f1", "function");
|
||||
verify.quickInfoIs("(function) f1(a: number): number (+1 overload)", "this is signature 1");
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "f1", "function");
|
||||
verify.quickInfoIs("(function) f1(b: string): number (+1 overload)", "");
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "this is signature 1", "f1", "function");
|
||||
verify.quickInfoIs("(function) f1(a: number): number (+1 overload)", "this is signature 1");
|
||||
goTo.marker('4q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "f1", "function");
|
||||
verify.quickInfoIs("(function) f1(b: string): number (+1 overload)", "");
|
||||
goTo.marker('o4q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "this is signature 1", "f1", "function");
|
||||
verify.quickInfoIs("(function) f1(a: number): number (+1 overload)", "this is signature 1");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
@@ -244,15 +244,15 @@ verify.currentSignatureHelpDocCommentIs("this is signature 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("param a");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "f2", "function");
|
||||
verify.quickInfoIs("(function) f2(a: number): number (+1 overload)", "");
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "this is signature 2", "f2", "function");
|
||||
verify.quickInfoIs("(function) f2(b: string): number (+1 overload)", "this is signature 2");
|
||||
goTo.marker('7');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "f2", "function");
|
||||
verify.quickInfoIs("(function) f2(a: number): number (+1 overload)", "");
|
||||
goTo.marker('8q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "this is signature 2", "f2", "function");
|
||||
verify.quickInfoIs("(function) f2(b: string): number (+1 overload)", "this is signature 2");
|
||||
goTo.marker('o8q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "f2", "function");
|
||||
verify.quickInfoIs("(function) f2(a: number): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.currentSignatureHelpDocCommentIs("this is signature 2");
|
||||
@@ -263,15 +263,15 @@ verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("param a");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "f3", "function");
|
||||
verify.quickInfoIs("(function) f3(a: number): number (+1 overload)", "");
|
||||
goTo.marker('10');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "f3", "function");
|
||||
verify.quickInfoIs("(function) f3(b: string): number (+1 overload)", "");
|
||||
goTo.marker('11');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "f3", "function");
|
||||
verify.quickInfoIs("(function) f3(a: number): number (+1 overload)", "");
|
||||
goTo.marker('12q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "f3", "function");
|
||||
verify.quickInfoIs("(function) f3(b: string): number (+1 overload)", "");
|
||||
goTo.marker('o12q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "f3", "function");
|
||||
verify.quickInfoIs("(function) f3(a: number): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
@@ -282,15 +282,15 @@ verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "this is signature 4 - with number parameter", "f4", "function");
|
||||
verify.quickInfoIs("(function) f4(a: number): number (+1 overload)", "this is signature 4 - with number parameter");
|
||||
goTo.marker('14');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "this is signature 4 - with string parameter", "f4", "function");
|
||||
verify.quickInfoIs("(function) f4(b: string): number (+1 overload)", "this is signature 4 - with string parameter");
|
||||
goTo.marker('15');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "this is signature 4 - with number parameter", "f4", "function");
|
||||
verify.quickInfoIs("(function) f4(a: number): number (+1 overload)", "this is signature 4 - with number parameter");
|
||||
goTo.marker('16q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "this is signature 4 - with string parameter", "f4", "function");
|
||||
verify.quickInfoIs("(function) f4(b: string): number (+1 overload)", "this is signature 4 - with string parameter");
|
||||
goTo.marker('o16q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "this is signature 4 - with number parameter", "f4", "function");
|
||||
verify.quickInfoIs("(function) f4(a: number): number (+1 overload)", "this is signature 4 - with number parameter");
|
||||
|
||||
goTo.marker('16');
|
||||
verify.currentSignatureHelpDocCommentIs("this is signature 4 - with string parameter");
|
||||
@@ -301,433 +301,437 @@ verify.currentSignatureHelpDocCommentIs("this is signature 4 - with number param
|
||||
verify.currentParameterHelpArgumentDocCommentIs("param a");
|
||||
|
||||
goTo.marker('17');
|
||||
verify.completionListContains('f1', '(a: number): number (+ 1 overload(s))', 'this is signature 1', "f1", "function");
|
||||
verify.completionListContains('f2', '(a: number): number (+ 1 overload(s))', '', "f2", "function");
|
||||
verify.completionListContains('f3', '(a: number): number (+ 1 overload(s))', '', "f3", "function");
|
||||
verify.completionListContains('f4', '(a: number): number (+ 1 overload(s))', 'this is signature 4 - with number parameter', "f4", "function");
|
||||
verify.completionListContains('f1', '(function) f1(a: number): number (+1 overload)', 'this is signature 1');
|
||||
verify.completionListContains('f2', '(function) f2(a: number): number (+1 overload)', '');
|
||||
verify.completionListContains('f3', '(function) f3(a: number): number (+1 overload)', '');
|
||||
verify.completionListContains('f4', '(function) f4(a: number): number (+1 overload)', 'this is signature 4 - with number parameter');
|
||||
|
||||
goTo.marker('18');
|
||||
verify.completionListContains('i1', 'i1', '', "i1", "interface");
|
||||
verify.completionListContains('i1_i', 'i1', '', "i1_i", "var");
|
||||
verify.completionListContains('i2', 'i2', '', "i2", "interface");
|
||||
verify.completionListContains('i2_i', 'i2', '', "i2_i", "var");
|
||||
verify.completionListContains('i3', 'i3', '', "i3", "interface");
|
||||
verify.completionListContains('i3_i', 'i3', '', "i3_i","var");
|
||||
verify.completionListContains('i4', 'i4', '', "i4", "interface");
|
||||
verify.completionListContains('i4_i', 'i4', '', "i4_i", "var");
|
||||
verify.completionListContains('i1', 'interface i1', '');
|
||||
verify.completionListContains('i1_i', '(var) i1_i: new i1(b: number) => any (+1 overload)', '');
|
||||
verify.completionListContains('i2', 'interface i2', '');
|
||||
verify.completionListContains('i2_i', '(var) i2_i: new i2(a: string) => any (+1 overload)', '');
|
||||
verify.completionListContains('i3', 'interface i3', '');
|
||||
verify.completionListContains('i3_i', '(var) i3_i: new i3(a: string) => any (+1 overload)', 'new 1');
|
||||
verify.completionListContains('i4', 'interface i4', '');
|
||||
verify.completionListContains('i4_i', '(var) i4_i: new i4(a: string) => any (+1 overload)', '');
|
||||
|
||||
goTo.marker('19');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('19q');
|
||||
verify.quickInfoIs("(b: number): any (+ 1 overload(s))", "", "i1", "constructor");
|
||||
verify.quickInfoIs("(var) i1_i: new i1(b: number) => any (+1 overload)", "");
|
||||
|
||||
goTo.marker('20');
|
||||
verify.currentSignatureHelpDocCommentIs("new 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('20q');
|
||||
verify.quickInfoIs("(a: string): any (+ 1 overload(s))", "new 1", "i1", "constructor");
|
||||
verify.quickInfoIs("(var) i1_i: new i1(a: string) => any (+1 overload)", "new 1");
|
||||
|
||||
goTo.marker('21');
|
||||
verify.currentSignatureHelpDocCommentIs("this signature 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("param a");
|
||||
goTo.marker('21q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "this signature 1", "i1", "function");
|
||||
verify.quickInfoIs("(var) i1_i: i1(a: number) => number (+1 overload)", "this signature 1");
|
||||
|
||||
goTo.marker('22');
|
||||
verify.currentSignatureHelpDocCommentIs("this is signature 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('22q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "this is signature 2", "i1", "function");
|
||||
verify.quickInfoIs("(var) i1_i: i1(b: string) => number (+1 overload)", "this is signature 2");
|
||||
|
||||
goTo.marker('23');
|
||||
verify.memberListContains('foo', '(a: number): number (+ 1 overload(s))', 'foo 1', "i1.foo", "method");
|
||||
verify.memberListContains('foo2', '(a: number): number (+ 1 overload(s))', '', "i1.foo2", "method");
|
||||
verify.memberListContains('foo3', '(a: number): number (+ 1 overload(s))', '', "i1.foo3", "method");
|
||||
verify.memberListContains('foo4', '(a: number): number (+ 1 overload(s))', 'foo4 1', "i1.foo4", "method");
|
||||
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');
|
||||
|
||||
goTo.marker('24');
|
||||
verify.currentSignatureHelpDocCommentIs("foo 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('24q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "foo 1", "i1.foo", "method");
|
||||
verify.quickInfoIs("(method) i1.foo(a: number): number (+1 overload)", "foo 1");
|
||||
|
||||
goTo.marker('25');
|
||||
verify.currentSignatureHelpDocCommentIs("foo 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('25q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "foo 2", "i1.foo", "method");
|
||||
verify.quickInfoIs("(method) i1.foo(b: string): number (+1 overload)", "foo 2");
|
||||
|
||||
goTo.marker('26');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('26q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "i1.foo2", "method");
|
||||
verify.quickInfoIs("(method) i1.foo2(a: number): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('27');
|
||||
verify.currentSignatureHelpDocCommentIs("foo2 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('27q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "foo2 2", "i1.foo2", "method");
|
||||
verify.quickInfoIs("(method) i1.foo2(b: string): number (+1 overload)", "foo2 2");
|
||||
|
||||
goTo.marker('28');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('28q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "i1.foo3", "method");
|
||||
verify.quickInfoIs("(method) i1.foo3(a: number): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('29');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('29q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "i1.foo3", "method");
|
||||
verify.quickInfoIs("(method) i1.foo3(b: string): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('30');
|
||||
verify.currentSignatureHelpDocCommentIs("foo4 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('30q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "foo4 1", "i1.foo4", "method");
|
||||
verify.quickInfoIs("(method) i1.foo4(a: number): number (+1 overload)", "foo4 1");
|
||||
|
||||
goTo.marker('31');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('31q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "i1.foo4", "method");
|
||||
verify.quickInfoIs("(method) i1.foo4(b: string): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('32');
|
||||
verify.currentSignatureHelpDocCommentIs("new 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('32q');
|
||||
verify.quickInfoIs("(b: number): any (+ 1 overload(s))", "new 2", "i2", "constructor");
|
||||
verify.quickInfoIs("(var) i2_i: new i2(b: number) => any (+1 overload)", "new 2");
|
||||
|
||||
goTo.marker('33');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('33q');
|
||||
verify.quickInfoIs("(a: string): any (+ 1 overload(s))", "", "i2", "constructor");
|
||||
verify.quickInfoIs("(var) i2_i: new i2(a: string) => any (+1 overload)", "");
|
||||
|
||||
goTo.marker('34');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('34q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "i2", "function");
|
||||
verify.quickInfoIs("(var) i2_i: i2(a: number) => number (+1 overload)", "");
|
||||
|
||||
goTo.marker('35');
|
||||
verify.currentSignatureHelpDocCommentIs("this is signature 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('35q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "this is signature 2", "i2", "function");
|
||||
verify.quickInfoIs("(var) i2_i: i2(b: string) => number (+1 overload)", "this is signature 2");
|
||||
|
||||
goTo.marker('36');
|
||||
verify.currentSignatureHelpDocCommentIs("new 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('36q');
|
||||
verify.quickInfoIs("(b: number): any (+ 1 overload(s))", "new 2", "i3", "constructor");
|
||||
verify.quickInfoIs("(var) i3_i: new i3(b: number) => any (+1 overload)", "new 2");
|
||||
|
||||
goTo.marker('37');
|
||||
verify.currentSignatureHelpDocCommentIs("new 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('37q');
|
||||
verify.quickInfoIs("(a: string): any (+ 1 overload(s))", "new 1", "i3", "constructor");
|
||||
verify.quickInfoIs("(var) i3_i: new i3(a: string) => any (+1 overload)", "new 1");
|
||||
|
||||
goTo.marker('38');
|
||||
verify.currentSignatureHelpDocCommentIs("this is signature 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('38q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "this is signature 1", "i3", "function");
|
||||
verify.quickInfoIs("(var) i3_i: i3(a: number) => number (+1 overload)", "this is signature 1");
|
||||
|
||||
goTo.marker('39');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('39q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "i3", "function");
|
||||
verify.quickInfoIs("(var) i3_i: i3(b: string) => number (+1 overload)", "");
|
||||
|
||||
goTo.marker('40');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('40q');
|
||||
verify.quickInfoIs("(b: number): any (+ 1 overload(s))", "", "i4", "constructor");
|
||||
verify.quickInfoIs("(var) i4_i: new i4(b: number) => any (+1 overload)", "");
|
||||
|
||||
goTo.marker('41');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('41q');
|
||||
verify.quickInfoIs("(a: string): any (+ 1 overload(s))", "", "i4", "constructor");
|
||||
verify.quickInfoIs("(var) i4_i: new i4(a: string) => any (+1 overload)", "");
|
||||
|
||||
goTo.marker('42');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('42q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "i4", "function");
|
||||
verify.quickInfoIs("(var) i4_i: i4(a: number) => number (+1 overload)", "");
|
||||
|
||||
goTo.marker('43');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('43q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "i4", "function");
|
||||
verify.quickInfoIs("(var) i4_i: i4(b: string) => number (+1 overload)", "");
|
||||
|
||||
goTo.marker('44');
|
||||
verify.memberListContains('prop1', '(a: number): number (+ 1 overload(s))', '', "c.prop1", "method");
|
||||
verify.memberListContains('prop2', '(a: number): number (+ 1 overload(s))', 'prop2 1', "c.prop2", "method");
|
||||
verify.memberListContains('prop3', '(a: number): number (+ 1 overload(s))', '', "c.prop3", "method");
|
||||
verify.memberListContains('prop4', '(a: number): number (+ 1 overload(s))', 'prop4 1', "c.prop4", "method");
|
||||
verify.memberListContains('prop5', '(a: number): number (+ 1 overload(s))', 'prop5 1', "c.prop5", "method");
|
||||
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');
|
||||
|
||||
goTo.marker('45');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('45q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "c.prop1", "method");
|
||||
verify.quickInfoIs("(method) c.prop1(a: number): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('46');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('46q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "c.prop1", "method");
|
||||
verify.quickInfoIs("(method) c.prop1(b: string): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('47');
|
||||
verify.currentSignatureHelpDocCommentIs("prop2 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('47q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "prop2 1", "c.prop2", "method");
|
||||
verify.quickInfoIs("(method) c.prop2(a: number): number (+1 overload)", "prop2 1");
|
||||
|
||||
goTo.marker('48');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('48q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "c.prop2", "method");
|
||||
verify.quickInfoIs("(method) c.prop2(b: string): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('49');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('49q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "c.prop3", "method");
|
||||
verify.quickInfoIs("(method) c.prop3(a: number): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('50');
|
||||
verify.currentSignatureHelpDocCommentIs("prop3 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('50q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "prop3 2", "c.prop3", "method");
|
||||
verify.quickInfoIs("(method) c.prop3(b: string): number (+1 overload)", "prop3 2");
|
||||
|
||||
goTo.marker('51');
|
||||
verify.currentSignatureHelpDocCommentIs("prop4 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('51q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "prop4 1", "c.prop4", "method");
|
||||
verify.quickInfoIs("(method) c.prop4(a: number): number (+1 overload)", "prop4 1");
|
||||
|
||||
goTo.marker('52');
|
||||
verify.currentSignatureHelpDocCommentIs("prop4 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('52q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "prop4 2", "c.prop4", "method");
|
||||
verify.quickInfoIs("(method) c.prop4(b: string): number (+1 overload)", "prop4 2");
|
||||
|
||||
goTo.marker('53');
|
||||
verify.currentSignatureHelpDocCommentIs("prop5 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('53q');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "prop5 1", "c.prop5", "method");
|
||||
verify.quickInfoIs("(method) c.prop5(a: number): number (+1 overload)", "prop5 1");
|
||||
|
||||
goTo.marker('54');
|
||||
verify.currentSignatureHelpDocCommentIs("prop5 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('54q');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "prop5 2", "c.prop5", "method");
|
||||
verify.quickInfoIs("(method) c.prop5(b: string): number (+1 overload)", "prop5 2");
|
||||
|
||||
goTo.marker('55');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('55q');
|
||||
verify.quickInfoIs("(a: number): c1 (+ 1 overload(s))", "", "c1", "constructor");
|
||||
verify.quickInfoIs("(constructor) c1(a: number): c1 (+1 overload)", "");
|
||||
|
||||
goTo.marker('56');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('56q');
|
||||
verify.quickInfoIs("(b: string): c1 (+ 1 overload(s))", "", "c1", "constructor");
|
||||
verify.quickInfoIs("(constructor) c1(b: string): c1 (+1 overload)", "");
|
||||
|
||||
goTo.marker('57');
|
||||
verify.currentSignatureHelpDocCommentIs("c2 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('57q');
|
||||
verify.quickInfoIs("(a: number): c2 (+ 1 overload(s))", "c2 1", "c2", "constructor");
|
||||
verify.quickInfoIs("(constructor) c2(a: number): c2 (+1 overload)", "c2 1");
|
||||
|
||||
goTo.marker('58');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('58q');
|
||||
verify.quickInfoIs("(b: string): c2 (+ 1 overload(s))", "", "c2", "constructor");
|
||||
verify.quickInfoIs("(constructor) c2(b: string): c2 (+1 overload)", "");
|
||||
|
||||
goTo.marker('59');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('59q');
|
||||
verify.quickInfoIs("(a: number): c3 (+ 1 overload(s))", "", "c3", "constructor");
|
||||
verify.quickInfoIs("(constructor) c3(a: number): c3 (+1 overload)", "");
|
||||
|
||||
goTo.marker('60');
|
||||
verify.currentSignatureHelpDocCommentIs("c3 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('60q');
|
||||
verify.quickInfoIs("(b: string): c3 (+ 1 overload(s))", "c3 2", "c3", "constructor");
|
||||
verify.quickInfoIs("(constructor) c3(b: string): c3 (+1 overload)", "c3 2");
|
||||
|
||||
goTo.marker('61');
|
||||
verify.currentSignatureHelpDocCommentIs("c4 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('61q');
|
||||
verify.quickInfoIs("(a: number): c4 (+ 1 overload(s))", "c4 1", "c4", "constructor");
|
||||
verify.quickInfoIs("(constructor) c4(a: number): c4 (+1 overload)", "c4 1");
|
||||
|
||||
goTo.marker('62');
|
||||
verify.currentSignatureHelpDocCommentIs("c4 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('62q');
|
||||
verify.quickInfoIs("(b: string): c4 (+ 1 overload(s))", "c4 2", "c4", "constructor");
|
||||
verify.quickInfoIs("(constructor) c4(b: string): c4 (+1 overload)", "c4 2");
|
||||
|
||||
goTo.marker('63');
|
||||
verify.currentSignatureHelpDocCommentIs("c5 1");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('63q');
|
||||
verify.quickInfoIs("(a: number): c5 (+ 1 overload(s))", "c5 1", "c5", "constructor");
|
||||
verify.quickInfoIs("(constructor) c5(a: number): c5 (+1 overload)", "c5 1");
|
||||
|
||||
goTo.marker('64');
|
||||
verify.currentSignatureHelpDocCommentIs("c5 2");
|
||||
verify.currentParameterHelpArgumentDocCommentIs("");
|
||||
goTo.marker('64q');
|
||||
verify.quickInfoIs("(b: string): c5 (+ 1 overload(s))", "c5 2", "c5", "constructor");
|
||||
verify.quickInfoIs("(constructor) c5(b: string): c5 (+1 overload)", "c5 2");
|
||||
|
||||
goTo.marker('65');
|
||||
verify.completionListContains("c", undefined, "", "c", "class");
|
||||
verify.completionListContains("c1", undefined, "", "c1", "class");
|
||||
verify.completionListContains("c2", undefined, "", "c2", "class");
|
||||
verify.completionListContains("c3", undefined, "", "c3", "class");
|
||||
verify.completionListContains("c4", undefined, "", "c4", "class");
|
||||
verify.completionListContains("c5", undefined, "", "c5", "class");
|
||||
verify.completionListContains("c_i", "c", "", "c_i", "var");
|
||||
verify.completionListContains("c1_i_1", "c1", "", "c1_i_1", "var");
|
||||
verify.completionListContains("c2_i_1", "c2", "", "c2_i_1", "var");
|
||||
verify.completionListContains("c3_i_1", "c3", "", "c3_i_1", "var");
|
||||
verify.completionListContains("c4_i_1", "c4", "", "c4_i_1", "var");
|
||||
verify.completionListContains("c5_i_1", "c5", "", "c5_i_1", "var");
|
||||
verify.completionListContains("c1_i_2", "c1", "", "c1_i_2", "var");
|
||||
verify.completionListContains("c2_i_2", "c2", "", "c2_i_2", "var");
|
||||
verify.completionListContains("c3_i_2", "c3", "", "c3_i_2", "var");
|
||||
verify.completionListContains("c4_i_2", "c4", "", "c4_i_2", "var");
|
||||
verify.completionListContains("c5_i_2", "c5", "", "c5_i_2", "var");
|
||||
verify.completionListContains('multiOverload', '(a: number): string (+ 2 overload(s))', 'This is multiOverload F1 1', "multiOverload", "function");
|
||||
verify.completionListContains('ambientF1', '(a: number): string (+ 2 overload(s))', 'This is ambient F1 1', "ambientF1", "function");
|
||||
//verify.completionListContains("c", "class c", "");
|
||||
// the below check is wrong and it should show it as class but currently we have a bug for adding the parameters of ambient function in the symbol list
|
||||
// eg declare function foo2(x: number);
|
||||
// completion list here
|
||||
verify.completionListContains("c", "(parameter) c: boolean", "");
|
||||
verify.completionListContains("c1", "class c1", "");
|
||||
verify.completionListContains("c2", "class c2", "");
|
||||
verify.completionListContains("c3", "class c3", "");
|
||||
verify.completionListContains("c4", "class c4", "");
|
||||
verify.completionListContains("c5", "class c5", "");
|
||||
verify.completionListContains("c_i", "(var) c_i: c", "");
|
||||
verify.completionListContains("c1_i_1", "(var) c1_i_1: c1", "");
|
||||
verify.completionListContains("c2_i_1", "(var) c2_i_1: c2", "");
|
||||
verify.completionListContains("c3_i_1", "(var) c3_i_1: c3", "");
|
||||
verify.completionListContains("c4_i_1", "(var) c4_i_1: c4", "");
|
||||
verify.completionListContains("c5_i_1", "(var) c5_i_1: c5", "");
|
||||
verify.completionListContains("c1_i_2", "(var) c1_i_2: c1", "");
|
||||
verify.completionListContains("c2_i_2", "(var) c2_i_2: c2", "");
|
||||
verify.completionListContains("c3_i_2", "(var) c3_i_2: c3", "");
|
||||
verify.completionListContains("c4_i_2", "(var) c4_i_2: c4", "");
|
||||
verify.completionListContains("c5_i_2", "(var) c5_i_2: c5", "");
|
||||
verify.completionListContains('multiOverload', '(function) multiOverload(a: number): string (+2 overloads)', 'This is multiOverload F1 1');
|
||||
verify.completionListContains('ambientF1', '(function) ambientF1(a: number): string (+2 overloads)', 'This is ambient F1 1');
|
||||
|
||||
goTo.marker('66');
|
||||
verify.quickInfoIs("c1", "", "c1_i_1", "var");
|
||||
verify.quickInfoIs("(var) c1_i_1: c1", "");
|
||||
goTo.marker('67');
|
||||
verify.quickInfoIs("c2", "", "c2_i_2", "var");
|
||||
verify.quickInfoIs("(var) c2_i_2: c2", "");
|
||||
goTo.marker('68');
|
||||
verify.quickInfoIs("c3", "", "c3_i_2", "var");
|
||||
verify.quickInfoIs("(var) c3_i_2: c3", "");
|
||||
goTo.marker('69');
|
||||
verify.quickInfoIs("c4", "", "c4_i_1", "var");
|
||||
verify.quickInfoIs("(var) c4_i_1: c4", "");
|
||||
goTo.marker('70');
|
||||
verify.quickInfoIs("c5", "", "c5_i_1", "var");
|
||||
verify.quickInfoIs("(var) c5_i_1: c5", "");
|
||||
|
||||
goTo.marker('71');
|
||||
verify.quickInfoIs("(a: number): string (+ 2 overload(s))", "This is multiOverload F1 1", "multiOverload", "function");
|
||||
verify.quickInfoIs("(function) multiOverload(a: number): string (+2 overloads)", "This is multiOverload F1 1");
|
||||
goTo.marker('72');
|
||||
verify.quickInfoIs("(b: string): string (+ 2 overload(s))", "This is multiOverload F1 2", "multiOverload", "function");
|
||||
verify.quickInfoIs("(function) multiOverload(b: string): string (+2 overloads)", "This is multiOverload F1 2");
|
||||
goTo.marker('73');
|
||||
verify.quickInfoIs("(c: boolean): string (+ 2 overload(s))", "This is multiOverload F1 3", "multiOverload", "function");
|
||||
verify.quickInfoIs("(function) multiOverload(c: boolean): string (+2 overloads)", "This is multiOverload F1 3");
|
||||
|
||||
goTo.marker('74');
|
||||
verify.quickInfoIs("(a: number): string (+ 2 overload(s))", "This is ambient F1 1", "ambientF1", "function");
|
||||
verify.quickInfoIs("(function) ambientF1(a: number): string (+2 overloads)", "This is ambient F1 1");
|
||||
goTo.marker('75');
|
||||
verify.quickInfoIs("(b: string): string (+ 2 overload(s))", "This is ambient F1 2", "ambientF1", "function");
|
||||
verify.quickInfoIs("(function) ambientF1(b: string): string (+2 overloads)", "This is ambient F1 2");
|
||||
goTo.marker('76');
|
||||
verify.quickInfoIs("(c: boolean): boolean (+ 2 overload(s))", "This is ambient F1 3", "ambientF1", "function");
|
||||
verify.quickInfoIs("(function) ambientF1(c: boolean): boolean (+2 overloads)", "This is ambient F1 3");
|
||||
|
||||
goTo.marker('77');
|
||||
verify.quickInfoIs("i3", "", "aa", "parameter");
|
||||
verify.quickInfoIs("(parameter) aa: i3", "");
|
||||
|
||||
goTo.marker('78');
|
||||
verify.quickInfoIs("(a: number): c1 (+ 1 overload(s))", "", "c1", "constructor");
|
||||
verify.quickInfoIs("(constructor) c1(a: number): c1 (+1 overload)", "");
|
||||
|
||||
goTo.marker('79');
|
||||
verify.quickInfoIs("(b: string): c1 (+ 1 overload(s))", "", "c1", "constructor");
|
||||
verify.quickInfoIs("(constructor) c1(b: string): c1 (+1 overload)", "");
|
||||
|
||||
goTo.marker('80');
|
||||
verify.quickInfoIs("(a: number): c1 (+ 1 overload(s))", "", "c1", "constructor");
|
||||
verify.quickInfoIs("(constructor) c1(a: number): c1 (+1 overload)", "");
|
||||
|
||||
goTo.marker('81');
|
||||
verify.quickInfoIs("(a: number): c2 (+ 1 overload(s))", "c2 1", "c2", "constructor");
|
||||
verify.quickInfoIs("(constructor) c2(a: number): c2 (+1 overload)", "c2 1");
|
||||
|
||||
goTo.marker('82');
|
||||
verify.quickInfoIs("(b: string): c2 (+ 1 overload(s))", "", "c2", "constructor");
|
||||
verify.quickInfoIs("(constructor) c2(b: string): c2 (+1 overload)", "");
|
||||
|
||||
goTo.marker('83');
|
||||
verify.quickInfoIs("(a: number): c2 (+ 1 overload(s))", "c2 1", "c2", "constructor");
|
||||
verify.quickInfoIs("(constructor) c2(a: number): c2 (+1 overload)", "c2 1");
|
||||
|
||||
goTo.marker('84');
|
||||
verify.quickInfoIs("(a: number): c3 (+ 1 overload(s))", "", "c3", "constructor");
|
||||
verify.quickInfoIs("(constructor) c3(a: number): c3 (+1 overload)", "");
|
||||
|
||||
goTo.marker('85');
|
||||
verify.quickInfoIs("(b: string): c3 (+ 1 overload(s))", "c3 2", "c3", "constructor");
|
||||
verify.quickInfoIs("(constructor) c3(b: string): c3 (+1 overload)", "c3 2");
|
||||
|
||||
goTo.marker('86');
|
||||
verify.quickInfoIs("(a: number): c3 (+ 1 overload(s))", "", "c3", "constructor");
|
||||
verify.quickInfoIs("(constructor) c3(a: number): c3 (+1 overload)", "");
|
||||
|
||||
goTo.marker('87');
|
||||
verify.quickInfoIs("(a: number): c4 (+ 1 overload(s))", "c4 1", "c4", "constructor");
|
||||
verify.quickInfoIs("(constructor) c4(a: number): c4 (+1 overload)", "c4 1");
|
||||
|
||||
goTo.marker('88');
|
||||
verify.quickInfoIs("(b: string): c4 (+ 1 overload(s))", "c4 2", "c4", "constructor");
|
||||
verify.quickInfoIs("(constructor) c4(b: string): c4 (+1 overload)", "c4 2");
|
||||
|
||||
goTo.marker('89');
|
||||
verify.quickInfoIs("(a: number): c4 (+ 1 overload(s))", "c4 1", "c4", "constructor");
|
||||
verify.quickInfoIs("(constructor) c4(a: number): c4 (+1 overload)", "c4 1");
|
||||
|
||||
goTo.marker('90');
|
||||
verify.quickInfoIs("(a: number): c5 (+ 1 overload(s))", "c5 1", "c5", "constructor");
|
||||
verify.quickInfoIs("(constructor) c5(a: number): c5 (+1 overload)", "c5 1");
|
||||
|
||||
goTo.marker('91');
|
||||
verify.quickInfoIs("(b: string): c5 (+ 1 overload(s))", "c5 2", "c5", "constructor");
|
||||
verify.quickInfoIs("(constructor) c5(b: string): c5 (+1 overload)", "c5 2");
|
||||
|
||||
goTo.marker('92');
|
||||
verify.quickInfoIs("(a: number): c5 (+ 1 overload(s))", "c5 1", "c5", "constructor");
|
||||
verify.quickInfoIs("(constructor) c5(a: number): c5 (+1 overload)", "c5 1");
|
||||
|
||||
goTo.marker('93');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "c.prop1", "method");
|
||||
verify.quickInfoIs("(method) c.prop1(a: number): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('94');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "c.prop1", "method");
|
||||
verify.quickInfoIs("(method) c.prop1(b: string): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('95');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "c.prop1", "method");
|
||||
verify.quickInfoIs("(method) c.prop1(a: number): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('96');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "prop2 1", "c.prop2", "method");
|
||||
verify.quickInfoIs("(method) c.prop2(a: number): number (+1 overload)", "prop2 1");
|
||||
|
||||
goTo.marker('97');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "", "c.prop2", "method");
|
||||
verify.quickInfoIs("(method) c.prop2(b: string): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('98');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "prop2 1", "c.prop2", "method");
|
||||
verify.quickInfoIs("(method) c.prop2(a: number): number (+1 overload)", "prop2 1");
|
||||
|
||||
goTo.marker('99');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "c.prop3", "method");
|
||||
verify.quickInfoIs("(method) c.prop3(a: number): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('100');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "prop3 2", "c.prop3", "method");
|
||||
verify.quickInfoIs("(method) c.prop3(b: string): number (+1 overload)", "prop3 2");
|
||||
|
||||
goTo.marker('101');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "", "c.prop3", "method");
|
||||
verify.quickInfoIs("(method) c.prop3(a: number): number (+1 overload)", "");
|
||||
|
||||
goTo.marker('102');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "prop4 1", "c.prop4", "method");
|
||||
verify.quickInfoIs("(method) c.prop4(a: number): number (+1 overload)", "prop4 1");
|
||||
|
||||
goTo.marker('103');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "prop4 2", "c.prop4", "method");
|
||||
verify.quickInfoIs("(method) c.prop4(b: string): number (+1 overload)", "prop4 2");
|
||||
|
||||
goTo.marker('104');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "prop4 1", "c.prop4", "method");
|
||||
verify.quickInfoIs("(method) c.prop4(a: number): number (+1 overload)", "prop4 1");
|
||||
|
||||
goTo.marker('105');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "prop5 1", "c.prop5", "method");
|
||||
verify.quickInfoIs("(method) c.prop5(a: number): number (+1 overload)", "prop5 1");
|
||||
|
||||
goTo.marker('106');
|
||||
verify.quickInfoIs("(b: string): number (+ 1 overload(s))", "prop5 2", "c.prop5", "method");
|
||||
verify.quickInfoIs("(method) c.prop5(b: string): number (+1 overload)", "prop5 2");
|
||||
|
||||
goTo.marker('107');
|
||||
verify.quickInfoIs("(a: number): number (+ 1 overload(s))", "prop5 1", "c.prop5", "method");
|
||||
verify.quickInfoIs("(method) c.prop5(a: number): number (+1 overload)", "prop5 1");
|
||||
@@ -0,0 +1,100 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////** This is my variable*/
|
||||
////var myV/*1*/ariable = 10;
|
||||
/////*2*/
|
||||
/////** d variable*/
|
||||
////var d = 10;
|
||||
////myVariable = d;
|
||||
/////*3*/
|
||||
/////** foos comment*/
|
||||
////function foo() {
|
||||
////}
|
||||
/////** fooVar comment*/
|
||||
////var foo/*12*/Var: () => void;
|
||||
/////*4*/
|
||||
////f/*5q*/oo(/*5*/);
|
||||
////fo/*6q*/oVar(/*6*/);
|
||||
////fo/*13*/oVar = f/*14*/oo;
|
||||
/////*7*/
|
||||
////f/*8q*/oo(/*8*/);
|
||||
////foo/*9q*/Var(/*9*/);
|
||||
////var fooVarVar = /*9aq*/fooVar;
|
||||
/////**class comment*/
|
||||
////class c {
|
||||
//// /** constructor comment*/
|
||||
//// constructor() {
|
||||
//// }
|
||||
////}
|
||||
/////**instance comment*/
|
||||
////var i = new c();
|
||||
/////*10*/
|
||||
/////** interface comments*/
|
||||
////interface i1 {
|
||||
////}
|
||||
/////**interface instance comments*/
|
||||
////var i1_i: i1;
|
||||
/////*11*/
|
||||
////function foo2(a: number): void;
|
||||
////function foo2(b: string): void;
|
||||
////function foo2(aOrb) {
|
||||
////}
|
||||
////var x = fo/*15*/o2;
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("(var) myVariable: number", "This is my variable");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains("myVariable", "(var) myVariable: number", "This is my variable");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.completionListContains("myVariable", "(var) myVariable: number", "This is my variable");
|
||||
verify.completionListContains("d", "(var) d: number", "d variable");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.completionListContains("foo", "(function) foo(): void", "foos comment");
|
||||
verify.completionListContains("fooVar", "(var) fooVar: () => void", "fooVar comment");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.currentSignatureHelpDocCommentIs("foos comment");
|
||||
goTo.marker('5q');
|
||||
verify.quickInfoIs("(function) foo(): void", "foos comment");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('6q');
|
||||
verify.quickInfoIs("(var) fooVar: () => void", "");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.completionListContains("foo", "(function) foo(): void", "foos comment");
|
||||
verify.completionListContains("fooVar", "(var) fooVar: () => void", "fooVar comment");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.currentSignatureHelpDocCommentIs("foos comment");
|
||||
goTo.marker('8q');
|
||||
verify.quickInfoIs("(function) foo(): void", "foos comment");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.currentSignatureHelpDocCommentIs("");
|
||||
goTo.marker('9q');
|
||||
verify.quickInfoIs("(var) fooVar: () => void", "");
|
||||
goTo.marker('9aq');
|
||||
verify.quickInfoIs("(var) fooVar: () => void", "fooVar comment");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.completionListContains("i", "(var) i: c", "instance comment");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.completionListContains("i1_i", "(var) i1_i: i1", "interface instance comments");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.quickInfoIs("(var) fooVar: () => void", "fooVar comment");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.quickInfoIs("(var) fooVar: () => void", "fooVar comment");
|
||||
|
||||
goTo.marker('14');
|
||||
verify.quickInfoIs("(function) foo(): void", "foos comment");
|
||||
|
||||
goTo.marker('15');
|
||||
verify.quickInfoIs("(function) foo2(a: number): void (+1 overload)", "");
|
||||
+1
-1
@@ -15,7 +15,7 @@ fs.edit.insert("A");
|
||||
// Bring up completion to force a pull resolve. This will end up resolving several symbols and
|
||||
// producing unreported diagnostics (i.e. that 'V' wasn't found).
|
||||
fs.verify.completionListContains("T");
|
||||
fs.verify.completionEntryDetailIs("T", "T");
|
||||
fs.verify.completionEntryDetailIs("T", "(type parameter) T in <T>(x: any): void");
|
||||
|
||||
// There should now be a single error.
|
||||
fs.verify.numberOfErrorsInCurrentFile(1);
|
||||
@@ -6,4 +6,4 @@ diagnostics.setEditValidation(IncrementalEditValidation.None);
|
||||
goTo.marker();
|
||||
verify.not.completionListIsEmpty();
|
||||
edit.insert("nu");
|
||||
verify.completionListContains("number", undefined, undefined, undefined, "keyword");
|
||||
verify.completionListContains("number", undefined, undefined, "keyword");
|
||||
@@ -12,10 +12,10 @@
|
||||
////f2./*2*/ // here bar has return type any, but bar2 is Foo2
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains('bar', '() => IFoo');
|
||||
verify.completionListContains('bar', '(method) IFoo.bar(): IFoo');
|
||||
verify.not.completionListContains('bar2');
|
||||
edit.insert('bar();'); // just to make the file valid before checking next completion location
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains('bar', '() => IFoo');
|
||||
verify.completionListContains('bar2', '() => IFoo2');
|
||||
verify.completionListContains('bar', '(method) IFoo.bar(): IFoo');
|
||||
verify.completionListContains('bar2', '(method) IFoo2.bar2(): IFoo2');
|
||||
@@ -7,4 +7,4 @@
|
||||
////i/**/
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains('i', 'Iterator<string, number>', '', 'i');
|
||||
verify.completionListContains('i', '(var) i: Iterator<string, number>');
|
||||
@@ -8,4 +8,4 @@
|
||||
////fnc1./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains('arguments', 'any');
|
||||
verify.memberListContains('arguments', '(property) Function.arguments: any');
|
||||
@@ -24,9 +24,7 @@ goTo.marker("insideFunctionExpression");
|
||||
verify.memberListContains("foo");
|
||||
|
||||
goTo.marker("referenceInsideFunctionExpression");
|
||||
verify.quickInfoIs("() => number");
|
||||
verify.quickInfoIs("(local function) foo(): number");
|
||||
|
||||
goTo.marker("referenceInGlobalScope");
|
||||
verify.quickInfoIs("(a: number) => string");
|
||||
|
||||
|
||||
verify.quickInfoIs("(function) foo(a: number): string");
|
||||
@@ -0,0 +1,11 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function f(a: { xa: number; xb: number; }) { }
|
||||
////var xc;
|
||||
////f({
|
||||
//// /**/
|
||||
|
||||
goTo.marker()
|
||||
verify.memberListContains('xa');
|
||||
verify.memberListContains('xb');
|
||||
verify.memberListCount(2);
|
||||
@@ -6,4 +6,4 @@
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains("elem", "string");
|
||||
verify.completionListContains("elem", "(parameter) elem: string");
|
||||
@@ -10,5 +10,5 @@
|
||||
////object./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("bar", 'any');
|
||||
verify.memberListContains("foo", '(bar: any) => any');
|
||||
verify.memberListContains("bar", '(property) bar: any');
|
||||
verify.memberListContains("foo", '(method) foo(bar: any): any');
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
////a./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains('length', "number", /*docComments*/ undefined, /*fullSymbolName*/ undefined,/*kind*/ "property");
|
||||
verify.memberListContains('toString', "() => string", /*docComments*/ undefined, /*fullSymbolName*/ undefined,/*kind*/ "method");
|
||||
verify.memberListContains('length', "(property) Array<number>.length: number", /*docComments*/ undefined, /*kind*/ "property");
|
||||
verify.memberListContains('toString', "(method) Array<number>.toString(): string", /*docComments*/ undefined, /*kind*/ "method");
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
verify.memberListContains("x", undefined, undefined, undefined ,/*kind: */ "alias");
|
||||
verify.memberListContains("x", "(alias) x", undefined);
|
||||
|
||||
goTo.marker("2");
|
||||
verify.memberListContains("value");
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
//// module Foo { var testing = ""; test/**/ }
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains('testing', 'string');
|
||||
verify.completionListContains('testing', '(var) testing: string');
|
||||
+20
-17
@@ -261,15 +261,8 @@ function sharedNegativeVerify()
|
||||
verify.not.completionListContains('mod2eexvar');
|
||||
}
|
||||
|
||||
function goToMarkAndVerifyShadow(marker: string)
|
||||
function goToMarkAndVerifyShadow()
|
||||
{
|
||||
goTo.marker(marker);
|
||||
|
||||
verify.completionListContains('shwvar', 'string');
|
||||
verify.completionListContains('shwfn', '(shadow: any): void');
|
||||
verify.completionListContains('shwcls', 'shwcls');
|
||||
verify.completionListContains('shwint', 'shwint');
|
||||
|
||||
sharedNegativeVerify();
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
@@ -284,20 +277,30 @@ function goToMarkAndVerifyShadow(marker: string)
|
||||
}
|
||||
|
||||
// from a shadow module with no export
|
||||
goToMarkAndVerifyShadow('shadowModuleWithNoExport');
|
||||
goTo.marker('shadowModuleWithNoExport');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: string');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(shadow: any): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
goToMarkAndVerifyShadow();
|
||||
|
||||
// from a shadow module with export
|
||||
goToMarkAndVerifyShadow('shadowModuleWithExport');
|
||||
goTo.marker('shadowModuleWithExport');
|
||||
verify.completionListContains('shwvar', '(var) mod4.shwvar: string');
|
||||
verify.completionListContains('shwfn', '(function) mod4.shwfn(shadow: any): void');
|
||||
verify.completionListContains('shwcls', 'class mod4.shwcls');
|
||||
verify.completionListContains('shwint', 'interface mod4.shwint');
|
||||
goToMarkAndVerifyShadow();
|
||||
|
||||
// from a modlue with import
|
||||
goTo.marker('moduleWithImport');
|
||||
verify.completionListContains('mod1', 'mod1');
|
||||
verify.completionListContains('mod2', 'mod2');
|
||||
verify.completionListContains('mod3', 'mod3');
|
||||
verify.completionListContains('shwvar', 'number');
|
||||
verify.completionListContains('shwfn', '(): void');
|
||||
verify.completionListContains('shwcls', 'shwcls');
|
||||
verify.completionListContains('shwint', 'shwint');
|
||||
verify.completionListContains('mod1', 'module mod1');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
sharedNegativeVerify();
|
||||
|
||||
+53
-53
@@ -229,23 +229,23 @@ function goToMarkAndGeneralVerify(marker: string)
|
||||
{
|
||||
goTo.marker(marker);
|
||||
|
||||
verify.completionListContains('mod1var', 'number');
|
||||
verify.completionListContains('mod1fn', '(): void');
|
||||
verify.completionListContains('mod1cls', 'mod1cls');
|
||||
verify.completionListContains('mod1int', 'mod1int');
|
||||
verify.completionListContains('mod1mod', 'mod1mod');
|
||||
verify.completionListContains('mod1evar', 'number');
|
||||
verify.completionListContains('mod1efn', '(): void');
|
||||
verify.completionListContains('mod1ecls', 'mod1ecls');
|
||||
verify.completionListContains('mod1eint', 'mod1eint');
|
||||
verify.completionListContains('mod1emod', 'mod1emod');
|
||||
verify.completionListContains('mod1eexvar', 'number');
|
||||
verify.completionListContains('mod2', 'mod2');
|
||||
verify.completionListContains('mod3', 'mod3');
|
||||
verify.completionListContains('shwvar', 'number');
|
||||
verify.completionListContains('shwfn', '(): void');
|
||||
verify.completionListContains('shwcls', 'shwcls');
|
||||
verify.completionListContains('shwint', 'shwint');
|
||||
verify.completionListContains('mod1var', '(var) mod1var: number');
|
||||
verify.completionListContains('mod1fn', '(function) mod1fn(): void');
|
||||
verify.completionListContains('mod1cls', 'class mod1cls');
|
||||
verify.completionListContains('mod1int', 'interface mod1int');
|
||||
verify.completionListContains('mod1mod', 'module mod1mod');
|
||||
verify.completionListContains('mod1evar', '(var) mod1.mod1evar: number');
|
||||
verify.completionListContains('mod1efn', '(function) mod1.mod1efn(): void');
|
||||
verify.completionListContains('mod1ecls', 'class mod1.mod1ecls');
|
||||
verify.completionListContains('mod1eint', 'interface mod1.mod1eint');
|
||||
verify.completionListContains('mod1emod', 'module mod1.mod1emod');
|
||||
verify.completionListContains('mod1eexvar', '(var) mod1.mod1eexvar: number');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
@@ -276,8 +276,8 @@ goToMarkAndGeneralVerify('mod1');
|
||||
|
||||
// from function in mod1
|
||||
goToMarkAndGeneralVerify('function');
|
||||
verify.completionListContains('bar', 'number');
|
||||
verify.completionListContains('foob', '(): void');
|
||||
verify.completionListContains('bar', '(local var) bar: number');
|
||||
verify.completionListContains('foob', '(local function) foob(): void');
|
||||
|
||||
// from class in mod1
|
||||
goToMarkAndGeneralVerify('class');
|
||||
@@ -289,21 +289,21 @@ goToMarkAndGeneralVerify('interface');
|
||||
|
||||
// from module in mod1
|
||||
goToMarkAndGeneralVerify('module');
|
||||
verify.completionListContains('m1X', 'number');
|
||||
verify.completionListContains('m1Func', '(): void');
|
||||
verify.completionListContains('m1Class', 'm1Class');
|
||||
verify.completionListContains('m1Int', 'm1Int');
|
||||
verify.completionListContains('m1Mod', 'm1Mod');
|
||||
verify.completionListContains('m1eX', 'number');
|
||||
verify.completionListContains('m1eFunc', '(): void');
|
||||
verify.completionListContains('m1eClass', 'm1eClass');
|
||||
verify.completionListContains('m1eInt', 'm1eInt');
|
||||
verify.completionListContains('m1eMod', 'm1eMod');
|
||||
verify.completionListContains('m1X', '(var) m1X: number');
|
||||
verify.completionListContains('m1Func', '(function) m1Func(): void');
|
||||
verify.completionListContains('m1Class', 'class m1Class');
|
||||
verify.completionListContains('m1Int', 'interface m1Int');
|
||||
verify.completionListContains('m1Mod', 'module m1Mod');
|
||||
verify.completionListContains('m1eX', '(var) mod1mod.m1eX: number');
|
||||
verify.completionListContains('m1eFunc', '(function) mod1mod.m1eFunc(): void');
|
||||
verify.completionListContains('m1eClass', 'class mod1mod.m1eClass');
|
||||
verify.completionListContains('m1eInt', 'interface mod1mod.m1eInt');
|
||||
verify.completionListContains('m1eMod', 'module mod1mod.m1eMod');
|
||||
|
||||
// from exported function in mod1
|
||||
goToMarkAndGeneralVerify('exportedFunction');
|
||||
verify.completionListContains('bar', 'number');
|
||||
verify.completionListContains('foob', '(): void');
|
||||
verify.completionListContains('bar', '(local var) bar: number');
|
||||
verify.completionListContains('foob', '(local function) foob(): void');
|
||||
|
||||
// from exported class in mod1
|
||||
goToMarkAndGeneralVerify('exportedClass');
|
||||
@@ -315,31 +315,31 @@ goToMarkAndGeneralVerify('exportedInterface');
|
||||
|
||||
// from exported module in mod1
|
||||
goToMarkAndGeneralVerify('exportedModule');
|
||||
verify.completionListContains('mX', 'number');
|
||||
verify.completionListContains('mFunc', '(): void');
|
||||
verify.completionListContains('mClass', 'mClass');
|
||||
verify.completionListContains('mInt', 'mInt');
|
||||
verify.completionListContains('mMod', 'mMod');
|
||||
verify.completionListContains('meX', 'number');
|
||||
verify.completionListContains('meFunc', '(): void');
|
||||
verify.completionListContains('meClass', 'meClass');
|
||||
verify.completionListContains('meInt', 'meInt');
|
||||
verify.completionListContains('meMod', 'meMod');
|
||||
verify.completionListContains('mX', '(var) mX: number');
|
||||
verify.completionListContains('mFunc', '(function) mFunc(): void');
|
||||
verify.completionListContains('mClass', 'class mClass');
|
||||
verify.completionListContains('mInt', 'interface mInt');
|
||||
verify.completionListContains('mMod', 'module mMod');
|
||||
verify.completionListContains('meX', '(var) mod1.mod1emod.meX: number');
|
||||
verify.completionListContains('meFunc', '(function) mod1.mod1emod.meFunc(): void');
|
||||
verify.completionListContains('meClass', 'class mod1.mod1emod.meClass');
|
||||
verify.completionListContains('meInt', 'interface mod1.mod1emod.meInt');
|
||||
verify.completionListContains('meMod', 'module mod1.mod1emod.meMod');
|
||||
|
||||
// from extended module
|
||||
goTo.marker('extendedModule');
|
||||
verify.completionListContains('mod1evar', 'number');
|
||||
verify.completionListContains('mod1efn', '(): void');
|
||||
verify.completionListContains('mod1ecls', 'mod1ecls');
|
||||
verify.completionListContains('mod1eint', 'mod1eint');
|
||||
verify.completionListContains('mod1emod', 'mod1emod');
|
||||
verify.completionListContains('mod1eexvar', 'number');
|
||||
verify.completionListContains('mod2', 'mod2');
|
||||
verify.completionListContains('mod3', 'mod3');
|
||||
verify.completionListContains('shwvar', 'number');
|
||||
verify.completionListContains('shwfn', '(): void');
|
||||
verify.completionListContains('shwcls', 'shwcls');
|
||||
verify.completionListContains('shwint', 'shwint');
|
||||
verify.completionListContains('mod1evar', '(var) mod1.mod1evar: number');
|
||||
verify.completionListContains('mod1efn', '(function) mod1.mod1efn(): void');
|
||||
verify.completionListContains('mod1ecls', 'class mod1.mod1ecls');
|
||||
verify.completionListContains('mod1eint', 'interface mod1.mod1eint');
|
||||
verify.completionListContains('mod1emod', 'module mod1.mod1emod');
|
||||
verify.completionListContains('mod1eexvar', '(var) mod1.mod1eexvar: number');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
+9
-9
@@ -260,13 +260,13 @@ function goToMarkAndGeneralVerify(marker: string)
|
||||
|
||||
// from global scope
|
||||
goToMarkAndGeneralVerify('global');
|
||||
verify.completionListContains('mod1', 'mod1');
|
||||
verify.completionListContains('mod2', 'mod2');
|
||||
verify.completionListContains('mod3', 'mod3');
|
||||
verify.completionListContains('shwvar', 'number');
|
||||
verify.completionListContains('shwfn', '(): void');
|
||||
verify.completionListContains('shwcls', 'shwcls');
|
||||
verify.completionListContains('shwint', 'shwint');
|
||||
verify.completionListContains('mod1', 'module mod1');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verifyNotContainFunctionMembers();
|
||||
verifyNotContainClassMembers();
|
||||
@@ -274,8 +274,8 @@ verifyNotContainInterfaceMembers();
|
||||
|
||||
// from function scope
|
||||
goToMarkAndGeneralVerify('function');
|
||||
verify.completionListContains('sfvar', 'number');
|
||||
verify.completionListContains('sffn', '(): void');
|
||||
verify.completionListContains('sfvar', '(local var) sfvar: number');
|
||||
verify.completionListContains('sffn', '(local function) sffn(): void');
|
||||
|
||||
verifyNotContainClassMembers();
|
||||
verifyNotContainInterfaceMembers();
|
||||
+5
-5
@@ -238,10 +238,10 @@ function goToMarkerAndVerify(marker: string)
|
||||
verify.completionListContains('mod1');
|
||||
verify.completionListContains('mod2');
|
||||
verify.completionListContains('mod3');
|
||||
verify.completionListContains('shwvar', 'number');
|
||||
verify.completionListContains('shwfn', '(): void');
|
||||
verify.completionListContains('shwcls', 'shwcls');
|
||||
verify.completionListContains('shwint', 'shwint');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
@@ -272,4 +272,4 @@ goToMarkerAndVerify('extendedClass');
|
||||
goToMarkerAndVerify('objectLiteral');
|
||||
|
||||
goTo.marker('localVar');
|
||||
verify.completionListContains('shwvar', 'string');
|
||||
verify.completionListContains('shwvar', '(local var) shwvar: string');
|
||||
@@ -7,10 +7,10 @@
|
||||
////var x/*3*/3 = new SS;
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('SS<number>');
|
||||
verify.quickInfoIs('(var) x1: SS<number>');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('SS<{}>');
|
||||
verify.quickInfoIs('(var) x2: SS<{}>');
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('SS<{}>');
|
||||
verify.quickInfoIs('(var) x3: SS<{}>');
|
||||
+110
-110
@@ -198,222 +198,222 @@
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("(i: number, s: string) => number");
|
||||
verify.quickInfoIs("(property) C1T5.foo: (i: number, s: string) => number");
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) i: number");
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) i: number");
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs("(i: number, s: string) => number");
|
||||
verify.quickInfoIs("(var) C2T5.foo: (i: number, s: string) => number");
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) i: number");
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) i: number");
|
||||
goTo.marker('7');
|
||||
verify.quickInfoIs("(s: string) => string");
|
||||
verify.quickInfoIs("(var) c3t1: (s: string) => string");
|
||||
goTo.marker('8');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) s: any");
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) s: any");
|
||||
goTo.marker('10');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(var) c3t2: IFoo");
|
||||
goTo.marker('11');
|
||||
verify.quickInfoIs("number[]");
|
||||
verify.quickInfoIs("(var) c3t3: number[]");
|
||||
goTo.marker('12');
|
||||
verify.quickInfoIs("() => IFoo");
|
||||
verify.quickInfoIs("(var) c3t4: () => IFoo");
|
||||
goTo.marker('13');
|
||||
verify.quickInfoIs("(n: number) => IFoo");
|
||||
verify.quickInfoIs("(var) c3t5: (n: number) => IFoo");
|
||||
goTo.marker('14');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('15');
|
||||
verify.quickInfoIs("(n: number, s: string) => IFoo");
|
||||
verify.quickInfoIs("(var) c3t6: (n: number, s: string) => IFoo");
|
||||
goTo.marker('16');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('17');
|
||||
verify.quickInfoIs("string");
|
||||
verify.quickInfoIs("(parameter) s: string");
|
||||
goTo.marker('18');
|
||||
verify.quickInfoIs("(n: number): number (+ 1 overload(s))");
|
||||
verify.quickInfoIs("(var) c3t7: {\n (n: number): number;\n (s1: string): number;\n}");
|
||||
goTo.marker('20');
|
||||
verify.quickInfoIs("(n: number, s: string) => number");
|
||||
verify.quickInfoIs("(var) c3t8: (n: number, s: string) => number");
|
||||
goTo.marker('21');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('22');
|
||||
verify.quickInfoIs("number[][]");
|
||||
verify.quickInfoIs("(var) c3t9: number[][]");
|
||||
goTo.marker('23');
|
||||
verify.quickInfoIs("IFoo[]");
|
||||
verify.quickInfoIs("(var) c3t10: IFoo[]");
|
||||
goTo.marker('24');
|
||||
verify.quickInfoIs("{ (n: number, s: string): string; }[]");
|
||||
verify.quickInfoIs("(var) c3t11: {\n (n: number, s: string): string;\n}[]");
|
||||
goTo.marker('25');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('26');
|
||||
verify.quickInfoIs("string");
|
||||
verify.quickInfoIs("(parameter) s: string");
|
||||
goTo.marker('27');
|
||||
verify.quickInfoIs("IBar");
|
||||
verify.quickInfoIs("(var) c3t12: IBar");
|
||||
goTo.marker('28');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(property) foo: IFoo");
|
||||
goTo.marker('29');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(var) c3t13: IFoo");
|
||||
goTo.marker('30');
|
||||
verify.quickInfoIs("(i: any, s: any) => any");
|
||||
verify.quickInfoIs("(property) f: (i: any, s: any) => any");
|
||||
goTo.marker('31');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) i: any");
|
||||
goTo.marker('32');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) s: any");
|
||||
goTo.marker('33');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(var) c3t14: IFoo");
|
||||
goTo.marker('34');
|
||||
verify.quickInfoIs("any[]");
|
||||
verify.quickInfoIs("(property) a: undefined[]");
|
||||
goTo.marker('35');
|
||||
verify.quickInfoIs("(i: number, s: string) => string");
|
||||
verify.quickInfoIs("(property) C4T5.foo: (i: number, s: string) => string");
|
||||
goTo.marker('36');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) i: number");
|
||||
goTo.marker('37');
|
||||
verify.quickInfoIs("string");
|
||||
verify.quickInfoIs("(parameter) s: string");
|
||||
goTo.marker('38');
|
||||
verify.quickInfoIs("(i: number, s: string) => string");
|
||||
verify.quickInfoIs("(var) C5T5.foo: (i: number, s: string) => string");
|
||||
goTo.marker('39');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) i: number");
|
||||
goTo.marker('40');
|
||||
verify.quickInfoIs("string");
|
||||
verify.quickInfoIs("(parameter) s: string");
|
||||
goTo.marker('41');
|
||||
verify.quickInfoIs("(n: number) => IFoo");
|
||||
verify.quickInfoIs("(var) c6t5: (n: number) => IFoo");
|
||||
goTo.marker('42');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('43');
|
||||
verify.quickInfoIs("IFoo[]");
|
||||
verify.quickInfoIs("(var) c7t2: IFoo[]");
|
||||
goTo.marker('44');
|
||||
verify.quickInfoIs("IFoo[]");
|
||||
verify.quickInfoIs("(var) c7t2: IFoo[]");
|
||||
goTo.marker('45');
|
||||
verify.quickInfoIs("(s: string) => string");
|
||||
verify.quickInfoIs("(property) t1: (s: string) => string");
|
||||
goTo.marker('46');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) s: any");
|
||||
goTo.marker('47');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(property) t2: IFoo");
|
||||
goTo.marker('48');
|
||||
verify.quickInfoIs("number[]");
|
||||
verify.quickInfoIs("(property) t3: number[]");
|
||||
goTo.marker('49');
|
||||
verify.quickInfoIs("() => IFoo");
|
||||
verify.quickInfoIs("(property) t4: () => IFoo");
|
||||
goTo.marker('50');
|
||||
verify.quickInfoIs("(n: number) => IFoo");
|
||||
verify.quickInfoIs("(property) t5: (n: number) => IFoo");
|
||||
goTo.marker('51');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('52');
|
||||
verify.quickInfoIs("(n: number, s: string) => IFoo");
|
||||
verify.quickInfoIs("(property) t6: (n: number, s: string) => IFoo");
|
||||
goTo.marker('53');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('54');
|
||||
verify.quickInfoIs("string");
|
||||
verify.quickInfoIs("(parameter) s: string");
|
||||
goTo.marker('55');
|
||||
verify.quickInfoIs("(n: number, s: string) => number");
|
||||
verify.quickInfoIs("(property) t7: (n: number, s: string) => number");
|
||||
goTo.marker('56');
|
||||
verify.quickInfoIs("(n: number, s: string) => number");
|
||||
verify.quickInfoIs("(property) t8: (n: number, s: string) => number");
|
||||
goTo.marker('57');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('58');
|
||||
verify.quickInfoIs("number[][]");
|
||||
verify.quickInfoIs("(property) t9: number[][]");
|
||||
goTo.marker('59');
|
||||
verify.quickInfoIs("IFoo[]");
|
||||
verify.quickInfoIs("(property) t10: IFoo[]");
|
||||
goTo.marker('60');
|
||||
verify.quickInfoIs("{ (n: number, s: string): string; }[]");
|
||||
verify.quickInfoIs("(property) t11: {\n (n: number, s: string): string;\n}[]");
|
||||
goTo.marker('61');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('62');
|
||||
verify.quickInfoIs("string");
|
||||
verify.quickInfoIs("(parameter) s: string");
|
||||
goTo.marker('63');
|
||||
verify.quickInfoIs("IBar");
|
||||
verify.quickInfoIs("(property) t12: IBar");
|
||||
goTo.marker('64');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(property) foo: IFoo");
|
||||
goTo.marker('65');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(property) t13: IFoo");
|
||||
goTo.marker('66');
|
||||
verify.quickInfoIs("(i: any, s: any) => any");
|
||||
verify.quickInfoIs("(property) f: (i: any, s: any) => any");
|
||||
goTo.marker('67');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) i: any");
|
||||
goTo.marker('68');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) s: any");
|
||||
goTo.marker('69');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(property) t14: IFoo");
|
||||
goTo.marker('70');
|
||||
verify.quickInfoIs("any[]");
|
||||
verify.quickInfoIs("(property) a: undefined[]");
|
||||
goTo.marker('71');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('72');
|
||||
verify.quickInfoIs("() => (n: number) => IFoo");
|
||||
verify.quickInfoIs("(var) c10t5: () => (n: number) => IFoo");
|
||||
goTo.marker('73');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('74');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('75');
|
||||
verify.quickInfoIs("(s: string) => string");
|
||||
verify.quickInfoIs("(var) c12t1: (s: string) => string");
|
||||
goTo.marker('76');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) s: any");
|
||||
goTo.marker('77');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(var) c12t2: IFoo");
|
||||
goTo.marker('78');
|
||||
verify.quickInfoIs("number[]");
|
||||
verify.quickInfoIs("(var) c12t3: number[]");
|
||||
goTo.marker('79');
|
||||
verify.quickInfoIs("() => IFoo");
|
||||
verify.quickInfoIs("(var) c12t4: () => IFoo");
|
||||
goTo.marker('80');
|
||||
verify.quickInfoIs("(n: number) => IFoo");
|
||||
verify.quickInfoIs("(var) c12t5: (n: number) => IFoo");
|
||||
goTo.marker('81');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('82');
|
||||
verify.quickInfoIs("(n: number, s: string) => IFoo");
|
||||
verify.quickInfoIs("(var) c12t6: (n: number, s: string) => IFoo");
|
||||
goTo.marker('83');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('84');
|
||||
verify.quickInfoIs("string");
|
||||
verify.quickInfoIs("(parameter) s: string");
|
||||
goTo.marker('85');
|
||||
verify.quickInfoIs("(n: number, s: string) => number");
|
||||
verify.quickInfoIs("(var) c12t7: (n: number, s: string) => number");
|
||||
goTo.marker('86');
|
||||
verify.quickInfoIs("(n: number, s: string) => number");
|
||||
verify.quickInfoIs("(var) c12t8: (n: number, s: string) => number");
|
||||
goTo.marker('87');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('88');
|
||||
verify.quickInfoIs("number[][]");
|
||||
verify.quickInfoIs("(var) c12t9: number[][]");
|
||||
goTo.marker('89');
|
||||
verify.quickInfoIs("IFoo[]");
|
||||
verify.quickInfoIs("(var) c12t10: IFoo[]");
|
||||
goTo.marker('90');
|
||||
verify.quickInfoIs("{ (n: number, s: string): string; }[]");
|
||||
verify.quickInfoIs("(var) c12t11: {\n (n: number, s: string): string;\n}[]");
|
||||
goTo.marker('91');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) n: number");
|
||||
goTo.marker('92');
|
||||
verify.quickInfoIs("string");
|
||||
verify.quickInfoIs("(parameter) s: string");
|
||||
goTo.marker('93');
|
||||
verify.quickInfoIs("IBar");
|
||||
verify.quickInfoIs("(var) c12t12: IBar");
|
||||
goTo.marker('94');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(property) foo: IFoo");
|
||||
goTo.marker('95');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(var) c12t13: IFoo");
|
||||
goTo.marker('96');
|
||||
verify.quickInfoIs("(i: any, s: any) => any");
|
||||
verify.quickInfoIs("(property) f: (i: any, s: any) => any");
|
||||
goTo.marker('97');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) i: any");
|
||||
goTo.marker('98');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) s: any");
|
||||
goTo.marker('99');
|
||||
verify.quickInfoIs("IFoo");
|
||||
verify.quickInfoIs("(var) c12t14: IFoo");
|
||||
goTo.marker('100');
|
||||
verify.quickInfoIs("any[]");
|
||||
verify.quickInfoIs("(property) a: undefined[]");
|
||||
goTo.marker('101');
|
||||
verify.quickInfoIs("(a: number, b: number): number (+ 0 overload(s))");
|
||||
verify.quickInfoIs("(function) EF1(a: number, b: number): number");
|
||||
goTo.marker('102');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) a: any");
|
||||
goTo.marker('103');
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(parameter) b: any");
|
||||
goTo.marker('110');
|
||||
verify.quickInfoIs("Point");
|
||||
verify.quickInfoIs("(property) Point.origin: Point");
|
||||
goTo.marker('111');
|
||||
verify.quickInfoIs("(x: number, y: number): Point");
|
||||
verify.quickInfoIs("(constructor) Point(x: number, y: number): Point");
|
||||
goTo.marker('112');
|
||||
verify.quickInfoIs("(dx: number, dy: number): Point");
|
||||
verify.quickInfoIs("(method) Point.add(dx: number, dy: number): Point");
|
||||
goTo.marker('113');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) dx: number");
|
||||
goTo.marker('114');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) dy: number");
|
||||
goTo.marker('115');
|
||||
verify.quickInfoIs("(dx: number, dy: number) => Point");
|
||||
verify.quickInfoIs("(property) add: (dx: number, dy: number) => Point");
|
||||
goTo.marker('116');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) dx: number");
|
||||
goTo.marker('117');
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(parameter) dy: number");
|
||||
@@ -0,0 +1,7 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////var f3 = <(x: string) => string> function (/**/x) { return x.toLowerCase(); };
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs('(parameter) x: string');
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// should not contextually type the RHS because it introduces type parameters
|
||||
////var obj: { f<T>(x: T): T } = { f: <S>(/*1*/x) => x };
|
||||
////var obj2: <T>(x: T) => T = <S>(/*2*/x) => x;
|
||||
////
|
||||
////class C<T> {
|
||||
//// obj: <T>(x: T) => T
|
||||
////}
|
||||
////var c = new C();
|
||||
////c.obj = <S>(/*3*/x) => x;
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('(parameter) x: any');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('(parameter) x: any');
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('(parameter) x: any');
|
||||
+12
-12
@@ -9,9 +9,9 @@
|
||||
//// [x: number]: C;
|
||||
////}
|
||||
|
||||
////var x/*1*/ = [null, null];
|
||||
////var /*1*/x = [null, null];
|
||||
////var x2: I = [null, null];
|
||||
////var r/*2*/ = x2[0];
|
||||
////var /*2*/r = x2[0];
|
||||
|
||||
////var a = { name: 'bob', age: 20 };
|
||||
////var b = { name: 'jim', age: 20, dob: new Date() };
|
||||
@@ -19,31 +19,31 @@
|
||||
////var d = { name: 'jim', age: 20, address: 'springfield' };
|
||||
|
||||
////var x3: I = [a, b];
|
||||
////var r3/*3*/ = x3[1];
|
||||
////var /*3*/r3 = x3[1];
|
||||
|
||||
////var x4: I = [a, b, c];
|
||||
////var r4/*4*/ = x4[1];
|
||||
////var /*4*/r4 = x4[1];
|
||||
|
||||
////var x5/*5*/ = [a, b, c, d];
|
||||
////var r5/*6*/ = x5[1];
|
||||
////var /*5*/x5 = [a, b, c, d];
|
||||
////var /*6*/r5 = x5[1];
|
||||
|
||||
// the above code should have a couple errors that will need to be updated with appropriate new (non-error) code and quick info checks
|
||||
verify.not.errorExistsBetweenMarkers('1', '6');
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('any[]');
|
||||
verify.quickInfoIs('(var) x: any[]');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('C');
|
||||
verify.quickInfoIs('(var) r: C');
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('C');
|
||||
verify.quickInfoIs('(var) r3: C');
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs('C');
|
||||
verify.quickInfoIs('(var) r4: C');
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs('{ name: string; age: number; }[]');
|
||||
verify.quickInfoIs('(var) x5: {\n name: string;\n age: number;\n}[]');
|
||||
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs('{ name: string; age: number; }');
|
||||
verify.quickInfoIs('(var) r5: {\n name: string;\n age: number;\n}');
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
//// <T, U>(x: T): U
|
||||
////};
|
||||
////// x should not be contextually typed
|
||||
////var f24 = (x/**/) => { return 1 };
|
||||
////var f24 = (/**/x) => { return 1 };
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs('any');
|
||||
verify.quickInfoIs('(parameter) x: any');
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
////}
|
||||
////function f6(x: <T extends I>(p: T) => void) { }
|
||||
////// x should not be contextually typed so this should be an error
|
||||
////f6(x/**/ => x<number>())
|
||||
////f6(/**/x => x<number>())
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs('any');
|
||||
verify.quickInfoIs('(parameter) x: any');
|
||||
verify.numberOfErrorsInCurrentFile(1);
|
||||
@@ -0,0 +1,13 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////interface A { }
|
||||
////var f44: (x: A) => (y: A) => A = /*1*/x => /*2*/y => /*3*/x;
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('(parameter) x: A');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('(parameter) y: A');
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('(parameter) x: A');
|
||||
@@ -10,13 +10,13 @@
|
||||
////var max2: Comparer = (x/*1*/x, y/*2*/y) => { return x/*3*/x.compareTo(y/*4*/y) };
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('any', null, 'xx');
|
||||
verify.quickInfoIs('(parameter) xx: any', null);
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('any', null, 'yy');
|
||||
verify.quickInfoIs('(parameter) yy: any', null);
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('any', null, 'xx');
|
||||
verify.quickInfoIs('(parameter) xx: any', null);
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs('any', null, 'yy');
|
||||
verify.quickInfoIs('(parameter) yy: any', null);
|
||||
|
||||
+2
-2
@@ -13,6 +13,6 @@
|
||||
////}
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('string');
|
||||
verify.quickInfoIs('(parameter) xy: string');
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('FooOptions');
|
||||
verify.quickInfoIs('(parameter) options: FooOptions');
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
////}
|
||||
|
||||
////var a: BaseCollection<CollectionItem>;
|
||||
////var r/**/ = a._itemsByKey['x']; // should just say CollectionItem not TItem extends CollectionItem
|
||||
////var /**/r = a._itemsByKey['x']; // should just say CollectionItem not TItem extends CollectionItem
|
||||
////var result = r.x;
|
||||
|
||||
////a = new DbSet<Entity>();
|
||||
@@ -25,5 +25,5 @@
|
||||
////var result2 = r2.x;
|
||||
|
||||
goTo.marker('');
|
||||
verify.quickInfoIs('CollectionItem');
|
||||
verify.quickInfoIs('(var) r: CollectionItem');
|
||||
verify.numberOfErrorsInCurrentFile(0);
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
////}
|
||||
|
||||
////var i: I;
|
||||
////var r/**/ = i[1];
|
||||
////var /**/r = i[1];
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs('string');
|
||||
verify.quickInfoIs('(var) r: string');
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// class A<B, B/**/> { }
|
||||
//// class A<B, /**/B> { }
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoExists();
|
||||
@@ -0,0 +1,10 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////var x/*1*/x = true ? [1] : [undefined];
|
||||
////var y/*2*/y = true ? [1] : [];
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('(var) xx: number[]');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('(var) yy: number[]');
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoExists();
|
||||
verify.quickInfoIs('number');
|
||||
verify.quickInfoIs('(var) t: number');
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ verify.numberOfErrorsInCurrentFile(0);
|
||||
goTo.marker("1");
|
||||
edit.backspace(1);
|
||||
edit.insert(" ");
|
||||
verify.quickInfoIs("typeof C", undefined, "M.C.C", "var");
|
||||
verify.quickInfoIs("(var) M.C.C: typeof M.C");
|
||||
|
||||
// Verify there are no errors
|
||||
verify.numberOfErrorsInCurrentFile(0);
|
||||
+6
-6
@@ -10,16 +10,16 @@
|
||||
// @Filename: exportEqualTypes_file1.ts
|
||||
///////<reference path='exportEqualTypes_file0.ts'/>
|
||||
////import test = require('exportEqualTypes_file0');
|
||||
////var t: test/*1*/; // var 't' should be of type 'test'
|
||||
////var r1/*2*/ = t(); // Should return a Date
|
||||
////var r2/*3*/ = t.foo/*4*/; // t should have 'foo' in dropdown list and be of type 'string'
|
||||
////var t: /*1*/test; // var 't' should be of type 'test'
|
||||
////var /*2*/r1 = t(); // Should return a Date
|
||||
////var /*3*/r2 = t./*4*/foo; // t should have 'foo' in dropdown list and be of type 'string'
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('test');
|
||||
verify.quickInfoIs('(alias) test');
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('Date');
|
||||
verify.quickInfoIs('(var) r1: Date');
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('string');
|
||||
verify.quickInfoIs('(var) r2: string');
|
||||
goTo.marker('4');
|
||||
verify.memberListContains('foo');
|
||||
verify.numberOfErrorsInCurrentFile(0);
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
////interface Foo<T> extends Array<T> { }
|
||||
////var x: Foo<string>;
|
||||
////var r/*1*/ = x[0];
|
||||
////var /*1*/r = x[0];
|
||||
|
||||
////interface Foo2 extends Array<string> { }
|
||||
////var x2: Foo2;
|
||||
////var r2/*2*/ = x2[0];
|
||||
////var /*2*/r2 = x2[0];
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('string');
|
||||
verify.quickInfoIs('(var) r: string');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('string');
|
||||
verify.quickInfoIs('(var) r2: string');
|
||||
+4
-4
@@ -1,22 +1,22 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////var x = [1, 2, 3];
|
||||
////var y/*y*/ = x./*1*/pop/*2*/(5);
|
||||
////var /*y*/y = /*1*/x.pop(5)/*2*/;
|
||||
////
|
||||
|
||||
verify.errorExistsBetweenMarkers("1", "2");
|
||||
verify.numberOfErrorsInCurrentFile(2);
|
||||
verify.numberOfErrorsInCurrentFile(1);
|
||||
// Expected errors are:
|
||||
// - Supplied parameters do not match any signature of call target.
|
||||
// - Could not select overload for 'call' expression.
|
||||
|
||||
goTo.marker("y");
|
||||
verify.quickInfoIs("any");
|
||||
verify.quickInfoIs("(var) y: any");
|
||||
|
||||
goTo.eof();
|
||||
edit.insert("interface Array<T> { pop(def: T): T; }");
|
||||
|
||||
verify.not.errorExistsBetweenMarkers("1", "2");
|
||||
goTo.marker("y");
|
||||
verify.quickInfoIs("number");
|
||||
verify.quickInfoIs("(var) y: number");
|
||||
verify.numberOfErrorsInCurrentFile(0);
|
||||
+2
-2
@@ -9,11 +9,11 @@
|
||||
//// bar(): void ;
|
||||
////}
|
||||
////var b: B<number>;
|
||||
////var x/**/ = b.foo2().foo(5).foo(); // 'x' is of type 'void'
|
||||
////var /**/x = b.foo2().foo(5).foo(); // 'x' is of type 'void'
|
||||
|
||||
// this line triggers a semantic/syntactic error check, remove line when 788570 is fixed
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs('void');
|
||||
verify.quickInfoIs('(var) x: void');
|
||||
verify.numberOfErrorsInCurrentFile(0);
|
||||
@@ -7,9 +7,9 @@
|
||||
//// b: T;
|
||||
////}
|
||||
////var x: I2<Date>;
|
||||
////var y/**/ = x(undefined); // Typeof y should be Date[]
|
||||
////var /**/y = x(undefined); // Typeof y should be Date[]
|
||||
////y.length;
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs('Date[]');
|
||||
verify.quickInfoIs('(var) y: Date[]');
|
||||
verify.numberOfErrorsInCurrentFile(0);
|
||||
@@ -28,19 +28,19 @@
|
||||
////var /*14*/r4 = a1(/*13*/);
|
||||
////var v1: a1./*15*/connectExport;
|
||||
|
||||
//goTo.file("externalModuleWithExportAssignment_file1.ts");
|
||||
//goTo.marker('1');
|
||||
//verify.quickInfoIs("a1");
|
||||
goTo.file("externalModuleWithExportAssignment_file1.ts");
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("(alias) a1");
|
||||
|
||||
//goTo.marker('2');
|
||||
//verify.quickInfoIs("{ test1: a1.connectModule; test2(): a1.connectModule; (): a1.connectExport; }", undefined, "a", "var");
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("(var) a: {\n (): a1.connectExport;\n test1: a1.connectModule;\n test2(): a1.connectModule;\n}", undefined);
|
||||
|
||||
//goTo.marker('3');
|
||||
//verify.quickInfoIs("(res: any, req: any, next: any): void", undefined, "a1.connectModule", "function");
|
||||
//verify.completionListContains("test1", "a1.connectModule", undefined, "test1", "property");
|
||||
//verify.completionListContains("test2", "(): a1.connectModule", undefined, "test2", "method");
|
||||
//verify.not.completionListContains("connectModule");
|
||||
//verify.not.completionListContains("connectExport");
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("(property) test1: a1.connectModule(res: any, req: any, next: any) => void", undefined);
|
||||
verify.completionListContains("test1", "(property) test1: a1.connectModule", undefined);
|
||||
verify.completionListContains("test2", "(method) test2(): a1.connectModule", undefined);
|
||||
verify.not.completionListContains("connectModule");
|
||||
verify.not.completionListContains("connectExport");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.currentSignatureHelpIs("test1(res: any, req: any, next: any): void");
|
||||
@@ -48,21 +48,21 @@ verify.currentSignatureHelpIs("test1(res: any, req: any, next: any): void");
|
||||
goTo.marker('5');
|
||||
verify.currentSignatureHelpIs("test2(): a1.connectModule");
|
||||
|
||||
//goTo.marker('6');
|
||||
//verify.quickInfoIs("a1.connectModule", undefined, "r1", "var");
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs("(var) r1: a1.connectModule", undefined);
|
||||
|
||||
goTo.marker('7');
|
||||
verify.currentSignatureHelpIs("a(): a1.connectExport");
|
||||
|
||||
//goTo.marker('8');
|
||||
//verify.quickInfoIs("a1.connectExport", undefined, "r2", "var");
|
||||
goTo.marker('8');
|
||||
verify.quickInfoIs("(var) r2: a1.connectExport", undefined);
|
||||
|
||||
//goTo.marker('9');
|
||||
//verify.quickInfoIs("(res: any, req: any, next: any): void", undefined, "a1.connectModule", "function");
|
||||
//verify.completionListContains("test1", "a1.connectModule", undefined, "test1", "property");
|
||||
//verify.completionListContains("test2", "(): a1.connectModule", undefined, "test2", "method");
|
||||
//verify.not.completionListContains("connectModule");
|
||||
//verify.not.completionListContains("connectExport");
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs("(property) test1: a1.connectModule(res: any, req: any, next: any) => void", undefined);
|
||||
verify.completionListContains("test1", "(property) test1: a1.connectModule", undefined);
|
||||
verify.completionListContains("test2", "(method) test2(): a1.connectModule", undefined);
|
||||
verify.completionListContains("connectModule");
|
||||
verify.completionListContains("connectExport");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.currentSignatureHelpIs("test1(res: any, req: any, next: any): void");
|
||||
@@ -70,18 +70,18 @@ verify.currentSignatureHelpIs("test1(res: any, req: any, next: any): void");
|
||||
goTo.marker('11');
|
||||
verify.currentSignatureHelpIs("test2(): a1.connectModule");
|
||||
|
||||
//goTo.marker('12');
|
||||
//verify.quickInfoIs("a1.connectModule", undefined, "r3", "var");
|
||||
goTo.marker('12');
|
||||
verify.quickInfoIs("(var) r3: a1.connectModule", undefined);
|
||||
|
||||
goTo.marker('13');
|
||||
verify.currentSignatureHelpIs("a1(): a1.connectExport");
|
||||
|
||||
//goTo.marker('14');
|
||||
//verify.quickInfoIs("a1.connectExport", undefined, "r4", "var");
|
||||
goTo.marker('14');
|
||||
verify.quickInfoIs("(var) r4: a1.connectExport", undefined);
|
||||
|
||||
//goTo.marker('15');
|
||||
//verify.not.completionListContains("test1", "a1.connectModule", undefined, "test1", "property");
|
||||
//verify.not.completionListContains("test2", "(): a1.connectModule", undefined, "test2", "method");
|
||||
//verify.completionListContains("connectModule", "a1.connectModule", undefined, "a1.connectModule", "interface");
|
||||
//verify.completionListContains("connectExport", "a1.connectExport", undefined, "a1.connectExport", "interface");
|
||||
goTo.marker('15');
|
||||
verify.not.completionListContains("test1", "(property) test1: a1.connectModule", undefined);
|
||||
verify.not.completionListContains("test2", "(method) test2(): a1.connectModule", undefined);
|
||||
verify.completionListContains("connectModule", "interface a1.connectModule", undefined);
|
||||
verify.completionListContains("connectExport", "interface a1.connectExport", undefined);
|
||||
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
goTo.marker();
|
||||
|
||||
verify.quickInfoIs('any', "", "p", "var");
|
||||
verify.quickInfoIs('(var) p: any', "");
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user