8000 Types do not include "Kanna" unit. · Issue #338 · convert-units/convert-units · GitHub
[go: up one dir, main page]

Skip to content

Types do not include "Kanna" unit. #338

@cisc0disco

Description

@cisc0disco

When messing around with

convert(value)
.from(unit)
.toBest({ cutOffNumber: 10 });

i've noticed that m³ get converted to unit called "kanna" (never heard about it in my life)
so i added

.toBest({ cutOffNumber: 10, exclude: ["kanna"] });

which raised typescript error Type '"kanna"' is not assignable to type 'Unit'.ts(2322)

so only way i could fix it was @ts-ignore or telling the typescript

exclude: ["kanna" as Unit]

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

      0