Fix a few TSLint errors

This commit is contained in:
joeduffy 2017-01-10 08:13:39 -08:00
parent 27eef9903b
commit 641fb5bd21

View file

@ -1,8 +1,8 @@
// Copyright 2016 Marapongo, Inc. All rights reserved.
import {Node, Identifier} from "./nodes";
import * as statements from "./statements";
import * as symbols from "../symbols";
import {Identifier, Node} from "./nodes";
import * as statements from "./statements";
// TODO(joe): consider refactoring modifiers from booleans to enums.
@ -14,21 +14,6 @@ export interface Definition extends Node {
description?: string; // an optional informative description.
}
export function isDefinition(node: Node): boolean {
switch (node.kind) {
case moduleKind:
case classKind:
case localVariableKind:
case modulePropertyKind:
case classPropertyKind:
case moduleMethodKind:
case classMethodKind:
return true;
default:
return false;
}
}
/* Modules */
// A module contains members, including variables, functions, and/or classes.
@ -125,3 +110,20 @@ export interface ClassMethod extends Function, ClassMember {
export const classMethodKind = "ClassMethod";
export type ClassMethodKind = "ClassMethod";
/** Helper functions **/
export function isDefinition(node: Node): boolean {
switch (node.kind) {
case moduleKind:
case classKind:
case localVariableKind:
case modulePropertyKind:
case classPropertyKind:
case moduleMethodKind:
case classMethodKind:
return true;
default:
return false;
}
}