Skip to content

使用主包尝试访问 country 相关数据时,没按预期工作 #42

@fjqingyou

Description

@fjqingyou

import ProvinceCityChinaCountryList from "province-city-china/dist/country.json";

//似乎是声明类型
let test1: ProvinceCityChinaCountryList = [];//咦?居然不是值类型,而是声明类型?
test1.sort();//似乎是

//尝试使用值类型
let test2 = ProvinceCityChinaCountryList;//尝试直接使用时: “ProvinceCityChinaCountryList”仅表示类型,但在此处却作为值使用。ts(2693)

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