microsoft / microsoft/TypeScript
Project reference build error when one of projects' exported var contains external module's vars.
Open
@weswigham is already working on this.
Since Feb 12, 2021.
Bug
Domain: tsc -b
Rescheduled
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Bug Report
🔎 Search Terms
Project Reference.
🕗 Version & Regression Information
- This is a crash
- This changed between versions ______ and _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about ProjectReference
- I was unable to test this on prior versions because _______
⏯ Playground Link
https://github.com/07akioni/project-reference-build-error
💻 Code
// proj1/index.ts
import { enUS } from 'date-fns/locale'
const myLocale = {
name: 'enUS',
locale: enUS
}
export {
myLocale
}
// proj2/index.ts
import { myLocale } from 'proj1'
console.log(myLocale)
🙁 Actual behavior
error TS2304: Cannot find name 'Locale'
🙂 Expected behavior
It works.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.