Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

ExpectType should allow subtypes #15

@danvk

Description

@danvk

This test:

'hello'  // $ExpectType string

currently triggers this error:

Expected type
  string
but got:
  "hello"

The type "hello" extends string, so this should be allowed. If you really want to check that the type is "hello", then you should write // $ExpectType "hello".

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