Skip to content

關於Typescript 支援 #121

Description

@mxt305

因為缺乏index.d.ts的定義檔案,因此沒辦法在ts的專案中直接使用。
所以個人弄了一個Typescipt相關的定義檔按給大家參考,如果沒問題的話我再送PR。

declare module "twzipcode-data" {
    export interface County {
        id: string;
        name: string;
    }
    export interface Zipcode {
        id: string;
        zipcode: number;
        county: string;
        city: string;
    }

    export interface TwZipcodeData {
        counties: County[];
        zipcodes: Zipcode[];
    }

    export default twzipcode = (locale?: string) => TwZipcodeData;
}

Activity

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

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