locale icon indicating copy to clipboard operation
locale copied to clipboard

Plz support definition for typescript users

Open webhacking opened this issue 5 years ago • 3 comments

I could not use it at all because of one of my compilation options So I made it myself. I hope others don't have the same issues as me.

import { Locale } from 'locale';

export declare module 'locale' {
  interface Locale {
    code: string;
    language: string;
    country: string;
    normalized: string;
    score: number;
  }
  declare function Locales(language: string): Locale[];
}

webhacking avatar Sep 19 '19 15:09 webhacking

Hi there, I don't use TypeScript at all but is there anything the repo could include to better support it?

I'm guessing your snippet is fixing it, but can you describe what it is solving. And two would you be up for a PR?

florrain avatar Sep 19 '19 22:09 florrain

You can also submit a PR to https://github.com/DefinitelyTyped/DefinitelyTyped/

forivall avatar Oct 03 '19 22:10 forivall

I wrote one https://github.com/DefinitelyTyped/DefinitelyTyped/pull/42968

forivall avatar Mar 06 '20 23:03 forivall