GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Declaration emitter cleanup by mhegazy · Pull Request #4068 · microsoft/TypeScript

Conversation

@mhegazy

@mhegazy Mohamed Hegazy (mhegazy) commented Jul 29, 2015

Copy link
Copy Markdown
Contributor

This is the first set of changes to get declaration bundling working. the first step is to split the emitter logic into two phases; the first to collect declarations that we need to emit (preprocess) and the second to write them (write). With these changes there should not be any functional changes, just error messages and reporting differences. I will be sending out changes to support --out with --module for declaration and then another set for bundling.

Note for reviewers, declarationEmitter.ts has changed significantly, so i would look at the file as whole instead of diffs. changes to other files are fairly limited though, so diffs should be sufficient.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Mohamed Hegazy (mhegazy) added 30 commits July 14, 2015 15:15
@mhegazy
initial changes
687d25a
@mhegazy
visit nodes
c5c4835
@mhegazy
Add error reporting
5865c02
@mhegazy
Do error reporting slightlly difrrentelly
96a2b7f
@mhegazy
Walk types
46ddcbf
@mhegazy
use track symbol insted of walking types
e3444c1
@mhegazy
remove old diagnostics reporting
b010a19
@mhegazy
Remove isDeclarationVisible uses
4e6948f
@mhegazy
rename functions with write prefix to emit
4f1c088
@mhegazy
clean up
ccba296
@mhegazy
Handel visibility correctelly
e05b983
@mhegazy
handel internals when collecting declarations
f33e422
@mhegazy
Wire trackSymbol to show errors correctelly
820d77d
@mhegazy
Disable internal check for now untill all code is fixed
655104e
@mhegazy
use custom indexOf instead of array.prototype.indexOf to allow runnin…
7718b22
…g on ES3
@mhegazy
Accept symbol baselines
86c9578
@mhegazy
A few additional fixes
ceee493
@mhegazy
rename functions
34f0d54
@mhegazy
use namespaces instead of module
672fb44
@mhegazy
Ensure trackSymbol is only called for type symbols
6eb1df7
@mhegazy
handel import clauses and export default expression
fc7325b
@mhegazy
Handel variableDeclarations and variableStatements
c8a8ff5
@mhegazy
handel binding patterns
0f46057
@mhegazy
Accept baseline for export default case
cb964c1
@mhegazy
accept baselines
50cf293
@mhegazy
Fix error reporting issues
0e28bee
@mhegazy
handel expressions in heritage clauses
a27e6f2
@mhegazy
Handel type paramter declarations correctelly
6384dcf
@mhegazy
reorder declarations
ffde83c
@mhegazy
clean up collection logic
99d4e46
Mohamed Hegazy (mhegazy) and others added 9 commits July 22, 2015 12:59
@mhegazy
Only check if hasExportDeclarations on external modules
1f0520e
@mhegazy
Do not create a new typewriter everytime
859bd12
unknown
Merge branch 'master' into declarations
33ace7a
Conflicts:
	src/compiler/checker.ts
unknown
remove unused property
ce8090a
unknown
Support @internal
fd01a64
@mhegazy
make forEachTopLevelDeclaration generic
a876104
@mhegazy
Fix #3912: emit declaration for binding elements correctelly
ab42595
@mhegazy
move getLocalTargetOfAliasDeclaration back to the emitter
ed2e5d9
@mhegazy
Merge branch 'master' into declarations
f4da2fe
Conflicts:
	src/compiler/checker.ts
	src/compiler/declarationEmitter.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/types.ts
@msftclas Microsoft Contribution License Agreements (msftclas) added the cla-not-required label Jul 29, 2015
@mhegazy
rever sourceRoot change to tsconfig.json
4ec081c
DanielRosenwasser
DanielRosenwasser reviewed Jul 29, 2015
View reviewed changes
Comment thread src/compiler/checker.ts

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) Jul 29, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Use named parameters here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented Jul 29, 2015

Copy link
Copy Markdown
Member

In declarationEmitter.ts:

  • Replace all "handel" with "handle"
  • Replace all "infered" with "inferred"
  • Replace all "diffrent" with "different"
  • See where else we use lambdas that do nothing if you find any, let's see if we can move emptyHandler to utilities.ts.
  • Use a for-of in visitExportDeclaration.
  • I'm not sure how consistent action is with the rest of our codebase. I think we've just used visit and callback.
  • Rename reportUnamedDeclarationMessage to reportUnnamedDeclarationMessage.
  • Rename collectDeclatation with collectDeclaration or aggregateDeclaration.
  • In emitDeclarations, don't use diagnostics.push.apply - use addRange.
  • Can you document preprocessDeclarations a little more?
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ahejlsberg Anders Hejlsberg (ahejlsberg) changed the title Declaration emiter cleanup Declaration emitter cleanup Jul 29, 2015
@mhegazy
Merge branch 'master' into declarations
cbb4e2c
Conflicts:
	src/compiler/declarationEmitter.ts
	src/compiler/types.ts
This was referenced Aug 24, 2015
Apply more TSLint rules #3994
Closed
Proposal: Bundling TS module type definitions #4433
Closed
Mohamed Hegazy (mhegazy) added 2 commits September 16, 2015 19:02
@mhegazy
Merge branch 'master' into declarations
3eb940b
Conflicts:
	src/compiler/checker.ts
	src/compiler/declarationEmitter.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/types.ts
	tests/baselines/reference/chainedImportAlias.symbols
	tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.symbols
@mhegazy
handel outFile flag
9ebf182
@mhegazy Mohamed Hegazy (mhegazy) closed this Sep 29, 2015
@mhegazy

Mohamed Hegazy (mhegazy) commented Sep 29, 2015

Copy link
Copy Markdown
Contributor Author

closing for now. will refresh and resubmit.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhegazy Mohamed Hegazy (mhegazy) reopened this Sep 29, 2015
@mhegazy Mohamed Hegazy (mhegazy) closed this Sep 29, 2015
@msftclas Microsoft Contribution License Agreements (msftclas) added the cla-not-required label Sep 29, 2015
@sheetalkamat
Sheetal Nandi (sheetalkamat) deleted the declarations branch October 10, 2017 18:08
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mhegazy @DanielRosenwasser @msftclas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.