Skip to content

Spec Module (/packages/spec): Add more specific return types to locale utility functions #560

@7hacker

Description

@7hacker

Some functions in locales.ts could benefit from more precise TypeScript return types. For example:

// Current implementation
export const getLocaleCodeDelimiter = (locale: string): string | null => {
 // ...
}
// Could be improved to
export const getLocaleCodeDelimiter = (locale: string): "-" | "_" | null => {
 // ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions