Skip to content

Conversation

@Kobe-Kwanten
Copy link
Contributor

Description

When a key name exists with the same name as an array method / field, that key will not be available as the generated type.

Example generated file:

export type I18nTranslations = {
    "common": {
        "shift": {
            "created": string;
        };
    };
};
export type I18nPath = Path<I18nTranslations>;

The type does not recognise the key common.shift.created.

I fixed the type by excluding array key names only when the field contains an array.

Linked Issues

/

Additional context

/

@coveralls
Copy link

Coverage Status

coverage: 90.829%. remained the same
when pulling c4e9f09 on Kobe-Kwanten:main
into 1efa63d on toonvanstrijp:main.

@rubiin rubiin merged commit 987030f into toonvanstrijp:main Mar 12, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants