Open 5icoder opened 1 year ago
能够解析这种文件,前提是 third-party 中存在 ThirdPartyType 你应该修改为
import { ThirdPartyType } from 'third-party';
type IType = {
name: string
property: ThirdPartyType
}
或
interface IType {
name: string
property: ThirdPartyType
}
这边暂时未发现有ThirdPartyType类型导出,因此得出的结果为:
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"property": {
"$ref": "#/definitions/ThirdPartyType"
}
},
"required": [
"name",
"property"
],
"additionalProperties": false,
"definitions": {
"ThirdPartyType": {}
}
}