mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Merge pull request #3621 from DickvdBrink/unused-vars
Remove unused variables
This commit is contained in:
commit
560dbd98f1
@ -3518,7 +3518,6 @@ namespace ts {
|
||||
let syntaxKind = kind === IndexKind.Number ? SyntaxKind.NumberKeyword : SyntaxKind.StringKeyword;
|
||||
let indexSymbol = getIndexSymbol(symbol);
|
||||
if (indexSymbol) {
|
||||
let len = indexSymbol.declarations.length;
|
||||
for (let decl of indexSymbol.declarations) {
|
||||
let node = <SignatureDeclaration>decl;
|
||||
if (node.parameters.length === 1) {
|
||||
@ -8374,12 +8373,12 @@ namespace ts {
|
||||
}
|
||||
|
||||
function checkTypeOfExpression(node: TypeOfExpression): Type {
|
||||
let operandType = checkExpression(node.expression);
|
||||
checkExpression(node.expression);
|
||||
return stringType;
|
||||
}
|
||||
|
||||
function checkVoidExpression(node: VoidExpression): Type {
|
||||
let operandType = checkExpression(node.expression);
|
||||
checkExpression(node.expression);
|
||||
return undefinedType;
|
||||
}
|
||||
|
||||
@ -12380,7 +12379,6 @@ namespace ts {
|
||||
|
||||
case SyntaxKind.StringLiteral:
|
||||
// External module name in an import declaration
|
||||
let moduleName: Expression;
|
||||
if ((isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
|
||||
getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
|
||||
((node.parent.kind === SyntaxKind.ImportDeclaration || node.parent.kind === SyntaxKind.ExportDeclaration) &&
|
||||
|
||||
@ -40,7 +40,6 @@ namespace ts {
|
||||
function emitDeclarations(host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[], jsFilePath: string, root?: SourceFile): DeclarationEmit {
|
||||
let newLine = host.getNewLine();
|
||||
let compilerOptions = host.getCompilerOptions();
|
||||
let languageVersion = compilerOptions.target || ScriptTarget.ES3;
|
||||
|
||||
let write: (s: string) => void;
|
||||
let writeLine: () => void;
|
||||
|
||||
@ -5363,7 +5363,6 @@ namespace ts {
|
||||
let atToken = createNode(SyntaxKind.AtToken, pos - 1);
|
||||
atToken.end = pos;
|
||||
|
||||
let startPos = pos;
|
||||
let tagName = scanIdentifier();
|
||||
if (!tagName) {
|
||||
return;
|
||||
|
||||
@ -337,7 +337,6 @@ namespace ts {
|
||||
function processSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number) {
|
||||
let start: number;
|
||||
let length: number;
|
||||
let extensions: string;
|
||||
let diagnosticArgument: string[];
|
||||
if (refEnd !== undefined && refPos !== undefined) {
|
||||
start = refPos;
|
||||
|
||||
@ -1957,7 +1957,6 @@ namespace ts {
|
||||
function getExpandedCharCodes(input: string): number[] {
|
||||
let output: number[] = [];
|
||||
let length = input.length;
|
||||
let leadSurrogate: number = undefined;
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
let charCode = input.charCodeAt(i);
|
||||
|
||||
@ -95,7 +95,6 @@ namespace ts {
|
||||
|
||||
export module ScriptSnapshot {
|
||||
class StringScriptSnapshot implements IScriptSnapshot {
|
||||
private _lineStartPositions: number[] = undefined;
|
||||
|
||||
constructor(private text: string) {
|
||||
}
|
||||
@ -2910,7 +2909,6 @@ namespace ts {
|
||||
}
|
||||
|
||||
let location = getTouchingPropertyName(sourceFile, position);
|
||||
var target = program.getCompilerOptions().target;
|
||||
|
||||
let semanticStart = new Date().getTime();
|
||||
let isMemberCompletion: boolean;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user