Fix missing error for accessing type-only export * member through namespace (#57176)

This commit is contained in:
Andrew Branch
2024-01-30 17:04:13 -08:00
committed by GitHub
parent d21b1d271f
commit d2d3b24737
11 changed files with 223 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
// @filename: main.ts
import * as intermediate from './intermediate'
const ghost: intermediate.Ghost = new intermediate.Ghost()
// @filename: intermediate.ts
export type * from './ghost'
// @filename: ghost.ts
export class Ghost {}

View File

@@ -0,0 +1,11 @@
// @filename: main.ts
import { c } from './types'
import * as types from './types'
console.log(c) // Fails as expected, import is still allowed though.
console.log(types.c) // Expected an error here.
// @filename: types.ts
export type * from './values'
// @filename: values.ts
export const c = 10