-
-
Notifications
You must be signed in to change notification settings - Fork 965
docs: add jsdoc comments to plugin/generator types #4204
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: alpha
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ import { isAbsolute, join, normalize, resolve } from 'node:path' | |
import { generator, resolveConfigPath } from '@tanstack/router-generator' | ||
|
||
import { getConfig } from './config' | ||
import type { Config, ConfigOptions } from './config'; | ||
import type { FSWatcher } from 'chokidar' | ||
import type { UnpluginFactory } from 'unplugin' | ||
import type { Config } from './config' | ||
|
||
let lock = false | ||
const checkLock = () => lock | ||
|
@@ -15,7 +15,7 @@ const setLock = (bool: boolean) => { | |
const PLUGIN_NAME = 'unplugin:router-generator' | ||
|
||
export const unpluginRouterGeneratorFactory: UnpluginFactory< | ||
Partial<Config> | undefined | ||
ConfigOptions | undefined | ||
> = (options = {}) => { | ||
let ROOT: string = process.cwd() | ||
let userConfig = options as Config | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As an unrelated point, this type casting here is risky. For example, There is some complexity here, because we can't immediately parse the provided schema, as there may be later config retrieved from a |
||
|
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.
big fan of this, helps a lot when in middle of coding :)