如何修复关于变量排序的Lint错误(Angular 2)?

时间:2017-10-23 11:09:34

标签: angular tslint

我有这样的结构:

export class Foo {

    private variable = 'value';

    static Bar = class {

        constructor() {
        }
    };

    constructor() {
    }
}

正在运行ng lint会给我:Declaration of public static member variable not allowed to appear after declaration of private instance member variable

确定。交换订单后:

export class Foo {

    static Bar = class {

        constructor() {
        }
    };

    private variable = 'value';

    constructor() {
    }
}

我知道得到:Declaration of private instance member variable not allowed to appear after declaration of public instance member function

我应该如何修复此Lint错误?

0 个答案:

没有答案