Skip to content

Fix API Sample tests#24911

Merged
mhegazy merged 5 commits into
masterfrom
fixAPISampleTests
Jun 13, 2018
Merged

Fix API Sample tests#24911
mhegazy merged 5 commits into
masterfrom
fixAPISampleTests

Conversation

@mhegazy
Copy link
Copy Markdown
Contributor

@mhegazy mhegazy commented Jun 12, 2018

We were generating typescript_standalone.d.ts by converting namespace ts to module "typescript" that seems to be broken with nested namespaces. instead of trying to fix the regexp, i have switched to use the typescriptservcies.d.ts

Also removing the generation portion from jake.

@weswigham
Copy link
Copy Markdown
Member

Reminder: Those nested namespaces are @internal declarations that shouldn't be in the .d.ts in the first place, and the standalone definition file we still build so people can, eg, use that declaration file with older versions of typescript in global script projects. I'm pretty OK with removing it for the 3.0 release, though - seeing a umd declaration appended to the bottom of the services .d.ts would have the same effect for any recent typescript release (and we use even newer type-syntactic features anyway).

Comment thread Jakefile.js
@@ -139,11 +139,6 @@ compileOutputConfigFile('src/typescriptServices/tsconfig.json', [], [copyright],
// Created by appending 'export = ts;' at the end of the standalone file to turn it into an external module
var nodeDefinitionsFileContents = definitionFileContents + "\nexport = ts;";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support browser cases seamlessly, this should also probably append "\nexport as namespace ts;" now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can get these done in a different PR.

@mhegazy mhegazy merged commit 9ab7afc into master Jun 13, 2018
@mhegazy mhegazy deleted the fixAPISampleTests branch June 13, 2018 20:14
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants