Skip to content

fix: got rid of typescript-enums, improved types of exported functions#248

Closed
DJanocha wants to merge 1 commit intomelwynfurtado:masterfrom
DJanocha:master
Closed

fix: got rid of typescript-enums, improved types of exported functions#248
DJanocha wants to merge 1 commit intomelwynfurtado:masterfrom
DJanocha:master

Conversation

@DJanocha
Copy link

What is this PR for?

for improving typings of lib's API

Who should review this PR?

whoever

Questions:

  • All unit tests executed successfully in CI environment
  • Related tests executed successfully in CI environment
  • Documentation updated accordingly [e.g. Readme.md, Contributing.md]
  • [X ] PR ready for merging


export const postcodeValidator = (postcode: string, country: string): boolean => {
if (!POSTCODE_REGEXES.has(country)) {
export type OtherStringOr<T extends string> = T | (string & {});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firstly, thanks for making these changes.

Could we not just use the CountryCode type directly as the function throws on unrecognised country codes?

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Stale pull request message

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants