-
Notifications
You must be signed in to change notification settings - Fork 249
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
refac: refactoring setup.ts #1166
base: main
Are you sure you want to change the base?
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 4689738:
|
@@ -18,7 +18,7 @@ import {DirectOptions} from './directApi' | |||
/** | |||
* Default options applied when API is called per `userEvent.anyApi()` | |||
*/ | |||
const defaultOptionsDirect: Required<Options> = { | |||
const defaultOptionsDirect: Config = { |
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 changed it to the existing defined Config
.
export type Config = Required<Options>
node: Node | undefined, | ||
defaults: Required<Options>, | ||
) { | ||
function getDocument(options: Options, defaults: Config, node?: Node) { |
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.
createConfig
and getDocument
seem to take the same arguments, so I unified the order in which they take them. What do you think?
@kentcdodds 👋 |
What:
Refactoring
setup.ts
Why:
I reused existing declared types and unified the argument order of the functions.
Checklist: