We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如题,不知道现在有没有这个映射关系,或者能不能实现这个功能
The text was updated successfully, but these errors were encountered:
之前有收到过类似的建议,后来在 cba3766 中调整了一部分注释的顺序,把支持的版本和插件支持情况放在最上面了
某个 API 对应可用版本这个信息在定义生成时是有的(因此可以输出到注释里),但印象中 TS 似乎没有类似的功能可以根据某个自定义配置来改变编译结果;TS 编译器插件我没太了解过,不确定能不能做到这个效果
只依赖定义文件的话,可行的办法可能只有另外生成一份只包含特定版本兼容接口的定义了
Sorry, something went wrong.
有没有可能做到类似:
export type LatestVersion = { someApi: ... } export type 2_7_1 = { someOldApi: ... } type Version = '2.7.1' | 'latest' | ... export ActiveApi<V extends Version> = V extends '2.7.1' ? 2_7_1 : ...
No branches or pull requests
如题,不知道现在有没有这个映射关系,或者能不能实现这个功能
The text was updated successfully, but these errors were encountered: