8000 TypeScript instructions don't work? · Issue #2693 · avajs/ava · GitHub
[go: up one dir, main page]

Skip to content
TypeScript instructions don't work? #2693
@ianstormtaylor

Description

@ianstormtaylor

Based on the TypeScript instructions getting AVA working with TypeScript at runtime should be just installing ts-node and typescript and then adding configuration:

"extensions": [
  "ts",
  "tsx"
],
"require": [
  "ts-node/register"
]

But this results in errors for the import syntax:

Uncaught exception in test/ava/test.ts

/Users/Storm/dev/ianstormtaylor/nucleus/test/ava/test.ts:1
import test from 'ava';
^^^^^^

SyntaxError: Cannot use import statement outside a module

Might there need to be more done as part of the configuration that isn't documented?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0