Skip to content

Refactor the ApiObjectSpec type #5

Description

@kamarmack

Make it something generic such as:

export type ApiObjectSpec<
	T extends string = string,
	U extends Record<T, YupTypes.AnySchema> = Record<string, YupTypes.AnySchema>,
	V extends T = T,
> = ReturnType<
	typeof getApiObjectSpec<T, U, V>
>;

The refactor should allow for typed arguments such as this

(apiObjectSpec: ApiObjectSpec) => { ... }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions