Convert embed/gr-diff and gr-diff-root to ts

Change-Id: Ia90fa5d7282521acf54a838f6a5b7279cdddb7fd
This commit is contained in:
Dmitrii Filippov
2020-10-14 21:46:31 +02:00
committed by Luca Milanesio
parent b354e6b661
commit 5808016509
2 changed files with 10 additions and 11 deletions

View File

@@ -15,22 +15,21 @@
* limitations under the License.
*/
// We need to use goog.declareModuleId internally in google for TS-imports-JS
// case. To avoid errors when goog is not available, the empty implementation is
// added.
window.goog = window.goog || {declareModuleId(name) {}};
// TODO(dmfilippov): remove bundled-polymer.js imports when the following issue
// https://github.com/Polymer/polymer-resin/issues/9 is resolved.
// Because gr-diff.js is a shared component, it shouldn' pollute global
// variables. If an application wants to use Polymer global variable -
// the app must assign/import it and do not rely on the Polymer variable
// exposed by shared gr-diff component.
import '../scripts/bundled-polymer.js';
import '../elements/diff/gr-diff/gr-diff.js';
import '../elements/diff/gr-diff-cursor/gr-diff-cursor.js';
import {initDiffAppContext} from './gr-diff-app-context-init.js';
import {GrDiffLine, GrDiffLineType} from '../elements/diff/gr-diff/gr-diff-line.js';
import {GrAnnotation} from '../elements/diff/gr-diff-highlight/gr-annotation.js';
import '../scripts/bundled-polymer';
import '../elements/diff/gr-diff/gr-diff';
import '../elements/diff/gr-diff-cursor/gr-diff-cursor';
import {initDiffAppContext} from './gr-diff-app-context-init';
import {
GrDiffLine,
GrDiffLineType,
} from '../elements/diff/gr-diff/gr-diff-line';
import {GrAnnotation} from '../elements/diff/gr-diff-highlight/gr-annotation';
// Setup appContext for diff.
// TODO (dmfilippov): find a better solution

View File

@@ -15,4 +15,4 @@
* limitations under the License.
*/
import '../elements/diff/gr-diff/gr-diff.js';
import '../elements/diff/gr-diff/gr-diff';