Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

WIP Fix tests for Typescript 2.1 #130

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/ast-converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ module.exports = function(ast, extra) {
key: convertChild(node.name),
value: convertChild(node.initializer),
computed: (node.name.kind === SyntaxKind.ComputedPropertyName),
static: Boolean(node.flags & ts.NodeFlags.Static),
static: Boolean(ts.getModifierFlags(node) & ts.ModifierFlags.Static),
accessibility: getTSNodeAccessibility(node),
decorators: (node.decorators) ? node.decorators.map(function(d) {
return convertChild(d.expression);
Expand Down Expand Up @@ -1119,7 +1119,7 @@ module.exports = function(ast, extra) {
key: convertChild(node.name),
value: method,
computed: isMethodNameComputed,
static: Boolean(node.flags & ts.NodeFlags.Static),
static: Boolean(ts.getModifierFlags(node) & ts.ModifierFlags.Static),
kind: "method",
accessibility: getTSNodeAccessibility(node),
decorators: (node.decorators) ? node.decorators.map(function(d) {
Expand All @@ -1141,7 +1141,7 @@ module.exports = function(ast, extra) {
// TypeScript uses this even for static methods named "constructor"
case SyntaxKind.Constructor:

var constructorIsStatic = Boolean(node.flags & ts.NodeFlags.Static),
var constructorIsStatic = Boolean(ts.getModifierFlags(node) & ts.ModifierFlags.Static),
firstConstructorToken = constructorIsStatic ? ts.findNextToken(node.getFirstToken(), ast) : node.getFirstToken(),
constructorOffset = 11,
constructorStartOffset = constructorOffset + firstConstructorToken.getStart() - node.getFirstToken().getStart(),
Expand Down Expand Up @@ -1387,7 +1387,7 @@ module.exports = function(ast, extra) {
// Patterns

// Note: TypeScript uses this for both spread and rest expressions
case SyntaxKind.SpreadElementExpression:
case SyntaxKind.SpreadElement:
assign(result, {
type: "SpreadElement",
argument: convertChild(node.expression)
Expand Down