Skip to content

"latest TypeScript grammar" broken #274

@felixfbecker

Description

@felixfbecker

Installed https://marketplace.visualstudio.com/items?itemName=ms-vscode.typescript-javascript-grammar (with Dark+):

image

I'm not sure how it should be, but it doesn't seem right.

  • Previously, green was only for classes and interfaces, not it is for properties aswell.
  • keywords like await or delete are not colored
  • object access is sometimes white, sometimes light blue
  • require() is violet

Code:

import fetch from 'node-fetch';
import * as assert from 'assert';
import {API_URL} from '../../../../api/../config';
import {createTestToken, shouldRequireAdminPermission} from '../helper';
import {Product} from '../../../../api/models/investment/Product';
import {Notification} from '../../../../api/models/core/Notification';
import Sequelize = require('sequelize');
import * as sinon from 'sinon';
import {pusher} from '../../../../api/pusher';
import {assertDeepEqual} from '../helper';
import {pick, omit} from 'lodash';

describe('Product', () => {
    describe('GET /products', () => {
        shouldRequireAdminPermission('GET', '/products');
        it('should return a list of products', async () => {
            const product = await Product.create({
                name: 'Goldmine SMSF',
                description: 'Established goldmine self-managed super fund',
                type: 'unit',
                status: 'open',
                distributionPeriod: 'annually',
                distributionDate: new Date(Date.UTC(2016, 8, 7)),
                startDate: new Date(Date.UTC(2016, 8, 5)),
                endDate: new Date(Date.UTC(2016, 9, 5)),
                couponRate: '0.05',
                termType: 'absolute',
                managerId: 1
            });
            const token = createTestToken({ permissions: ['admin'] });
            const res = await fetch(API_URL + '/products', { headers: { 'Authorization': 'Bearer ' + token } });
            assert.equal(res.status, 200);
            const body = await res.json();
            delete body[0].createdAt;
            delete body[0].updatedAt;
            assert.equal(~~res.headers.get('x-total-count'), 1);
            assertDeepEqual(body, [{
                id: product.id,

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions