Skip to content

Incompatibility between Ember with the native types and ts-reset #643

Closed

Description

@boris-petrov

Repo.

Check tests/types/foo.ts. It gives a strange error:

tests/types/foo.ts:11:7 - error TS2345: Only primitive values and certain DOM objects (see `ContentValue` in `@glint/template`) are usable as top-level template content.
  Argument of type 'UnmetExpectation<"Expected type to be `number`, but got", unknown>' is not assignable to parameter of type 'ContentValue'.

11       {{@expectTypeOf number @to.beNumber}}
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you remove import '@total-typescript/ts-reset/filter-boolean'; from types/global.d.ts, it works fine. It also seems to work fine using the @types/ember__* packages instead of the "native" types.

Any ideas why that happens?

Activity

  1. locked and limited conversation to collaborators on Oct 30, 2023
  2. converted this issue into a discussion #644 on Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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