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

"type-fest": "4.7.0", PartialDeep break down 4.6.0 works fine #742

Closed
tianyingchun opened this issue Nov 9, 2023 · 4 comments
Closed

"type-fest": "4.7.0", PartialDeep break down 4.6.0 works fine #742

tianyingchun opened this issue Nov 9, 2023 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@tianyingchun
Copy link

tianyingchun commented Nov 9, 2023

export type ConfigEnvBase = {};
export type UserConfigFn<UserConfig, ConfigEnv extends ConfigEnvBase> = (env: ConfigEnv) => UserConfig | Promise<UserConfig>;
export type UserConfigExport<UserConfig, ConfigEnv extends ConfigEnvBase = ConfigEnvBase> = UserConfig | Promise<UserConfig> | UserConfigFn<UserConfig, ConfigEnv>;
export declare const defineConfig: <UserConfig, ConfigEnv extends ConfigEnvBase = ConfigEnvBase>(config: UserConfigExport<UserConfig, ConfigEnv>) => UserConfigExport<UserConfig, ConfigEnv>;

import { type PartialDeep } from 'type-fest';
export interface FlatForgeOptions {
    /**
     * the project root directory, this thould be optional
     */
    projectCwd: string;
}
type DefineConfigFn = (userConfig: PartialDeep<FlatForgeOptions>) => UserConfigExport<PartialDeep<FlatForgeOptions>>;
export declare const defineConfig: DefineConfigFn;

defineConfig({
    projectCwd: 'src',
})
image

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • The funding will be given to active contributors.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

below is 4.6.0

image
@Emiyaaaaa
Copy link
Collaborator

Emiyaaaaa commented Nov 9, 2023

#738 interface is not UnknownRecord but type is, I'm sorry about mistake this.

should we revert PR 738? @sindresorhus

revert PR: #743

related: #736

@Emiyaaaaa Emiyaaaaa added bug Something isn't working help wanted Extra attention is needed labels Nov 9, 2023
@sindresorhus
Copy link
Owner

@Emiyaaaaa Reverted for now. It should not recurse into prototype properties though, so I assume we just need a better fix for that?

Also note: #738 (comment)

@Emiyaaaaa
Copy link
Collaborator

reopened issue #651, let's talk there

@Emiyaaaaa
Copy link
Collaborator

It‘s been fixed at 4.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants