fix(cli): ExternalObject type decalare

This commit is contained in:
LongYinan 2021-11-21 18:23:53 +08:00
parent 4874c72340
commit 1f64f9fbf3
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7
4 changed files with 20 additions and 8 deletions

View file

@ -344,9 +344,13 @@ async function processIntermediateTypeFile(
.split('\n')
.map((line) => line.trim())
.filter(Boolean)
let dts = `export class ExternalObject<T> {
private readonly __type: unique symbol;
[val: unique symbol]: T
let dts = `/* eslint-disable */
export class ExternalObject<T> {
readonly '': {
readonly '': unique symbol
[K: symbol]: T
}
}\n`
const classes = new Map<string, string>()
const impls = new Map<string, string>()

View file

@ -8,9 +8,13 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1
`export class ExternalObject<T> {␊
private readonly __type: unique symbol;␊
[val: unique symbol]: T␊
`/* eslint-disable */␊
export class ExternalObject<T> {␊
readonly '': {␊
readonly '': unique symbol␊
[K: symbol]: T␊
}␊
}␊
export const DEFAULT_COST: number␊
export function getWords(): Array<string>

View file

@ -1,6 +1,10 @@
/* eslint-disable */
export class ExternalObject<T> {
private readonly __type: unique symbol;
[val: unique symbol]: T
readonly '': {
readonly '': unique symbol
[K: symbol]: T
}
}
export const DEFAULT_COST: number
export function getWords(): Array<string>