Skip to content

TypeScript example compilation errors #52

@draperd

Description

@draperd

I'm trying to write functional tests using TypeScript and have followed the example provided. However I'm getting compilation errors:

test/functional/example.ts(1,9): error TS4023: Exported variable 'registerSuite' has or is using name 'ObjectSuiteDescriptor' from external module "/home/dave/Git/account-management/node_modules/intern/lib/interfaces/object" but cannot be named.
test/functional/example.ts(1,9): error TS4023: Exported variable 'registerSuite' has or is using name 'ObjectSuiteFactory' from external module "/home/dave/Git/account-management/node_modules/intern/lib/interfaces/object" but cannot be named.
test/functional/example.ts(1,9): error TS4023: Exported variable 'registerSuite' has or is using name 'Tests' from external module "/home/dave/Git/account-management/node_modules/intern/lib/interfaces/object" but cannot be named.

...generated from the line:

const { registerSuite } = intern.getInterface('object');

...which is taken directly from the example

The tests themselves do actually run when treated as JavaScript (however I needed to modify the leadfoot/keys import to be: const keys = require('@theintern/leadfoot/keys').default;)

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