microsoft / microsoft/DefinitelyTyped-tools

$ExpectType ignoring namespace in TS4.7

Open
#459 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
423
Forks
237
Avg merge
18h 18m
Merged PRs (30d)
11

Description

I'm working on the type definitions for https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/iobroker and while doing so, I'm stumbling over a check error where dtslint with TS4.7 seems to ignore the namespace of a type:

ERROR: 332:5  expect  TypeScript@4.7 expected type to be:
  ioBroker.Object | null
got:
  Object | null
ERROR: 336:5  expect  TypeScript@4.7 expected type to be:
  ioBroker.Object | null
got:
  Object | null

All other tested TS version seem to work fine. Even IntelliSense on TS4.7 shows the correct type:
grafik

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the dtslint failure in the DefinitelyTyped types/iobroker definitions at lines 332 and 336 using TypeScript 4.7, then inspect the $ExpectType handling. Compare its output with other tested TypeScript versions and IntelliSense. Done means the checks preserve the ioBroker namespace and no longer report Object | null for those expectations.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.