-
-
Notifications
You must be signed in to change notification settings - Fork 239
feat: multiple configs functionality #2602
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
base: main
Are you sure you want to change the base?
Conversation
|
🦋 Changeset detectedLatest commit: c84f10e The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2c662b0
to
1450461
Compare
| (string & {}) | ||
| (Record<string, unknown> & { path?: never }) | ||
| Input; | ||
input: InputPath | Input | (InputPath | Input)[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use readonly arrays please
input: InputPath | Input | (InputPath | Input)[]; | |
input: InputPath | Input | ReadonlyArray<InputPath | Input>; |
*/ | ||
output: string | Output; | ||
output: string | Output | (string | Output)[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output: string | Output | (string | Output)[]; | |
output: string | Output | ReadonlyArray<string | Output>; |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2602 +/- ##
==========================================
+ Coverage 23.81% 28.76% +4.95%
==========================================
Files 379 379
Lines 36945 37029 +84
Branches 1623 2084 +461
==========================================
+ Hits 8798 10651 +1853
+ Misses 28134 26343 -1791
- Partials 13 35 +22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
packages/openapi-ts/src/index.ts
Outdated
@@ -103,7 +107,7 @@ export const createClient = async ( | |||
/** | |||
* Type helper for openapi-ts.config.ts, returns {@link UserConfig} object | |||
*/ | |||
export const defineConfig = async (config: Configs): Promise<UserConfig> => | |||
export const defineConfig = async (config: Configs): Promise<ConfigValue> => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't play with this but guessing it won't currently know which value it returns. I think you could use generics to make sure it's properly typed, i.e. object -> object and array -> array. Currently it should be object -> object | array and array -> object | array. Assuming it's always going to be 1:1, we want to improve these types
Without digging into the code, are you internally converting all configs to an array? So what was before |
Basically yes |
commit: |
Work in progress
TODO:
close #1056
close #1995
close #564