Skip to content

Arbitrary values with noUncheckedIndexedAccess #38

@fenok

Description

@fenok

When noUncheckedIndexedAccess is enabled, arbitrary values like tw.after(tw.content_["'Hi'"]) throw the following error: Argument of type 'Property | undefined' is not assignable to parameter of type 'Property'..

This is expected, and should be fixable by non-null assertion operator: tw.after(tw.content_["'Hi'"]!).

However, in this case, I get a compilation error (from postcss-loader):

    let result$$ = tw.after(tw.content_["'Hi'"]!);
                                              ^

  SyntaxError: missing ) after argument list

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions