Skip to content

Type does not follow workspace since 4.3.2 #44488

Closed
@bodinsamuel

Description

@bodinsamuel

Bug Report

Hello team,
Not sure if it's a limitation or a bug, but when using types across workspaces, some of them are not following along.
I can not explain why, but I have a small repro

🔎 Search Terms

types, express, workspaces, references,

🕗 Version & Regression Information

  • This changed between versions 4.2.4 -> 4.3.2
  • Still happening with @next

⏯ Playground Link

git clone https://github.com/bodinsamuel/ts-workspace-typing-issue.git
cd ts-workspace-typing-issue
yarn
yarn tsc -b
$ /Users/samuelbodin/code/test-ts-workspace/node_modules/.bin/tsc -b
test2/index.ts:6:17 - error TS7006: Parameter 'req' implicitly has an 'any' type.

6     'foo.Txt': (req, res) => {
                  ~~~

test2/index.ts:6:22 - error TS7006: Parameter 'res' implicitly has an 'any' type.

6     'foo.Txt': (req, res) => {

🙁 Actual behavior

Express req and res are typed as any
Screen Shot 2021-06-07 at 21 02 29

🙂 Expected behavior

Correct express typing

Metadata

Metadata

Assignees

Labels

Has ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosWorking as IntendedThe behavior described is the intended behavior; this is not a bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions