This repository was archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Alias colliding names in Closure Library like goog.ui.Component #811
Open
teppeis
wants to merge
1
commit into
angular:master
Choose a base branch
from
teppeis:colliding-closure-library-names
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/test/java/com/google/javascript/clutz/goog_ui_component.d.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
declare namespace ಠ_ಠ.clutz.goog.ui { | ||
class Component__clutz_alias { | ||
private noStructuralTyping_goog_ui_Component : any; | ||
} | ||
} | ||
declare module 'goog:goog.ui.Component' { | ||
import Component = ಠ_ಠ.clutz.goog.ui.Component__clutz_alias; | ||
export default Component; | ||
} | ||
declare namespace ಠ_ಠ.clutz.goog.ui.Component { | ||
enum EventType { | ||
ACTION = 'action' , | ||
} | ||
} | ||
declare module 'goog:goog.ui.Component.EventType' { | ||
import EventType = ಠ_ಠ.clutz.goog.ui.Component.EventType; | ||
export default EventType; | ||
} | ||
declare namespace ಠ_ಠ.clutz.goog.ui.tree { | ||
class BaseNode__clutz_alias extends ಠ_ಠ.clutz.goog.ui.Component__clutz_alias { | ||
private noStructuralTyping_goog_ui_tree_BaseNode : any; | ||
} | ||
} | ||
declare module 'goog:goog.ui.tree.BaseNode' { | ||
import BaseNode = ಠ_ಠ.clutz.goog.ui.tree.BaseNode__clutz_alias; | ||
export default BaseNode; | ||
} | ||
declare namespace ಠ_ಠ.clutz.goog.ui.tree.BaseNode { | ||
enum EventType { | ||
BEFORE_COLLAPSE = 'beforecollapse' , | ||
} | ||
} | ||
declare module 'goog:goog.ui.tree.BaseNode.EventType' { | ||
import EventType = ಠ_ಠ.clutz.goog.ui.tree.BaseNode.EventType; | ||
export default EventType; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/test/java/com/google/javascript/clutz/goog_ui_component.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
goog.provide('goog.ui.Component'); | ||
goog.provide('goog.ui.Component.EventType'); | ||
goog.provide('goog.ui.tree.BaseNode'); | ||
goog.provide('goog.ui.tree.BaseNode.EventType'); | ||
|
||
/** | ||
* @constructor | ||
*/ | ||
goog.ui.Component = function() {}; | ||
|
||
/** | ||
* @enum {string} | ||
*/ | ||
goog.ui.Component.EventType = { | ||
ACTION: 'action' | ||
}; | ||
|
||
/** | ||
* @constructor | ||
* @extends {goog.ui.Component} | ||
*/ | ||
goog.ui.tree.BaseNode = function() {}; | ||
|
||
/** | ||
* @enum {string} | ||
*/ | ||
goog.ui.tree.BaseNode.EventType = { | ||
BEFORE_COLLAPSE: 'beforecollapse' | ||
}; |
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.
Uh oh!
There was an error while loading. Please reload this page.