Skip to content

$25: false-positive when nesting TypeScript generic expressions #1241

@vegerot

Description

@vegerot

Steps to reproduce:

import type { useTranslation } from '@tiktok/plugin-runtime/i18n';

export const ContactUsLinks = (t: ReturnType<typeof useTranslation<"translation">>['t']) => {};

Expected: should not produce any errors
Actual: errors with use of undeclared variable: useTranslation [E0057]

Compare this to https://www.typescriptlang.org/play/?#code/PTCWFsAcHsCcBcAE8CekCmiDeiCuBndAFVgEMA7fAG1PlGnMQF9EAzWacRAcgAE6A1vGgDgkKrgDmocgFpYucnXDowARgAc5bgG4AUABN0AYxqxMxhviQFiZSjToMAXIgA8RROgAe8dOQN8RGtYGUkAPkQACgA6ONJYSXxXIgBtAF0ASgBecKx4V0UBcmgAd3ImfT09HxgEREtKJABhBnhSY3gAVXwAGRkBIOzogsQAJXR4XFhyIjR0N1QMaFY8QhIKalp6cjcAInh7LadyPfDw1O54bizEXOxKvSA

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