Skip to content

wrong declarations - Initializers are not allowed in ambient contexts. #188

@maciejw

Description

@maciejw

due to error in typescript 3.1 microsoft/TypeScript#28230

there is an error in your d.ts files

node_modules/fork-ts-checker-webpack-plugin/lib/index.d.ts:37:44 - error TS1039: Initializers are not allowed in ambient contexts.

37     static readonly DEFAULT_MEMORY_LIMIT = 2048;
                                              ~~~~

when I fixed typescript version to 3.0.3 in your project, declarations are correct.

now in package.json you have ^3.0.1 and 3.1.6 in yarn.lock it has to be changes to 3.0.3

3.2.2 can't compile due to

src/IncrementalChecker.ts:250:43 - error TS2345: Argument of type 'ReadonlyArray<Diagnostic>' is not assignable to parameter of type 'Diagnostic[]'.
  Type 'ReadonlyArray<Diagnostic>' is missing the following properties from type 'Diagnostic[]': pop, push, reverse, shift, and 6 more.

250       diagnostics.push.apply(diagnostics, diagnosticsToRegister);
                                              ~~~~~~~~~~~~~~~~~~~~~


Found 1 error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions