Skip to content

Conversation

@CC972
Copy link

@CC972 CC972 commented Apr 20, 2023

Fixes microsoft#51825.

With this PR, we encourage people to move away from declaring namespaces with the module keyword.

Currently, if we have foo.ts:

module foo {}

This leads to the following foo.d.ts file:

declare module foo {}

This PR changes the declaration emit to transform module to namespace:

declare namespace foo {}

"Ambient module declarations", such as the below, will be unaffected:

declare module "bar" {}

@CC972 CC972 force-pushed the deprecate-namespaces-declared-with-module-keyword branch from 69c0ea1 to 2ca15ab Compare April 24, 2023 15:11
@CC972 CC972 changed the base branch from CC972/deprecate-namespaces-declared-with-module-keyword to master April 24, 2023 15:12
@CC972 CC972 changed the base branch from master to CC972/deprecate-namespaces-declared-with-module-keyword April 24, 2023 15:12
CC972 and others added 4 commits April 24, 2023 16:28
Signed-off-by: Chi Leung <chiguan.leung@gmail.com>
Signed-off-by: Chi Leung <chiguan.leung@gmail.com>
Signed-off-by: Chi Leung <chiguan.leung@gmail.com>
Signed-off-by: Chi Leung <chiguan.leung@gmail.com>
@CC972 CC972 force-pushed the deprecate-namespaces-declared-with-module-keyword branch from 2ca15ab to 171d3db Compare April 24, 2023 15:29
@dragomirtitian dragomirtitian merged commit 3c8ce2a into CC972/deprecate-namespaces-declared-with-module-keyword May 4, 2023
@dragomirtitian dragomirtitian deleted the deprecate-namespaces-declared-with-module-keyword branch November 17, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants