Skip to content

i18n types performance #707

@hatemhosny

Description

@hatemhosny

The i18n types provided by @zyf722 are truly great. They did catch many errors I did while adding i18n strings in html or ts code.

However, I recently noticed that running the type check takes much longer than before.
When I disabled these types by replacing them with this:

// @ts-nocheck
export type RequireAtLeastOne<T> = any;
export type UnAsConst<T, U, Default> = any;
export type TagElement = any;
export type I18nInterpolationType<T> = any;
export type I18nKeyType = any;
export type I18nValueType<T, U> = any;

The time taken by type checking (npm run build:ts) decreased from 150 sec to 14 sec.

It would be great if we can improve the performance here without losing the big value provided by these types.

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