style: add missing semicolons

This commit is contained in:
Joao Dias
2016-10-23 22:52:57 +02:00
committed by vsavkin
parent 52bf188b8f
commit a382d6dd20
15 changed files with 29 additions and 32 deletions

View File

@ -240,7 +240,7 @@ export class MetadataCollector {
moduleExport.export = exportDeclaration.exportClause.elements.map(
element => element.propertyName ?
{name: element.propertyName.text, as: element.name.text} :
element.name.text)
element.name.text);
}
if (!exports) exports = [];
exports.push(moduleExport);
@ -300,7 +300,7 @@ export class MetadataCollector {
__symbolic: 'select',
expression: recordEntry({__symbolic: 'reference', name: enumName}, node), name
}
}
};
} else {
nextDefaultValue =
recordEntry(errorSym('Unsuppported enum member name', member.name), node);
@ -517,7 +517,7 @@ function validateMetadata(
const entry = metadata[name];
try {
if (isClassMetadata(entry)) {
validateClass(entry)
validateClass(entry);
}
} catch (e) {
const node = nodeMap.get(entry);

View File

@ -65,7 +65,7 @@ export interface ImportMetadata {
function getSourceFileOfNode(node: ts.Node): ts.SourceFile {
while (node && node.kind != ts.SyntaxKind.SourceFile) {
node = node.parent
node = node.parent;
}
return <ts.SourceFile>node;
}
@ -383,7 +383,7 @@ export class Evaluator {
module: left.module,
name: qualifiedName.right.text
},
node)
node);
}
// Record a type reference to a declared type as a select.
return {__symbolic: 'select', expression: left, member: qualifiedName.right.text};

View File

@ -96,7 +96,7 @@ export interface MetadataObject { [name: string]: MetadataValue; }
export interface MetadataArray { [name: number]: MetadataValue; }
export interface MetadataSymbolicExpression {
__symbolic: 'binary'|'call'|'index'|'new'|'pre'|'reference'|'select'|'spread'|'if'
__symbolic: 'binary'|'call'|'index'|'new'|'pre'|'reference'|'select'|'spread'|'if';
}
export function isMetadataSymbolicExpression(value: any): value is MetadataSymbolicExpression {
if (value) {

View File

@ -550,7 +550,7 @@ describe('Collector', () => {
arguments: [{providers: [{__symbolic: 'reference', name: 'REQUIRED_VALIDATOR'}]}]
}]
}
})
});
});
it('should collect an error for a simple function that references a local variable', () => {
@ -568,7 +568,7 @@ describe('Collector', () => {
context: {name: 'localSymbol'}
}
}
})
});
});
describe('in strict mode', () => {
@ -588,7 +588,7 @@ describe('Collector', () => {
expect(() => collector.getMetadata(unsupported1, true))
.toThrowError(/Reference to non-exported class/);
});
})
});
});
// TODO: Do not use \` in a template literal as it confuses clang-format

View File

@ -57,7 +57,7 @@ describe('Symbols', () => {
it('should be able to find the source files', () => {
expect(expressions).toBeDefined();
expect(imports).toBeDefined();
})
});
it('should be able to create symbols for a source file', () => {
let symbols = new Symbols(expressions);