Commit b9b58f9 1 parent 6267f0c commit b9b58f9 Copy full SHA for b9b58f9
File tree 5 files changed +12
-9
lines changed
5 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 6
6
7
7
- fix: parse type assertions ([ #1 ] ( https://github.com/sveltejs/acorn-typescript/pull/1 ) )
8
8
9
- ## acorn-typescript
9
+ ## 1.0.0 / acorn-typescript
10
+
11
+ This project started as a fork of https://github.com/TyrealHu/acorn-typescript
12
+
13
+ Version 1.0 of ` @sveltejs/acorn-typescript ` has some breaking changes compared to the original ` acorn-typescript ` project:
14
+
15
+ - Only named export (i.e. you have to do ` import { tsPlugin } from '@sveltejs/acorn-typescript'; ` , a default export is no longer provided)
16
+ - ESM only (no CJS build)
10
17
11
18
Changelog of the project this originated from: https://github.com/TyrealHu/acorn-typescript/CHANGELOG.md
Original file line number Diff line number Diff line change 1
1
import { describe , it , expect } from 'vitest' ;
2
2
import * as acorn from 'acorn' ;
3
- import tsPlugin from '../../src' ;
3
+ import { tsPlugin } from '../../src' ;
4
4
import type { AcornTypeScript } from '../../src/types' ;
5
5
6
6
function checkAcornTypeScriptUndefined ( acornTypeScript ?: AcornTypeScript ) : boolean {
Original file line number Diff line number Diff line change 1
1
import { assert } from 'vitest' ;
2
2
import * as acorn from 'acorn' ;
3
- import tsPlugin from '../src' ;
3
+ import { tsPlugin } from '../src' ;
4
4
5
5
export const Parser = acorn . Parser . extend ( tsPlugin ( ) ) ;
6
6
Original file line number Diff line number Diff line change 1
1
import { Parser } from 'acorn' ;
2
2
3
- declare function tsPlugin ( options ?: {
3
+ export function tsPlugin ( options ?: {
4
4
dts ?: boolean ;
5
5
allowSatisfies ?: boolean ;
6
6
/** Whether to use JSX. Defaults to false */
@@ -11,5 +11,3 @@ declare function tsPlugin(options?: {
11
11
allowNamespacedObjects ?: boolean ;
12
12
} ;
13
13
} ) : ( BaseParser : typeof Parser ) => typeof Parser ;
14
-
15
- export { tsPlugin , tsPlugin as default } ;
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ function keywordTypeFromName(value: string): Node | typeof undefined {
140
140
}
141
141
}
142
142
143
- function tsPlugin ( options ?: {
143
+ export function tsPlugin ( options ?: {
144
144
// default false
145
145
dts ?: boolean ;
146
146
// default false
@@ -5272,5 +5272,3 @@ function tsPlugin(options?: {
5272
5272
return TypeScriptParser ;
5273
5273
} ;
5274
5274
}
5275
-
5276
- export { tsPlugin as default , tsPlugin } ;
You can’t perform that action at this time.
0 commit comments