fix(cli): ExternalObject type decalare
This commit is contained in:
parent
4874c72340
commit
1f64f9fbf3
4 changed files with 20 additions and 8 deletions
|
@ -344,9 +344,13 @@ async function processIntermediateTypeFile(
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map((line) => line.trim())
|
.map((line) => line.trim())
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
let dts = `export class ExternalObject<T> {
|
let dts = `/* eslint-disable */
|
||||||
private readonly __type: unique symbol;
|
|
||||||
[val: unique symbol]: T
|
export class ExternalObject<T> {
|
||||||
|
readonly '': {
|
||||||
|
readonly '': unique symbol
|
||||||
|
[K: symbol]: T
|
||||||
|
}
|
||||||
}\n`
|
}\n`
|
||||||
const classes = new Map<string, string>()
|
const classes = new Map<string, string>()
|
||||||
const impls = new Map<string, string>()
|
const impls = new Map<string, string>()
|
||||||
|
|
|
@ -8,9 +8,13 @@ Generated by [AVA](https://avajs.dev).
|
||||||
|
|
||||||
> Snapshot 1
|
> Snapshot 1
|
||||||
|
|
||||||
`export class ExternalObject<T> {␊
|
`/* eslint-disable */␊
|
||||||
private readonly __type: unique symbol;␊
|
␊
|
||||||
[val: unique symbol]: T␊
|
export class ExternalObject<T> {␊
|
||||||
|
readonly '': {␊
|
||||||
|
readonly '': unique symbol␊
|
||||||
|
[K: symbol]: T␊
|
||||||
|
}␊
|
||||||
}␊
|
}␊
|
||||||
export const DEFAULT_COST: number␊
|
export const DEFAULT_COST: number␊
|
||||||
export function getWords(): Array<string>␊
|
export function getWords(): Array<string>␊
|
||||||
|
|
Binary file not shown.
8
examples/napi/index.d.ts
vendored
8
examples/napi/index.d.ts
vendored
|
@ -1,6 +1,10 @@
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
export class ExternalObject<T> {
|
export class ExternalObject<T> {
|
||||||
private readonly __type: unique symbol;
|
readonly '': {
|
||||||
[val: unique symbol]: T
|
readonly '': unique symbol
|
||||||
|
[K: symbol]: T
|
||||||
|
}
|
||||||
}
|
}
|
||||||
export const DEFAULT_COST: number
|
export const DEFAULT_COST: number
|
||||||
export function getWords(): Array<string>
|
export function getWords(): Array<string>
|
||||||
|
|
Loading…
Reference in a new issue