Skip to content
New issue

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

是否支持生成接口返回的数据的ts类型? #38

Closed
gaothing opened this issue Oct 9, 2021 · 10 comments
Closed

是否支持生成接口返回的数据的ts类型? #38

gaothing opened this issue Oct 9, 2021 · 10 comments

Comments

@gaothing
Copy link

gaothing commented Oct 9, 2021

是否支持生成接口返回的数据的ts类型?生成的ts类型直接克引入使用

@gaothing gaothing changed the title 接口返回的ts类似是否支持呢 是否支持生成接口返回的数据的ts类型? Oct 9, 2021
@gogoyqj
Copy link
Owner

gogoyqj commented Oct 9, 2021

是否支持生成接口返回的数据的ts类型?生成的ts类型直接克引入使用

支持,可以只配置生成 models-即 ts 类型,见文档 https://gogoyqj.github.io/auto-service/
image

@gaothing
Copy link
Author

gaothing commented Oct 9, 2021

使用--models的时候,不会生成models.ts这个文件。但是其他ts文件中都会引入,导致报错提示

@gogoyqj
Copy link
Owner

gogoyqj commented Oct 11, 2021

使用--models的时候,不会生成models.ts这个文件。但是其他ts文件中都会引入,导致报错提示

疏忽了,我修复一下这个问题

@gaothing
Copy link
Author

还有有的文件不需要这个models.ts也引入了,望大佬修复,挺好用的

@gogoyqj
Copy link
Owner

gogoyqj commented Oct 11, 2021

使用--models的时候,不会生成models.ts这个文件。但是其他ts文件中都会引入,导致报错提示

疏忽了,我修复一下这个问题

@gaothing npm i [email protected] -S

@gogoyqj
Copy link
Owner

gogoyqj commented Oct 11, 2021

还有有的文件不需要这个models.ts也引入了,望大佬修复,挺好用的

举个🌰?

@gaothing
Copy link
Author

image

@gogoyqj
Copy link
Owner

gogoyqj commented Oct 11, 2021

get,后续想办法修复一下,ps:实际不会有影响或者你可以直接通过 prettier 格式化掉

@gaothing
Copy link
Author

怎么 prettier 格式化掉呢,怎么配置,可以给的反馈吗

@gogoyqj
Copy link
Owner

gogoyqj commented Oct 13, 2021

怎么 prettier 格式化掉呢,怎么配置,可以给的反馈吗

搜一下 prettier eslint 自动格式化、移除无用变量……等

@gogoyqj gogoyqj closed this as completed Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants