oxc-transform 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -8
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Oxc Transform
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## [Isolated Declarations for Standalone DTS Emit](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5-beta/#isolated-declarations)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Based on Oxc and conforms to TypeScript Compiler's `--isolated-declaration` `.d.ts` emit.
|
|
6
|
+
|
|
7
|
+
This is still in alpha and may yield incorrect results, feel free to [submit a bug report](https://github.com/oxc-project/oxc/issues/new?assignees=&labels=C-bug&projects=&template=bug_report.md&title=isolated-declarations:).
|
|
8
|
+
|
|
9
|
+
### Usage
|
|
6
10
|
|
|
7
11
|
```javascript
|
|
8
|
-
import oxc from './index.js';
|
|
9
12
|
import assert from 'assert';
|
|
13
|
+
import oxc from 'oxc-transform';
|
|
14
|
+
|
|
15
|
+
const { sourceText, errors } = oxc.isolatedDeclaration("test.ts", "class A {}");
|
|
16
|
+
|
|
17
|
+
assert.equal(sourceText, "declare class A {}\n");
|
|
18
|
+
assert(errors.length == 0);
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### API
|
|
10
22
|
|
|
11
|
-
|
|
23
|
+
```typescript
|
|
24
|
+
export function isolatedDeclaration(filename: string, sourceText: string): IsolatedDeclarationsResult
|
|
12
25
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
26
|
+
export interface IsolatedDeclarationsResult {
|
|
27
|
+
sourceText: string
|
|
28
|
+
errors: Array<string>
|
|
16
29
|
}
|
|
17
30
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxc-transform",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Oxc transform Node API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"transform"
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"index.js"
|
|
24
24
|
],
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"@oxc-transform/binding-win32-x64-msvc": "0.15.
|
|
27
|
-
"@oxc-transform/binding-win32-arm64-msvc": "0.15.
|
|
28
|
-
"@oxc-transform/binding-linux-x64-gnu": "0.15.
|
|
29
|
-
"@oxc-transform/binding-linux-arm64-gnu": "0.15.
|
|
30
|
-
"@oxc-transform/binding-linux-x64-musl": "0.15.
|
|
31
|
-
"@oxc-transform/binding-linux-arm64-musl": "0.15.
|
|
32
|
-
"@oxc-transform/binding-darwin-x64": "0.15.
|
|
33
|
-
"@oxc-transform/binding-darwin-arm64": "0.15.
|
|
26
|
+
"@oxc-transform/binding-win32-x64-msvc": "0.15.1",
|
|
27
|
+
"@oxc-transform/binding-win32-arm64-msvc": "0.15.1",
|
|
28
|
+
"@oxc-transform/binding-linux-x64-gnu": "0.15.1",
|
|
29
|
+
"@oxc-transform/binding-linux-arm64-gnu": "0.15.1",
|
|
30
|
+
"@oxc-transform/binding-linux-x64-musl": "0.15.1",
|
|
31
|
+
"@oxc-transform/binding-linux-arm64-musl": "0.15.1",
|
|
32
|
+
"@oxc-transform/binding-darwin-x64": "0.15.1",
|
|
33
|
+
"@oxc-transform/binding-darwin-arm64": "0.15.1"
|
|
34
34
|
}
|
|
35
35
|
}
|