Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# acorn-typescript
# @sveltejs/acorn-typescript

[![License](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat)

Expand All @@ -9,11 +9,11 @@ TypeScript using Acorn.

## Usage

To get started, import the plugin and use Acorn's extension mechanism to register it. You have to enable `options.locations` while using `acorn-typescript`.
To get started, import the plugin and use Acorn's extension mechanism to register it. You have to enable `options.locations` while using `@sveltejs/acorn-typescript`.

```typescript
import * as acorn from 'acorn';
import tsPlugin from 'acorn-typescript';
import tsPlugin from '@sveltejs/acorn-typescript';

const node = acorn.Parser.extend(tsPlugin()).parse(
`
Expand All @@ -36,7 +36,7 @@ If you want to enable parsing within a TypeScript ambient context, where certain

```typescript
import * as acorn from 'acorn';
import tsPlugin from 'acorn-typescript';
import tsPlugin from '@sveltejs/acorn-typescript';

const node = acorn.Parser.extend(tsPlugin({ dts: true })).parse(
`
Expand Down
Loading