Skip to content

Commit

Permalink
improve userTypes config comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dk1a committed Sep 22, 2023
1 parent 88745eb commit 377135c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/store/ts/config/storeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ export const zEnumsConfig = z.object({
export type UserTypesConfig<UserTypeNames extends StringForUnion> = never extends UserTypeNames
? {
/**
* User types mapped to file paths from which to import them
* User types mapped to file paths from which to import them.
* Paths are treated as relative to root.
* Paths that don't start with a "." have foundry remappings applied to them first.
*
* (user types are inferred to be absent)
*/
Expand All @@ -253,15 +255,19 @@ export type UserTypesConfig<UserTypeNames extends StringForUnion> = never extend
: StringForUnion extends UserTypeNames
? {
/**
* User types mapped to file paths from which to import them
* User types mapped to file paths from which to import them.
* Paths are treated as relative to root.
* Paths that don't start with a "." have foundry remappings applied to them first.
*
* (user types aren't inferred - use `mudConfig` or `storeConfig` helper, and `as const` for variables)
*/
userTypes?: Record<UserTypeNames, string>;
}
: {
/**
* User types mapped to file paths from which to import them
* User types mapped to file paths from which to import them.
* Paths are treated as relative to root.
* Paths that don't start with a "." have foundry remappings applied to them first.
*
* User types defined here can be used as types in table schemas/keys
*/
Expand Down

0 comments on commit 377135c

Please sign in to comment.