Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

$ExpectType ignoring namespace in TS4.7

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

Nobody has claimed this yet.

Assessment

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

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.

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

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

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.

More from microsoft/DefinitelyTyped-tools

All issues in microsoft/DefinitelyTyped-tools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.