From 9c272c44e31679d8610225b9d67865c2c06de28e Mon Sep 17 00:00:00 2001 From: Ankita Saxena Date: Sat, 10 Aug 2019 02:08:18 +0530 Subject: [PATCH] Fix typescript errors and add a new config file for compilation checks (#7293) * Fix errors * Remove extra conversion * Fix lint * Disable frontend test * Enable test * Add default imports * Enable webpack to halt in case of errors * Add async for only prod mode * Fix import issues * Fix subsequent var dec issue * Add semicolon * Fix test * Test that webpack fails on compilation errors * Webpack fails, revert test commit * Remove new errors --- .github/CODEOWNERS | 1 + core/templates/dev/head/App.ts | 4 +-- core/templates/dev/head/AppInit.ts | 2 -- core/templates/dev/head/AppSpec.ts | 8 ++--- core/templates/dev/head/app.constants.ajs.ts | 2 +- .../audio-file-uploader.directive.ts | 2 +- .../image-uploader.directive.ts | 5 +-- .../question-player.directive.ts | 4 +-- .../question-player-state.service.spec.ts | 8 ++--- .../rating-computation.service.spec.ts | 2 +- .../score-ring/score-ring.directive.ts | 13 ++++--- .../state-editor.service.spec.ts | 2 +- .../state-property.service.spec.ts | 2 +- ...state-interaction-editor.directive.spec.ts | 2 +- ...erClassificationResultObjectFactorySpec.ts | 2 +- .../classifier/ClassifierObjectFactorySpec.ts | 2 +- .../CollectionPlaythroughObjectFactory.ts | 2 +- .../CollectionRightsObjectFactory.ts | 2 +- .../CollectionRightsObjectFactorySpec.ts | 2 +- .../collection/CollectionUpdateServiceSpec.ts | 2 +- .../CollectionValidationServiceSpec.ts | 2 +- .../GuestCollectionProgressObjectFactory.ts | 2 +- ...uestCollectionProgressObjectFactorySpec.ts | 2 +- .../GuestCollectionProgressServiceSpec.ts | 2 +- .../CreatorDashboardBackendApiServiceSpec.ts | 2 +- .../editor/undo_redo/ChangeObjectFactory.ts | 2 +- .../undo_redo/ChangeObjectFactorySpec.ts | 2 +- .../editor/undo_redo/UndoRedoServiceSpec.ts | 2 +- .../exploration/AnswerStatsObjectFactory.ts | 2 +- .../ExplorationDraftObjectFactorySpec.ts | 2 +- .../ExplorationObjectFactorySpec.ts | 10 +++--- .../InteractionObjectFactorySpec.ts | 2 +- .../exploration/ParamChangeObjectFactory.ts | 2 +- .../ParamSpecsObjectFactorySpec.ts | 2 +- .../exploration/ParamTypeObjectFactory.ts | 2 +- .../exploration/ParamTypeObjectFactorySpec.ts | 2 +- .../RecordedVoiceoversObjectFactorySpec.ts | 2 +- .../exploration/StatesObjectFactorySpec.ts | 8 ++--- .../exploration/VoiceoverObjectFactorySpec.ts | 2 +- .../WrittenTranslationObjectFactorySpec.ts | 2 +- ...FeedbackMessageSummaryObjectFactorySpec.ts | 2 +- .../FeedbackThreadObjectFactorySpec.ts | 2 +- .../FeedbackThreadSummaryObjectFactorySpec.ts | 2 +- ...erDashboardActivityIdsObjectFactorySpec.ts | 2 +- .../LearnerDashboardBackendApiServiceSpec.ts | 2 +- ...earnerDashboardIdsBackendApiServiceSpec.ts | 2 +- .../question/QuestionObjectFactorySpec.ts | 10 +++--- .../question/QuestionUpdateServiceSpec.ts | 10 +++--- .../skill/ConceptCardObjectFactorySpec.ts | 6 ++-- .../skill/MisconceptionObjectFactorySpec.ts | 2 +- .../skill/SkillDifficultyObjectFactorySpec.ts | 2 +- .../domain/skill/SkillObjectFactorySpec.ts | 8 ++--- .../skill/SkillRightsObjectFactorySpec.ts | 2 +- .../skill/SkillSummaryObjectFactorySpec.ts | 2 +- .../domain/skill/SkillUpdateServiceSpec.ts | 10 +++--- .../state_card/StateCardObjectFactorySpec.ts | 8 ++--- ...eedbackImprovementCardObjectFactorySpec.ts | 32 ++++++++--------- .../ImprovementActionButtonObjectFactory.ts | 4 +-- ...mprovementActionButtonObjectFactorySpec.ts | 2 +- ...throughImprovementCardObjectFactorySpec.ts | 4 +-- .../PlaythroughIssueObjectFactorySpec.ts | 2 +- ...gestionImprovementCardObjectFactorySpec.ts | 32 ++++++++--------- .../domain/story/StoryUpdateServiceSpec.ts | 2 +- .../StoryPlaythroughObjectFactorySpec.ts | 1 + .../suggestion/SuggestionObjectFactorySpec.ts | 2 +- .../SuggestionThreadObjectFactorySpec.ts | 2 +- .../domain/topic/SubtopicObjectFactorySpec.ts | 2 +- .../SubtopicPageContentsObjectFactorySpec.ts | 6 ++-- .../topic/SubtopicPageObjectFactorySpec.ts | 6 ++-- .../domain/topic/TopicObjectFactorySpec.ts | 2 +- .../topic/TopicRightsObjectFactorySpec.ts | 2 +- .../domain/topic/TopicUpdateServiceSpec.ts | 10 +++--- .../domain/user/UserInfoObjectFactorySpec.ts | 2 +- .../AudioLanguageObjectFactorySpec.ts | 2 +- ...generatedAudioLanguageObjectFactorySpec.ts | 3 +- .../utilities/LanguageUtilServiceSpec.ts | 4 +-- .../pages/about-page/about-page.module.ts | 2 +- .../pages/admin-page/admin-page.module.ts | 2 +- .../admin-task-manager.service.spec.ts | 2 +- .../collection-editor-page.module.ts | 2 +- .../collection-editor-state.service.spec.ts | 4 +-- .../collection-linearizer.service.spec.ts | 2 +- .../collection-player-page.module.ts | 2 +- .../pages/contact-page/contact-page.module.ts | 2 +- .../creator-dashboard-page.controller.spec.ts | 8 ++--- .../creator-dashboard-page.module.ts | 3 +- .../pages/donate-page/donate-page.module.ts | 2 +- .../email-dashboard-page.module.ts | 2 +- .../email-dashboard-result.module.ts | 2 +- .../pages/error-pages/error-page.module.ts | 2 +- .../exploration-editor-tab.directive.spec.ts | 24 ++++++------- .../state-graph-visualization.directive.ts | 23 ++++++++----- .../answer-groups-cache.service.spec.ts | 4 +-- .../services/answer-groups-cache.service.ts | 2 +- .../interaction-details-cache.service.spec.ts | 4 +-- .../interaction-details-cache.service.ts | 2 +- .../solution-validity.service.spec.ts | 2 +- .../solution-verification.service.spec.ts | 2 +- .../training-data.service.spec.ts | 20 +++++------ .../exploration-editor-page.module.ts | 2 +- .../services/thread-data.service.spec.ts | 4 +-- .../thread-status-display.service.spec.ts | 2 +- .../services/thread-status-display.service.ts | 2 +- .../history-tab/history-tab.directive.spec.ts | 14 ++++---- .../services/compare-versions.service.spec.ts | 10 +++--- .../services/version-tree.service.spec.ts | 2 +- .../services/version-tree.service.ts | 2 +- .../services/angular-name.service.spec.ts | 2 +- .../exploration-rights.service.spec.ts | 2 +- .../exploration-states.service.spec.ts | 18 +++++----- .../learner-action-render.service.spec.ts | 24 ++++++------- ...ate-improvement-suggestion.service.spec.ts | 8 ++--- .../translation-status.service.spec.ts | 18 +++++----- .../exploration-player-page.module.ts | 2 +- .../answer-classification.service.spec.ts | 12 +++---- .../services/audio-preloader.service.spec.ts | 20 +++++------ ...audio-translation-language.service.spec.ts | 4 +-- .../audio-translation-manager.service.spec.ts | 8 ++--- .../audio-translation-manager.service.ts | 2 +- .../current-interaction.service.spec.ts | 10 +++--- ...image-filenames-from-state.service.spec.ts | 10 +++--- .../services/image-preloader.service.spec.ts | 16 ++++----- .../services/learner-params.service.spec.ts | 2 +- .../services/learner-params.service.ts | 2 +- .../services/number-attempts.service.spec.ts | 2 +- .../services/player-position.service.spec.ts | 4 +-- .../player-transcript.service.spec.ts | 4 +-- .../state-classifier-mapping.service.spec.ts | 2 +- .../get-started-page.module.ts | 2 +- .../stewards-landing-page.module.ts | 2 +- .../topic-landing-page.module.ts | 2 +- .../learner-dashboard-page.module.ts | 2 +- .../library-page.controller.spec.ts | 4 +-- .../pages/library-page/library-page.module.ts | 2 +- .../maintenance-page.module.ts | 2 +- .../moderator-page/moderator-page.module.ts | 2 +- .../notifications-dashboard-page.module.ts | 2 +- .../practice-session-page.module.ts | 2 +- .../preferences-page.controller.spec.ts | 6 ++-- .../preferences-page.module.ts | 2 +- .../pages/privacy-page/privacy-page.module.ts | 2 +- .../pages/profile-page/profile-page.module.ts | 2 +- .../review-test-page.module.ts | 2 +- .../pages/signup-page/signup-page.module.ts | 2 +- .../skill-editor-state.service.spec.ts | 10 +++--- .../skill-editor-page.module.ts | 2 +- .../pages/splash-page/splash-page.module.ts | 2 +- .../story-editor-state.service.spec.ts | 2 +- .../story-editor-page.module.ts | 2 +- .../story-viewer-page.module.ts | 2 +- .../pages/teach-page/teach-page.module.ts | 2 +- .../pages/terms-page/terms-page.module.ts | 2 +- .../pages/thanks-page/thanks-page.module.ts | 2 +- .../topic-editor-state.service.spec.ts | 10 +++--- .../topic-editor-page.module.ts | 2 +- .../topic-viewer-page.module.ts | 2 +- ...topics-and-skills-dashboard-page.module.ts | 2 +- .../services/AssetsBackendApiServiceSpec.ts | 6 ++-- .../services/AutoplayedVideosServiceSpec.ts | 2 +- .../services/CodeNormalizerServiceSpec.ts | 2 +- .../dev/head/services/CsrfTokenService.ts | 8 ++--- .../dev/head/services/CsrfTokenServiceSpec.ts | 8 ++--- .../head/services/EditabilityServiceSpec.ts | 2 +- .../services/ImprovementCardServiceSpec.ts | 34 +++++++++---------- .../head/services/ImprovementsServiceSpec.ts | 2 +- .../head/services/LocalStorageServiceSpec.ts | 2 +- .../dev/head/services/PageTitleServiceSpec.ts | 2 +- .../PlaythroughIssuesBackendApiServiceSpec.ts | 2 +- .../head/services/PlaythroughIssuesService.ts | 4 +-- .../head/services/PlaythroughServiceSpec.ts | 2 +- .../services/StateRulesStatsServiceSpec.ts | 6 ++-- .../StateTopAnswersStatsServiceSpec.ts | 20 +++++------ .../dev/head/services/UserServiceSpec.ts | 2 +- core/tests/karma.conf.ts | 6 +++- .../classifiers/SVMPredictionServiceSpec.ts | 4 +-- .../WinnowingPreprocessingServiceSpec.ts | 2 +- .../CodeRepl/CodeReplPredictionServiceSpec.ts | 6 ++-- .../directives/CodeReplRulesServiceSpec.ts | 2 +- .../CodeRepl/directives/CodeReplSpec.ts | 2 +- .../CodeReplValidationServiceSpec.ts | 2 +- .../ContinueValidationServiceSpec.ts | 2 +- ...agAndDropSortInputValidationServiceSpec.ts | 2 +- .../FractionInputValidationServiceSpec.ts | 2 +- .../directives/GraphInputRulesServiceSpec.ts | 2 +- .../GraphInputValidationServiceSpec.ts | 2 +- .../ImageClickInputRulesServiceSpec.ts | 2 +- .../InteractiveMapValidationServiceSpec.ts | 2 +- ...ItemSelectionInputValidationServiceSpec.ts | 2 +- .../LogicProofValidationServiceSpec.ts | 2 +- .../MathExpressionInputRulesServiceSpec.ts | 2 +- .../MusicNotesInputValidationServiceSpec.ts | 2 +- .../NumberWithUnitsValidationServiceSpec.ts | 2 +- .../NumericInputValidationServiceSpec.ts | 2 +- .../PencilCodeEditorRulesServiceSpec.ts | 2 +- .../SetInputValidationServiceSpec.ts | 2 +- .../TextInputPredictionServiceSpec.ts | 4 +-- .../TextInputValidationServiceSpec.ts | 2 +- extensions/interactions/baseValidatorSpec.ts | 2 +- extensions/interactions/rulesSpec.ts | 4 +-- tsconfig-for-compile-check.json | 28 +++++++++++++++ tsconfig.json | 13 ++++++- typings/custom-scope-defs.d.ts | 23 +++++++------ typings/globals.d.ts | 8 +++++ webpack.config.ts | 4 +-- webpack.dev.config.ts | 11 +++++- webpack.prod.config.ts | 12 ++++++- 206 files changed, 534 insertions(+), 462 deletions(-) create mode 100644 tsconfig-for-compile-check.json create mode 100644 typings/globals.d.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5cefd5b643a2..9830804aebb5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -14,6 +14,7 @@ # Angular Migration team /typings/ @ankita240796 /tsconfig.json @ankita240796 +/tsconfig-for-compile-check.json @ankita240796 # Answer classification team. diff --git a/core/templates/dev/head/App.ts b/core/templates/dev/head/App.ts index 4658518d7d53..101e007cf6aa 100644 --- a/core/templates/dev/head/App.ts +++ b/core/templates/dev/head/App.ts @@ -65,8 +65,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('app.constants.ajs.ts'); -// The following file uses constants in app.constants.ts and hence needs to be -// loaded after app.constants.ts +// The following file uses constants in app.constants and hence needs to be +// loaded after app.constants require('I18nFooter.ts'); angular.module('oppia').config([ diff --git a/core/templates/dev/head/AppInit.ts b/core/templates/dev/head/AppInit.ts index 56d2ab015d64..efffe03a29c8 100644 --- a/core/templates/dev/head/AppInit.ts +++ b/core/templates/dev/head/AppInit.ts @@ -58,8 +58,6 @@ const bootstrapFn = (extraProviders: StaticProvider[]) => { }; const downgradedModule = downgradeModule(bootstrapFn); -declare var angular: any; - angular.module('oppia', [ 'dndLists', 'headroom', 'infinite-scroll', 'ngAnimate', 'ngAudio', 'ngCookies', 'ngImgCrop', 'ngJoyRide', 'ngMaterial', diff --git a/core/templates/dev/head/AppSpec.ts b/core/templates/dev/head/AppSpec.ts index df2cec151608..79575a082c55 100644 --- a/core/templates/dev/head/AppSpec.ts +++ b/core/templates/dev/head/AppSpec.ts @@ -19,12 +19,12 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // App.ts is upgraded to Angular 8. import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. describe('Constants Generating', function() { diff --git a/core/templates/dev/head/app.constants.ajs.ts b/core/templates/dev/head/app.constants.ajs.ts index c302fdf459cb..4cf5828c0151 100644 --- a/core/templates/dev/head/app.constants.ajs.ts +++ b/core/templates/dev/head/app.constants.ajs.ts @@ -18,7 +18,7 @@ // TODO(#7092): Delete this file once migration is complete and these AngularJS // equivalents of the Angular constants are no longer needed. -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; for (var constantName in constants) { angular.module('oppia').constant(constantName, constants[constantName]); diff --git a/core/templates/dev/head/components/forms/custom-forms-directives/audio-file-uploader.directive.ts b/core/templates/dev/head/components/forms/custom-forms-directives/audio-file-uploader.directive.ts index e7f2943c0f22..d5f7c7dceb3b 100644 --- a/core/templates/dev/head/components/forms/custom-forms-directives/audio-file-uploader.directive.ts +++ b/core/templates/dev/head/components/forms/custom-forms-directives/audio-file-uploader.directive.ts @@ -68,7 +68,7 @@ angular.module('oppia').directive('audioFileUploader', [ 'audio-file-uploader-form' + IdGenerationService.generateNewId()); angular.element(document).on( 'change', '.' + scope.inputFieldClassName, function(evt) { - var file = evt.currentTarget.files[0]; + var file = (evt.currentTarget).files[0]; if (!file) { scope.onFileCleared(); return; diff --git a/core/templates/dev/head/components/forms/custom-forms-directives/image-uploader.directive.ts b/core/templates/dev/head/components/forms/custom-forms-directives/image-uploader.directive.ts index 085fc46f9792..4beda40b05f3 100644 --- a/core/templates/dev/head/components/forms/custom-forms-directives/image-uploader.directive.ts +++ b/core/templates/dev/head/components/forms/custom-forms-directives/image-uploader.directive.ts @@ -103,8 +103,9 @@ angular.module('oppia').directive('imageUploader', [ 'image-uploader-file-input' + IdGenerationService.generateNewId()); angular.element(document).on( 'change', '.' + scope.fileInputClassName, function(evt) { - var file = evt.currentTarget.files[0]; - var filename = evt.target.value.split(/(\\|\/)/g).pop(); + var file = (evt.currentTarget).files[0]; + var filename = (evt.target).value.split( + /(\\|\/)/g).pop(); scope.errorMessage = validateUploadedFile(file, filename); if (!scope.errorMessage) { // Only fire this event if validations pass. diff --git a/core/templates/dev/head/components/question-directives/question-player/question-player.directive.ts b/core/templates/dev/head/components/question-directives/question-player/question-player.directive.ts index 066a0ea3c8df..400bea3202dc 100644 --- a/core/templates/dev/head/components/question-directives/question-player/question-player.directive.ts +++ b/core/templates/dev/head/components/question-directives/question-player/question-player.directive.ts @@ -420,8 +420,8 @@ angular.module('oppia').directive('questionPlayer', [ WRONG_ANSWER_PENALTY_FOR_MASTERY; } } else { - for (var skillId in masteryChangePerQuestion) { - masteryChangePerQuestion[skillId] -= + for (var masterySkillId in masteryChangePerQuestion) { + masteryChangePerQuestion[masterySkillId] -= WRONG_ANSWER_PENALTY_FOR_MASTERY; } } diff --git a/core/templates/dev/head/components/question-directives/question-player/services/question-player-state.service.spec.ts b/core/templates/dev/head/components/question-directives/question-player/services/question-player-state.service.spec.ts index ea671c31b63b..0120dd21a3ef 100644 --- a/core/templates/dev/head/components/question-directives/question-player/services/question-player-state.service.spec.ts +++ b/core/templates/dev/head/components/question-directives/question-player/services/question-player-state.service.spec.ts @@ -19,12 +19,12 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // question-player-state.service.ts is upgraded to Angular 8. import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/core/templates/dev/head/components/ratings/rating-computation/rating-computation.service.spec.ts b/core/templates/dev/head/components/ratings/rating-computation/rating-computation.service.spec.ts index d50b9d10e32c..9630c28446b3 100644 --- a/core/templates/dev/head/components/ratings/rating-computation/rating-computation.service.spec.ts +++ b/core/templates/dev/head/components/ratings/rating-computation/rating-computation.service.spec.ts @@ -17,7 +17,7 @@ */ import { RatingComputationService } from - 'components/ratings/rating-computation/rating-computation.service.ts'; + 'components/ratings/rating-computation/rating-computation.service'; describe('Rating computation service', () => { let ratingComputationService: RatingComputationService; diff --git a/core/templates/dev/head/components/score-ring/score-ring.directive.ts b/core/templates/dev/head/components/score-ring/score-ring.directive.ts index 93c1db16b3ca..392ae1419e73 100644 --- a/core/templates/dev/head/components/score-ring/score-ring.directive.ts +++ b/core/templates/dev/head/components/score-ring/score-ring.directive.ts @@ -31,16 +31,19 @@ angular.module('oppia').directive('scoreRing', [ controller: ['$scope', '$timeout', '$window', 'COLORS_FOR_PASS_FAIL_MODE', function($scope, $timeout, $window, COLORS_FOR_PASS_FAIL_MODE) { var ctrl = this; + + const circle = ( + document.querySelector('.score-ring-circle')); + const radius = circle.r.baseVal.value; + const circumference = (radius * 2 * Math.PI); + var setScore = function(percent) { const offset = circumference - percent / 100 * circumference; - circle.style.strokeDashoffset = offset; + circle.style.strokeDashoffset = offset.toString(); }; - const circle = document.querySelector('.score-ring-circle'); - const radius = circle.r.baseVal.value; - const circumference = radius * 2 * Math.PI; circle.style.strokeDasharray = `${circumference} ${circumference}`; - circle.style.strokeDashoffset = circumference; + circle.style.strokeDashoffset = circumference.toString(); $scope.$watch(function() { return ctrl.getScore(); }, function(newScore) { diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-editor.service.spec.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-editor.service.spec.ts index 7600cbf8977c..832839c83d5b 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-editor.service.spec.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-editor.service.spec.ts @@ -18,7 +18,7 @@ /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ require( diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-property.service.spec.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-property.service.spec.ts index 4402d5cdbe6b..1925a34e74b3 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-property.service.spec.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-property.service.spec.ts @@ -20,7 +20,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // state-property.service.ts is upgraded to Angular 8. import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; // ^^^ This block is to be removed. require('pages/exploration-editor-page/services/change-list.service.ts'); diff --git a/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.spec.ts b/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.spec.ts index 245a61409cc9..dc6875975c08 100644 --- a/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.spec.ts +++ b/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.spec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // state-interaction-editor.directive.ts is upgraded to Angular 8. import { ExplorationFeaturesService } from - 'services/ExplorationFeaturesService.ts'; + 'services/ExplorationFeaturesService'; // ^^^ This block is to be removed. require( diff --git a/core/templates/dev/head/domain/classifier/AnswerClassificationResultObjectFactorySpec.ts b/core/templates/dev/head/domain/classifier/AnswerClassificationResultObjectFactorySpec.ts index 4723a8d31fdb..66aaf3e1b30e 100755 --- a/core/templates/dev/head/domain/classifier/AnswerClassificationResultObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/classifier/AnswerClassificationResultObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; require('domain/exploration/OutcomeObjectFactory.ts'); require( diff --git a/core/templates/dev/head/domain/classifier/ClassifierObjectFactorySpec.ts b/core/templates/dev/head/domain/classifier/ClassifierObjectFactorySpec.ts index 2217ede0469b..74e7edea8ba9 100755 --- a/core/templates/dev/head/domain/classifier/ClassifierObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/classifier/ClassifierObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; + 'domain/classifier/ClassifierObjectFactory'; describe('Classifier Object Factory', () => { let classifierObjectFactory: ClassifierObjectFactory; diff --git a/core/templates/dev/head/domain/collection/CollectionPlaythroughObjectFactory.ts b/core/templates/dev/head/domain/collection/CollectionPlaythroughObjectFactory.ts index 8711826438bd..3451b2898111 100644 --- a/core/templates/dev/head/domain/collection/CollectionPlaythroughObjectFactory.ts +++ b/core/templates/dev/head/domain/collection/CollectionPlaythroughObjectFactory.ts @@ -17,7 +17,7 @@ * collection playthrough domain objects. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { downgradeInjectable } from '@angular/upgrade/static'; import { Injectable } from '@angular/core'; diff --git a/core/templates/dev/head/domain/collection/CollectionRightsObjectFactory.ts b/core/templates/dev/head/domain/collection/CollectionRightsObjectFactory.ts index fffaf7bb9e13..c81477ea5a2f 100644 --- a/core/templates/dev/head/domain/collection/CollectionRightsObjectFactory.ts +++ b/core/templates/dev/head/domain/collection/CollectionRightsObjectFactory.ts @@ -17,7 +17,7 @@ * collection rights domain objects. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { downgradeInjectable } from '@angular/upgrade/static'; import { Injectable } from '@angular/core'; diff --git a/core/templates/dev/head/domain/collection/CollectionRightsObjectFactorySpec.ts b/core/templates/dev/head/domain/collection/CollectionRightsObjectFactorySpec.ts index c2a0145a1557..298f7ec05767 100644 --- a/core/templates/dev/head/domain/collection/CollectionRightsObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/collection/CollectionRightsObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { CollectionRightsObjectFactory } from - 'domain/collection/CollectionRightsObjectFactory.ts'; + 'domain/collection/CollectionRightsObjectFactory'; describe('Collection rights object factory', () => { let collectionRightsObjectFactory: CollectionRightsObjectFactory = null; diff --git a/core/templates/dev/head/domain/collection/CollectionUpdateServiceSpec.ts b/core/templates/dev/head/domain/collection/CollectionUpdateServiceSpec.ts index 6f72bc75447d..4d29f29bdd6b 100644 --- a/core/templates/dev/head/domain/collection/CollectionUpdateServiceSpec.ts +++ b/core/templates/dev/head/domain/collection/CollectionUpdateServiceSpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // CollectionUpdateService.ts is upgraded to Angular 8. import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; // ^^^ This block is to be removed. require('domain/collection/CollectionObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/collection/CollectionValidationServiceSpec.ts b/core/templates/dev/head/domain/collection/CollectionValidationServiceSpec.ts index a8eb957d0da7..faa7392ab367 100644 --- a/core/templates/dev/head/domain/collection/CollectionValidationServiceSpec.ts +++ b/core/templates/dev/head/domain/collection/CollectionValidationServiceSpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // CollectionValidationService.ts is upgraded to Angular 8. import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; // ^^^ This block is to be removed. require('domain/collection/CollectionNodeObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactory.ts b/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactory.ts index 85e5e13e121e..e98712a46877 100644 --- a/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactory.ts +++ b/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactory.ts @@ -17,7 +17,7 @@ * represents the progress of a guest playing through a collection. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { downgradeInjectable } from '@angular/upgrade/static'; import { Injectable } from '@angular/core'; diff --git a/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactorySpec.ts b/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactorySpec.ts index d43990e7cfc0..094c9c9229f0 100644 --- a/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { GuestCollectionProgressObjectFactory } from - 'domain/collection/GuestCollectionProgressObjectFactory.ts'; + 'domain/collection/GuestCollectionProgressObjectFactory'; describe('Guest collection progress object factory', () => { let guestCollectionProgressObjectFactory: diff --git a/core/templates/dev/head/domain/collection/GuestCollectionProgressServiceSpec.ts b/core/templates/dev/head/domain/collection/GuestCollectionProgressServiceSpec.ts index 26a3a8835ff3..00ac184d24d2 100644 --- a/core/templates/dev/head/domain/collection/GuestCollectionProgressServiceSpec.ts +++ b/core/templates/dev/head/domain/collection/GuestCollectionProgressServiceSpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // GuestCollectionProgressService.ts is upgraded to Angular 8. import { GuestCollectionProgressObjectFactory } from - 'domain/collection/GuestCollectionProgressObjectFactory.ts'; + 'domain/collection/GuestCollectionProgressObjectFactory'; // ^^^ This block is to be removed. require('domain/collection/CollectionNodeObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/creator_dashboard/CreatorDashboardBackendApiServiceSpec.ts b/core/templates/dev/head/domain/creator_dashboard/CreatorDashboardBackendApiServiceSpec.ts index 5b2d8de219b7..73deac9bfd9b 100644 --- a/core/templates/dev/head/domain/creator_dashboard/CreatorDashboardBackendApiServiceSpec.ts +++ b/core/templates/dev/head/domain/creator_dashboard/CreatorDashboardBackendApiServiceSpec.ts @@ -21,7 +21,7 @@ import { HttpClientTestingModule, HttpTestingController } from import { TestBed, fakeAsync, flushMicrotasks } from '@angular/core/testing'; import { CreatorDashboardBackendApiService } from - 'domain/creator_dashboard/CreatorDashboardBackendApiService.ts'; + 'domain/creator_dashboard/CreatorDashboardBackendApiService'; describe('Creator Dashboard backend API service', () => { let creatorDashboardBackendApiService: diff --git a/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactory.ts b/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactory.ts index 1892545c7c4b..8bf4e72255bf 100644 --- a/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactory.ts +++ b/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactory.ts @@ -21,7 +21,7 @@ // TODO(bhenning): Consolidate the backend ExplorationChange and // CollectionChange domain objects. -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { downgradeInjectable } from '@angular/upgrade/static'; import { Injectable } from '@angular/core'; diff --git a/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactorySpec.ts b/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactorySpec.ts index 94763bab1f37..37b0eefa3fa8 100644 --- a/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; describe('Factory for Change domain objects', function() { let changeObjectFactory: ChangeObjectFactory = null; diff --git a/core/templates/dev/head/domain/editor/undo_redo/UndoRedoServiceSpec.ts b/core/templates/dev/head/domain/editor/undo_redo/UndoRedoServiceSpec.ts index c28d24839016..e1d8a44bc229 100644 --- a/core/templates/dev/head/domain/editor/undo_redo/UndoRedoServiceSpec.ts +++ b/core/templates/dev/head/domain/editor/undo_redo/UndoRedoServiceSpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // UndoRedoService.ts is upgraded to Angular 8. import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; // ^^^ This block is to be removed. require('domain/editor/undo_redo/ChangeObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts b/core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts index 00e350bcefa0..fbb52a79cdc1 100644 --- a/core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts @@ -17,7 +17,7 @@ * particular answer from some particular state. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { Injectable } from '@angular/core'; import { downgradeInjectable } from '@angular/upgrade/static'; diff --git a/core/templates/dev/head/domain/exploration/ExplorationDraftObjectFactorySpec.ts b/core/templates/dev/head/domain/exploration/ExplorationDraftObjectFactorySpec.ts index 943d2e935992..e52fcda7b051 100644 --- a/core/templates/dev/head/domain/exploration/ExplorationDraftObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/exploration/ExplorationDraftObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { ExplorationDraftObjectFactory, ExplorationDraft } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; describe('ExplorationDraftObjectFactory', () => { describe('exploration draft object factory', () => { diff --git a/core/templates/dev/head/domain/exploration/ExplorationObjectFactorySpec.ts b/core/templates/dev/head/domain/exploration/ExplorationObjectFactorySpec.ts index 744500168ae3..d2d1572d90f4 100644 --- a/core/templates/dev/head/domain/exploration/ExplorationObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/exploration/ExplorationObjectFactorySpec.ts @@ -19,14 +19,14 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // ExplorationObjectFactory.ts is upgraded to Angular 8. import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; import { ParamTypeObjectFactory } from - 'domain/exploration/ParamTypeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamTypeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('domain/exploration/ExplorationObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/exploration/InteractionObjectFactorySpec.ts b/core/templates/dev/head/domain/exploration/InteractionObjectFactorySpec.ts index 10e2eee0e05e..9afe7e43a73c 100644 --- a/core/templates/dev/head/domain/exploration/InteractionObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/exploration/InteractionObjectFactorySpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // InteractionObjectFactory.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require('domain/exploration/AnswerGroupObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts b/core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts index 5084c54656b8..c33c89d97247 100644 --- a/core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts @@ -17,7 +17,7 @@ * domain objects. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { Injectable } from '@angular/core'; import { downgradeInjectable } from '@angular/upgrade/static'; diff --git a/core/templates/dev/head/domain/exploration/ParamSpecsObjectFactorySpec.ts b/core/templates/dev/head/domain/exploration/ParamSpecsObjectFactorySpec.ts index cfb5805584b4..b4cf2582561d 100644 --- a/core/templates/dev/head/domain/exploration/ParamSpecsObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/exploration/ParamSpecsObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { ParamTypeObjectFactory } from - 'domain/exploration/ParamTypeObjectFactory.ts'; + 'domain/exploration/ParamTypeObjectFactory'; require('domain/exploration/ParamSpecObjectFactory.ts'); require('domain/exploration/ParamSpecsObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/exploration/ParamTypeObjectFactory.ts b/core/templates/dev/head/domain/exploration/ParamTypeObjectFactory.ts index b9392d862b44..af12a8da085f 100644 --- a/core/templates/dev/head/domain/exploration/ParamTypeObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ParamTypeObjectFactory.ts @@ -17,7 +17,7 @@ * domain objects. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { Injectable } from '@angular/core'; import { downgradeInjectable } from '@angular/upgrade/static'; diff --git a/core/templates/dev/head/domain/exploration/ParamTypeObjectFactorySpec.ts b/core/templates/dev/head/domain/exploration/ParamTypeObjectFactorySpec.ts index 8d691369f9c8..86b1b4f7b4db 100644 --- a/core/templates/dev/head/domain/exploration/ParamTypeObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/exploration/ParamTypeObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { ParamTypeObjectFactory, ParamType } from - 'domain/exploration/ParamTypeObjectFactory.ts'; + 'domain/exploration/ParamTypeObjectFactory'; describe('ParamType objects', () => { let paramType: ParamTypeObjectFactory = null; diff --git a/core/templates/dev/head/domain/exploration/RecordedVoiceoversObjectFactorySpec.ts b/core/templates/dev/head/domain/exploration/RecordedVoiceoversObjectFactorySpec.ts index ec2db950c44a..e8d13bba2af5 100644 --- a/core/templates/dev/head/domain/exploration/RecordedVoiceoversObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/exploration/RecordedVoiceoversObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; require('domain/exploration/RecordedVoiceoversObjectFactory.ts'); require('domain/exploration/VoiceoverObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/exploration/StatesObjectFactorySpec.ts b/core/templates/dev/head/domain/exploration/StatesObjectFactorySpec.ts index 5157627eb996..2630d9428718 100644 --- a/core/templates/dev/head/domain/exploration/StatesObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/exploration/StatesObjectFactorySpec.ts @@ -19,12 +19,12 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // StatesObjectFactory.ts is upgraded to Angular 8. import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('domain/exploration/StatesObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/exploration/VoiceoverObjectFactorySpec.ts b/core/templates/dev/head/domain/exploration/VoiceoverObjectFactorySpec.ts index 1922f121b990..bf1f64871258 100644 --- a/core/templates/dev/head/domain/exploration/VoiceoverObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/exploration/VoiceoverObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { VoiceoverObjectFactory, Voiceover } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; describe('Voiceover object factory', () => { let vof: VoiceoverObjectFactory; diff --git a/core/templates/dev/head/domain/exploration/WrittenTranslationObjectFactorySpec.ts b/core/templates/dev/head/domain/exploration/WrittenTranslationObjectFactorySpec.ts index 016d2d589626..9e504d717a35 100644 --- a/core/templates/dev/head/domain/exploration/WrittenTranslationObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/exploration/WrittenTranslationObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { WrittenTranslationObjectFactory, WrittenTranslation } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; describe('WrittenTranslation object factory', () => { describe('WrittenTranslationObjectFactory', () => { diff --git a/core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactorySpec.ts b/core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactorySpec.ts index 1cea6ba8b80a..c51c82867b1d 100644 --- a/core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { FeedbackMessageSummaryObjectFactory } from - 'domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts'; + 'domain/feedback_message/FeedbackMessageSummaryObjectFactory'; describe('Feedback message object factory', () => { let feedbackMessageSummaryObjectFactory: FeedbackMessageSummaryObjectFactory; diff --git a/core/templates/dev/head/domain/feedback_thread/FeedbackThreadObjectFactorySpec.ts b/core/templates/dev/head/domain/feedback_thread/FeedbackThreadObjectFactorySpec.ts index a27bf3b599c5..15c971f8690b 100644 --- a/core/templates/dev/head/domain/feedback_thread/FeedbackThreadObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/feedback_thread/FeedbackThreadObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { FeedbackThreadObjectFactory } from - 'domain/feedback_thread/FeedbackThreadObjectFactory.ts'; + 'domain/feedback_thread/FeedbackThreadObjectFactory'; describe('Feedback thread object factory', () => { let feedbackThreadObjectFactory: FeedbackThreadObjectFactory; diff --git a/core/templates/dev/head/domain/feedback_thread/FeedbackThreadSummaryObjectFactorySpec.ts b/core/templates/dev/head/domain/feedback_thread/FeedbackThreadSummaryObjectFactorySpec.ts index a40294d1bfcc..de5794881ff7 100644 --- a/core/templates/dev/head/domain/feedback_thread/FeedbackThreadSummaryObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/feedback_thread/FeedbackThreadSummaryObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { FeedbackThreadSummaryObjectFactory } from - 'domain/feedback_thread/FeedbackThreadSummaryObjectFactory.ts'; + 'domain/feedback_thread/FeedbackThreadSummaryObjectFactory'; describe('Feedback thread object factory', () => { let feedbackThreadSummaryObjectFactory: FeedbackThreadSummaryObjectFactory; diff --git a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactorySpec.ts b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactorySpec.ts index ff5ffa04249b..1f0bfd070ba5 100644 --- a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { LearnerDashboardActivityIdsObjectFactory } from - 'domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts'; + 'domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory'; describe('Learner dashboard activity ids object factory', () => { let learnerDashboardActivityIdsObjectFactory: diff --git a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardBackendApiServiceSpec.ts b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardBackendApiServiceSpec.ts index b5b12b577ee0..28996bb059f7 100644 --- a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardBackendApiServiceSpec.ts +++ b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardBackendApiServiceSpec.ts @@ -22,7 +22,7 @@ import { HttpErrorResponse } from '@angular/common/http'; import { TestBed, fakeAsync, flushMicrotasks } from '@angular/core/testing'; import { LearnerDashboardBackendApiService } from - 'domain/learner_dashboard/LearnerDashboardBackendApiService.ts'; + 'domain/learner_dashboard/LearnerDashboardBackendApiService'; describe('Learner Dashboard Backend API Service', () => { let learnerDashboardBackendApiService: diff --git a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIdsBackendApiServiceSpec.ts b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIdsBackendApiServiceSpec.ts index da28b31baf1e..d71eea16757c 100644 --- a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIdsBackendApiServiceSpec.ts +++ b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIdsBackendApiServiceSpec.ts @@ -22,7 +22,7 @@ import { HttpErrorResponse } from '@angular/common/http'; import { TestBed, fakeAsync, flushMicrotasks } from '@angular/core/testing'; import { LearnerDashboardIdsBackendApiService } from - 'domain/learner_dashboard/LearnerDashboardIdsBackendApiService.ts'; + 'domain/learner_dashboard/LearnerDashboardIdsBackendApiService'; describe('Learner Dashboard Backend API Service', () => { var learnerDashboardIdsBackendApiService: diff --git a/core/templates/dev/head/domain/question/QuestionObjectFactorySpec.ts b/core/templates/dev/head/domain/question/QuestionObjectFactorySpec.ts index 6da8e3a30937..c48f9a876af1 100644 --- a/core/templates/dev/head/domain/question/QuestionObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/question/QuestionObjectFactorySpec.ts @@ -19,14 +19,14 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // QuestionObjectFactory.ts is upgraded to Angular 8. import { MisconceptionObjectFactory } from - 'domain/skill/MisconceptionObjectFactory.ts'; + 'domain/skill/MisconceptionObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('domain/question/QuestionObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/question/QuestionUpdateServiceSpec.ts b/core/templates/dev/head/domain/question/QuestionUpdateServiceSpec.ts index 4b7d24da9505..39b242512b17 100644 --- a/core/templates/dev/head/domain/question/QuestionUpdateServiceSpec.ts +++ b/core/templates/dev/head/domain/question/QuestionUpdateServiceSpec.ts @@ -19,14 +19,14 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // QuestionUpdateService.ts is upgraded to Angular 8. import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('App.ts'); diff --git a/core/templates/dev/head/domain/skill/ConceptCardObjectFactorySpec.ts b/core/templates/dev/head/domain/skill/ConceptCardObjectFactorySpec.ts index a905a1f382a7..cc7e958e8172 100644 --- a/core/templates/dev/head/domain/skill/ConceptCardObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/skill/ConceptCardObjectFactorySpec.ts @@ -19,11 +19,11 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // ConceptCardObjectFactory.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('App.ts'); diff --git a/core/templates/dev/head/domain/skill/MisconceptionObjectFactorySpec.ts b/core/templates/dev/head/domain/skill/MisconceptionObjectFactorySpec.ts index 227bc7bd378a..763ffdb96a4e 100644 --- a/core/templates/dev/head/domain/skill/MisconceptionObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/skill/MisconceptionObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { MisconceptionObjectFactory } from - 'domain/skill/MisconceptionObjectFactory.ts'; + 'domain/skill/MisconceptionObjectFactory'; describe('Misconception object factory', () => { describe('MisconceptionObjectFacfory', () => { diff --git a/core/templates/dev/head/domain/skill/SkillDifficultyObjectFactorySpec.ts b/core/templates/dev/head/domain/skill/SkillDifficultyObjectFactorySpec.ts index 4c483a808be1..46691bc7c0f9 100644 --- a/core/templates/dev/head/domain/skill/SkillDifficultyObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/skill/SkillDifficultyObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { SkillDifficultyObjectFactory } from - 'domain/skill/SkillDifficultyObjectFactory.ts'; + 'domain/skill/SkillDifficultyObjectFactory'; describe('Skill Difficulty object factory', function() { describe('SkillDifficultyObjectFactory', function() { diff --git a/core/templates/dev/head/domain/skill/SkillObjectFactorySpec.ts b/core/templates/dev/head/domain/skill/SkillObjectFactorySpec.ts index daa4898859c6..26cae64c144c 100644 --- a/core/templates/dev/head/domain/skill/SkillObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/skill/SkillObjectFactorySpec.ts @@ -19,13 +19,13 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // SkillObjectFactory.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; import { MisconceptionObjectFactory } from - 'domain/skill/MisconceptionObjectFactory.ts'; + 'domain/skill/MisconceptionObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('App.ts'); diff --git a/core/templates/dev/head/domain/skill/SkillRightsObjectFactorySpec.ts b/core/templates/dev/head/domain/skill/SkillRightsObjectFactorySpec.ts index 5979a5e6907d..37aab7bd66ab 100644 --- a/core/templates/dev/head/domain/skill/SkillRightsObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/skill/SkillRightsObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { SkillRightsObjectFactory } from - 'domain/skill/SkillRightsObjectFactory.ts'; + 'domain/skill/SkillRightsObjectFactory'; describe('Skill rights object factory', () => { let skillRightsObjectFactory: SkillRightsObjectFactory; diff --git a/core/templates/dev/head/domain/skill/SkillSummaryObjectFactorySpec.ts b/core/templates/dev/head/domain/skill/SkillSummaryObjectFactorySpec.ts index 8596117ed112..bc6433af04f9 100644 --- a/core/templates/dev/head/domain/skill/SkillSummaryObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/skill/SkillSummaryObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { SkillSummaryObjectFactory } from - 'domain/skill/SkillSummaryObjectFactory.ts'; + 'domain/skill/SkillSummaryObjectFactory'; describe('Skill summary object factory', () => { let skillSummaryObjectFactory: SkillSummaryObjectFactory; diff --git a/core/templates/dev/head/domain/skill/SkillUpdateServiceSpec.ts b/core/templates/dev/head/domain/skill/SkillUpdateServiceSpec.ts index 64bb6dcd97c9..057e0ad648ff 100644 --- a/core/templates/dev/head/domain/skill/SkillUpdateServiceSpec.ts +++ b/core/templates/dev/head/domain/skill/SkillUpdateServiceSpec.ts @@ -19,15 +19,15 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // SkillUpdateService.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; import { MisconceptionObjectFactory } from - 'domain/skill/MisconceptionObjectFactory.ts'; + 'domain/skill/MisconceptionObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('App.ts'); diff --git a/core/templates/dev/head/domain/state_card/StateCardObjectFactorySpec.ts b/core/templates/dev/head/domain/state_card/StateCardObjectFactorySpec.ts index 5a723f161d29..938b1674c4e8 100644 --- a/core/templates/dev/head/domain/state_card/StateCardObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/state_card/StateCardObjectFactorySpec.ts @@ -19,12 +19,12 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // StateCardObjectFactory.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('domain/exploration/InteractionObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/statistics/FeedbackImprovementCardObjectFactorySpec.ts b/core/templates/dev/head/domain/statistics/FeedbackImprovementCardObjectFactorySpec.ts index e4c5a0764940..479d331d1cbb 100644 --- a/core/templates/dev/head/domain/statistics/FeedbackImprovementCardObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/statistics/FeedbackImprovementCardObjectFactorySpec.ts @@ -19,37 +19,37 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // FeedbackImprovementCardObjectFactory.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; -import { EditabilityService } from 'services/EditabilityService.ts'; + 'domain/classifier/ClassifierObjectFactory'; +import { EditabilityService } from 'services/EditabilityService'; import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; import { FeedbackThreadObjectFactory } from - 'domain/feedback_thread/FeedbackThreadObjectFactory.ts'; + 'domain/feedback_thread/FeedbackThreadObjectFactory'; import { ImprovementActionButtonObjectFactory } from - 'domain/statistics/ImprovementActionButtonObjectFactory.ts'; + 'domain/statistics/ImprovementActionButtonObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; import { SuggestionObjectFactory } from - 'domain/suggestion/SuggestionObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/suggestion/SuggestionObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ -import { SuggestionModalService } from 'services/SuggestionModalService.ts'; +import { SuggestionModalService } from 'services/SuggestionModalService'; /* eslint-disable max-len */ import { ThreadStatusDisplayService } from - 'pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts'; + 'pages/exploration-editor-page/feedback-tab/services/thread-status-display.service'; /* eslint-enable max-len */ -import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory.ts'; +import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('domain/statistics/FeedbackImprovementCardObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts b/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts index 8d6b4d6b8bcc..79152209b279 100644 --- a/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts +++ b/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts @@ -81,8 +81,8 @@ export class ImprovementActionButtonObjectFactory { // 'any' because '_actionFunc' is a function with varying return types // depending upon the arguments paased to the constructor of // 'ImprovementActionButton'. - createNew(text: string, actionFunc: any, cssClass: string) { - return new ImprovementActionButton(text, actionFunc, cssClass); + createNew(text: string, cssClass: string, actionFunc: any) { + return new ImprovementActionButton(text, cssClass, actionFunc); } } diff --git a/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactorySpec.ts b/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactorySpec.ts index 32c760576672..3b7352e2efa7 100644 --- a/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { ImprovementActionButtonObjectFactory } from - 'domain/statistics/ImprovementActionButtonObjectFactory.ts'; + 'domain/statistics/ImprovementActionButtonObjectFactory'; describe('ImprovementActionButtonObjectFactory', () => { let improvementActionButtonObjectFactory: diff --git a/core/templates/dev/head/domain/statistics/PlaythroughImprovementCardObjectFactorySpec.ts b/core/templates/dev/head/domain/statistics/PlaythroughImprovementCardObjectFactorySpec.ts index adfe811662de..5c9748c63e6b 100644 --- a/core/templates/dev/head/domain/statistics/PlaythroughImprovementCardObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/statistics/PlaythroughImprovementCardObjectFactorySpec.ts @@ -19,9 +19,9 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // PlaythroughImprovementCardObjectFactory.ts is upgraded to Angular 8. import { ImprovementActionButtonObjectFactory } from - 'domain/statistics/ImprovementActionButtonObjectFactory.ts'; + 'domain/statistics/ImprovementActionButtonObjectFactory'; import { PlaythroughIssueObjectFactory } from - 'domain/statistics/PlaythroughIssueObjectFactory.ts'; + 'domain/statistics/PlaythroughIssueObjectFactory'; // ^^^ This block is to be removed. require('domain/statistics/PlaythroughImprovementCardObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/statistics/PlaythroughIssueObjectFactorySpec.ts b/core/templates/dev/head/domain/statistics/PlaythroughIssueObjectFactorySpec.ts index e6d043c29b9f..a476ca2fae39 100644 --- a/core/templates/dev/head/domain/statistics/PlaythroughIssueObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/statistics/PlaythroughIssueObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { PlaythroughIssueObjectFactory, ExplorationIssue } from - 'domain/statistics/PlaythroughIssueObjectFactory.ts'; + 'domain/statistics/PlaythroughIssueObjectFactory'; describe('Playthrough Issue Object Factory', () => { let piof: PlaythroughIssueObjectFactory; diff --git a/core/templates/dev/head/domain/statistics/SuggestionImprovementCardObjectFactorySpec.ts b/core/templates/dev/head/domain/statistics/SuggestionImprovementCardObjectFactorySpec.ts index 37919bff5dbc..500d95d5636f 100644 --- a/core/templates/dev/head/domain/statistics/SuggestionImprovementCardObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/statistics/SuggestionImprovementCardObjectFactorySpec.ts @@ -19,37 +19,37 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // SuggestionImprovementCardObjectFactory.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; -import { EditabilityService } from 'services/EditabilityService.ts'; + 'domain/classifier/ClassifierObjectFactory'; +import { EditabilityService } from 'services/EditabilityService'; import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; import { FeedbackThreadObjectFactory } from - 'domain/feedback_thread/FeedbackThreadObjectFactory.ts'; + 'domain/feedback_thread/FeedbackThreadObjectFactory'; import { ImprovementActionButtonObjectFactory } from - 'domain/statistics/ImprovementActionButtonObjectFactory.ts'; + 'domain/statistics/ImprovementActionButtonObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ -import { SuggestionModalService } from 'services/SuggestionModalService.ts'; +import { SuggestionModalService } from 'services/SuggestionModalService'; import { SuggestionObjectFactory } from - 'domain/suggestion/SuggestionObjectFactory.ts'; + 'domain/suggestion/SuggestionObjectFactory'; /* eslint-disable max-len */ import { ThreadStatusDisplayService } from - 'pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts'; + 'pages/exploration-editor-page/feedback-tab/services/thread-status-display.service'; /* eslint-enable max-len */ -import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory.ts'; +import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('domain/statistics/SuggestionImprovementCardObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/story/StoryUpdateServiceSpec.ts b/core/templates/dev/head/domain/story/StoryUpdateServiceSpec.ts index fdbef3d22ce8..07ea769b442b 100644 --- a/core/templates/dev/head/domain/story/StoryUpdateServiceSpec.ts +++ b/core/templates/dev/head/domain/story/StoryUpdateServiceSpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // StoryUpdateService.ts is upgraded to Angular 8. import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; // ^^^ This block is to be removed. require('domain/editor/undo_redo/UndoRedoService.ts'); diff --git a/core/templates/dev/head/domain/story_viewer/StoryPlaythroughObjectFactorySpec.ts b/core/templates/dev/head/domain/story_viewer/StoryPlaythroughObjectFactorySpec.ts index bf7ec13d1c79..5945785d33d9 100644 --- a/core/templates/dev/head/domain/story_viewer/StoryPlaythroughObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/story_viewer/StoryPlaythroughObjectFactorySpec.ts @@ -22,6 +22,7 @@ describe('Story playthrough object factory', function() { var StoryPlaythroughObjectFactory = null; var _sampleSubtopic = null; var _sampleStoryNode = null; + var _samplePlaythroughObject = null; beforeEach(angular.mock.module('oppia')); diff --git a/core/templates/dev/head/domain/suggestion/SuggestionObjectFactorySpec.ts b/core/templates/dev/head/domain/suggestion/SuggestionObjectFactorySpec.ts index 53ad3431d978..b4645f565ae0 100644 --- a/core/templates/dev/head/domain/suggestion/SuggestionObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/suggestion/SuggestionObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { SuggestionObjectFactory } from - 'domain/suggestion/SuggestionObjectFactory.ts'; + 'domain/suggestion/SuggestionObjectFactory'; describe('Suggestion object factory', () => { let suggestionObjectFactory: SuggestionObjectFactory; diff --git a/core/templates/dev/head/domain/suggestion/SuggestionThreadObjectFactorySpec.ts b/core/templates/dev/head/domain/suggestion/SuggestionThreadObjectFactorySpec.ts index fe5b453ad0fb..9f7dad03dbb1 100644 --- a/core/templates/dev/head/domain/suggestion/SuggestionThreadObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/suggestion/SuggestionThreadObjectFactorySpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // SuggestionThreadObjectFactory.ts is upgraded to Angular 8. import { SuggestionObjectFactory } from - 'domain/suggestion/SuggestionObjectFactory.ts'; + 'domain/suggestion/SuggestionObjectFactory'; // ^^^ This block is to be removed. require('domain/suggestion/SuggestionThreadObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/topic/SubtopicObjectFactorySpec.ts b/core/templates/dev/head/domain/topic/SubtopicObjectFactorySpec.ts index f901f06cfd7f..1dfb290223d2 100644 --- a/core/templates/dev/head/domain/topic/SubtopicObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/topic/SubtopicObjectFactorySpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // SubtopicObjectFactory.ts is upgraded to Angular 8. import { SkillSummaryObjectFactory } from - 'domain/skill/SkillSummaryObjectFactory.ts'; + 'domain/skill/SkillSummaryObjectFactory'; // ^^^ This block is to be removed. require('domain/topic/SubtopicObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactorySpec.ts b/core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactorySpec.ts index 23cbf5b609c4..1685ef3ead5c 100644 --- a/core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactorySpec.ts @@ -19,11 +19,11 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // SubtopicPageContentsObjectFactory.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('domain/topic/SubtopicPageContentsObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/topic/SubtopicPageObjectFactorySpec.ts b/core/templates/dev/head/domain/topic/SubtopicPageObjectFactorySpec.ts index 2ca5f0775d25..9170767009fb 100644 --- a/core/templates/dev/head/domain/topic/SubtopicPageObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/topic/SubtopicPageObjectFactorySpec.ts @@ -19,11 +19,11 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // SubtopicPageObjectFactory.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('domain/topic/SubtopicPageObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/topic/TopicObjectFactorySpec.ts b/core/templates/dev/head/domain/topic/TopicObjectFactorySpec.ts index 8c5a394f7915..105ac3c6700f 100644 --- a/core/templates/dev/head/domain/topic/TopicObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/topic/TopicObjectFactorySpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // TopicObjectFactory.ts is upgraded to Angular 8. import { SkillSummaryObjectFactory } from - 'domain/skill/SkillSummaryObjectFactory.ts'; + 'domain/skill/SkillSummaryObjectFactory'; // ^^^ This block is to be removed. require('domain/topic/TopicObjectFactory.ts'); diff --git a/core/templates/dev/head/domain/topic/TopicRightsObjectFactorySpec.ts b/core/templates/dev/head/domain/topic/TopicRightsObjectFactorySpec.ts index 3f7fbaa0c04c..ff33c6ae5c26 100644 --- a/core/templates/dev/head/domain/topic/TopicRightsObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/topic/TopicRightsObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { TopicRightsObjectFactory, TopicRights } from - 'domain/topic/TopicRightsObjectFactory.ts'; + 'domain/topic/TopicRightsObjectFactory'; describe('Topic rights object factory', () => { let topicRightsObjectFactory: TopicRightsObjectFactory; diff --git a/core/templates/dev/head/domain/topic/TopicUpdateServiceSpec.ts b/core/templates/dev/head/domain/topic/TopicUpdateServiceSpec.ts index fdc4cd0b4ec7..f8ee97bca52f 100644 --- a/core/templates/dev/head/domain/topic/TopicUpdateServiceSpec.ts +++ b/core/templates/dev/head/domain/topic/TopicUpdateServiceSpec.ts @@ -19,15 +19,15 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // TopicUpdateService.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; import { SkillSummaryObjectFactory } from - 'domain/skill/SkillSummaryObjectFactory.ts'; + 'domain/skill/SkillSummaryObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('App.ts'); diff --git a/core/templates/dev/head/domain/user/UserInfoObjectFactorySpec.ts b/core/templates/dev/head/domain/user/UserInfoObjectFactorySpec.ts index d6a758e66086..d3a930942c20 100644 --- a/core/templates/dev/head/domain/user/UserInfoObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/user/UserInfoObjectFactorySpec.ts @@ -16,7 +16,7 @@ * @fileoverview Unit tests for CreatorDashboardBackendApiService. */ -import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory.ts'; +import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory'; describe('User info factory', () => { let userInfoObjectFactory: UserInfoObjectFactory; diff --git a/core/templates/dev/head/domain/utilities/AudioLanguageObjectFactorySpec.ts b/core/templates/dev/head/domain/utilities/AudioLanguageObjectFactorySpec.ts index ab8e9e44f7ca..06edcd38c2b2 100644 --- a/core/templates/dev/head/domain/utilities/AudioLanguageObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/utilities/AudioLanguageObjectFactorySpec.ts @@ -17,7 +17,7 @@ */ import { AudioLanguage, AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; describe('AudioLanguage object factory', () => { let audioLanguage: AudioLanguage; diff --git a/core/templates/dev/head/domain/utilities/AutogeneratedAudioLanguageObjectFactorySpec.ts b/core/templates/dev/head/domain/utilities/AutogeneratedAudioLanguageObjectFactorySpec.ts index 4c52380bf589..c98b2315241d 100644 --- a/core/templates/dev/head/domain/utilities/AutogeneratedAudioLanguageObjectFactorySpec.ts +++ b/core/templates/dev/head/domain/utilities/AutogeneratedAudioLanguageObjectFactorySpec.ts @@ -18,7 +18,8 @@ import { AutogeneratedAudioLanguage, AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + // @ts-ignore + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; describe('AutogeneratedAudioLanguage object factory', () => { let autogenAudioLanguage: AutogeneratedAudioLanguage; diff --git a/core/templates/dev/head/domain/utilities/LanguageUtilServiceSpec.ts b/core/templates/dev/head/domain/utilities/LanguageUtilServiceSpec.ts index 4bbf6bc5878f..031465d542fc 100644 --- a/core/templates/dev/head/domain/utilities/LanguageUtilServiceSpec.ts +++ b/core/templates/dev/head/domain/utilities/LanguageUtilServiceSpec.ts @@ -19,9 +19,9 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // LanguageUtilService.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; // ^^^ This block is to be removed. require('domain/utilities/LanguageUtilService.ts'); diff --git a/core/templates/dev/head/pages/about-page/about-page.module.ts b/core/templates/dev/head/pages/about-page/about-page.module.ts index 930013a33df7..f2c0e8acf231 100644 --- a/core/templates/dev/head/pages/about-page/about-page.module.ts +++ b/core/templates/dev/head/pages/about-page/about-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/admin-page/admin-page.module.ts b/core/templates/dev/head/pages/admin-page/admin-page.module.ts index d02b85263acc..f0eca2e1dbec 100644 --- a/core/templates/dev/head/pages/admin-page/admin-page.module.ts +++ b/core/templates/dev/head/pages/admin-page/admin-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/admin-page/services/admin-task-manager.service.spec.ts b/core/templates/dev/head/pages/admin-page/services/admin-task-manager.service.spec.ts index 6b0021537acd..ed79c3305d1f 100644 --- a/core/templates/dev/head/pages/admin-page/services/admin-task-manager.service.spec.ts +++ b/core/templates/dev/head/pages/admin-page/services/admin-task-manager.service.spec.ts @@ -17,7 +17,7 @@ */ import { AdminTaskManagerService } from - 'pages/admin-page/services/admin-task-manager.service.ts'; + 'pages/admin-page/services/admin-task-manager.service'; describe('Admin task manager service', () => { let adminTaskManagerService: AdminTaskManagerService; diff --git a/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.module.ts b/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.module.ts index bdf6c23ab336..d2470e1596bd 100644 --- a/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.module.ts +++ b/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { CollectionDomainConstants } from 'domain/collection/collection-domain.constants.ts'; import { EditorDomainConstants } from diff --git a/core/templates/dev/head/pages/collection-editor-page/services/collection-editor-state.service.spec.ts b/core/templates/dev/head/pages/collection-editor-page/services/collection-editor-state.service.spec.ts index 7a1682a6bca7..3a063ecb2f38 100644 --- a/core/templates/dev/head/pages/collection-editor-page/services/collection-editor-state.service.spec.ts +++ b/core/templates/dev/head/pages/collection-editor-page/services/collection-editor-state.service.spec.ts @@ -19,9 +19,9 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // collection-editor-state.service.ts is upgraded to Angular 8. import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; import { CollectionRightsObjectFactory } from - 'domain/collection/CollectionRightsObjectFactory.ts'; + 'domain/collection/CollectionRightsObjectFactory'; // ^^^ This block is to be removed. require('domain/collection/CollectionNodeObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/collection-editor-page/services/collection-linearizer.service.spec.ts b/core/templates/dev/head/pages/collection-editor-page/services/collection-linearizer.service.spec.ts index 5edf4d89cf32..b63e2e089e83 100644 --- a/core/templates/dev/head/pages/collection-editor-page/services/collection-linearizer.service.spec.ts +++ b/core/templates/dev/head/pages/collection-editor-page/services/collection-linearizer.service.spec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // collection-linearizer.service.ts is upgraded to Angular 8. import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; // ^^^ This block is to be removed. require('domain/collection/CollectionNodeObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/collection-player-page/collection-player-page.module.ts b/core/templates/dev/head/pages/collection-player-page/collection-player-page.module.ts index 956f716bf9e2..2c1c740a17e6 100644 --- a/core/templates/dev/head/pages/collection-player-page/collection-player-page.module.ts +++ b/core/templates/dev/head/pages/collection-player-page/collection-player-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/contact-page/contact-page.module.ts b/core/templates/dev/head/pages/contact-page/contact-page.module.ts index 98f69c523f26..1239012c6775 100644 --- a/core/templates/dev/head/pages/contact-page/contact-page.module.ts +++ b/core/templates/dev/head/pages/contact-page/contact-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.controller.spec.ts b/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.controller.spec.ts index 419dec1e8a16..6fb5a7c774d9 100644 --- a/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.controller.spec.ts +++ b/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.controller.spec.ts @@ -20,14 +20,14 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // creator-dashboard-page.controller.ts is upgraded to Angular 8. import { RatingComputationService } from - 'components/ratings/rating-computation/rating-computation.service.ts'; + 'components/ratings/rating-computation/rating-computation.service'; import { SuggestionObjectFactory } from - 'domain/suggestion/SuggestionObjectFactory.ts'; + 'domain/suggestion/SuggestionObjectFactory'; /* eslint-disable max-len */ import { ThreadStatusDisplayService } from - 'pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts'; + 'pages/exploration-editor-page/feedback-tab/services/thread-status-display.service'; /* eslint-enable max-len */ -import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory.ts'; +import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory'; // ^^^ This block is to be removed. require('pages/creator-dashboard-page/creator-dashboard-page.controller.ts'); diff --git a/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.module.ts b/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.module.ts index 5099bb6df432..9abacb8be7f6 100644 --- a/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.module.ts +++ b/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.module.ts @@ -32,8 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { ClassifiersExtensionConstants } from 'classifiers/classifiers-extension.constants.ts'; import { CollectionSummaryTileConstants } from diff --git a/core/templates/dev/head/pages/donate-page/donate-page.module.ts b/core/templates/dev/head/pages/donate-page/donate-page.module.ts index 179fe62e133e..6a69d7d0a150 100644 --- a/core/templates/dev/head/pages/donate-page/donate-page.module.ts +++ b/core/templates/dev/head/pages/donate-page/donate-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.module.ts b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.module.ts index 26c27be4dd33..7abf384b510b 100644 --- a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.module.ts +++ b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.module.ts b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.module.ts index b98d3dfaa853..fab75a8db052 100644 --- a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.module.ts +++ b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/error-pages/error-page.module.ts b/core/templates/dev/head/pages/error-pages/error-page.module.ts index b6aa967f7181..55a9654e6cb6 100644 --- a/core/templates/dev/head/pages/error-pages/error-page.module.ts +++ b/core/templates/dev/head/pages/error-pages/error-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/exploration-editor-tab.directive.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/exploration-editor-tab.directive.spec.ts index 8eea3911df91..a73fe32a8864 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/exploration-editor-tab.directive.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/exploration-editor-tab.directive.spec.ts @@ -19,29 +19,29 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // exploration-editor-tab.directive.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; import { AnswerStatsObjectFactory } from - 'domain/exploration/AnswerStatsObjectFactory.ts'; + 'domain/exploration/AnswerStatsObjectFactory'; import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; + 'domain/classifier/ClassifierObjectFactory'; import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; import { ExplorationFeaturesService } from - 'services/ExplorationFeaturesService.ts'; -import { ImprovementsService } from 'services/ImprovementsService.ts'; + 'services/ExplorationFeaturesService'; +import { ImprovementsService } from 'services/ImprovementsService'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('App.ts'); diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/state-graph-visualization.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/state-graph-visualization.directive.ts index 1d1e9ddbe90f..3a8fed61ac1f 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/state-graph-visualization.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/state-graph-visualization.directive.ts @@ -91,7 +91,12 @@ angular.module('oppia').directive('stateGraphVisualization', [ ExplorationWarningsService, StateGraphLayoutService, TranslationStatusService, MAX_NODES_PER_ROW, MAX_NODE_LABEL_LENGTH) { - var graphBounds = {}; + var graphBounds = { + bottom: 0, + left: 0, + top: 0, + right: 0 + }; var nodeData = {}; // The translation applied when the graph is first loaded. var origTranslations = [0, 0]; @@ -120,20 +125,20 @@ angular.module('oppia').directive('stateGraphVisualization', [ .call(d3.zoom().scaleExtent([1, 1]) .on('zoom', function() { if (graphBounds.right - graphBounds.left < dimensions.w) { - (d3.event).transform.x = 0; + (d3.event).transform.x = 0; } else { - (d3.event).transform.x = clamp( - (d3.event).transform.x, + d3.event.transform.x = clamp( + d3.event.transform.x, dimensions.w - graphBounds.right - origTranslations[0], -graphBounds.left - origTranslations[0]); } if (graphBounds.bottom - graphBounds.top < dimensions.h) { - (d3.event).transform.y = 0; + d3.event.transform.y = 0; } else { - (d3.event).transform.y = clamp( - (d3.event).transform.y, + d3.event.transform.y = clamp( + d3.event.transform.y, dimensions.h - graphBounds.bottom - origTranslations[1], -graphBounds.top - origTranslations[1]); @@ -142,8 +147,8 @@ angular.module('oppia').directive('stateGraphVisualization', [ // We need a separate layer here so that the translation // does not influence the panning event receivers. $scope.innerTransformStr = ( - 'translate(' + (d3.event).transform.x + - ',' + (d3.event).transform.y + ')' + 'translate(' + d3.event.transform.x + + ',' + d3.event.transform.y + ')' ); $scope.$apply(); }) diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.spec.ts index bb9008d775bc..50781f08b199 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.spec.ts @@ -18,7 +18,7 @@ /* eslint-disable max-len */ import { AnswerGroupsCacheService } from - 'pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service'; /* eslint-enable max-len */ describe('Answer Groups Cache Service', () => { @@ -61,7 +61,7 @@ describe('Answer Groups Cache Service', () => { expect(agcs.contains('InteractionId')).toBe(true); expect(agcs.contains('NonPresentInteractionId')).toBe(false); expect(agcs.contains('')).toBe(false); - expect(agcs.contains(1)).toBe(false); + expect(agcs.contains('1')).toBe(false); }); it('resets the cache', () => { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.ts index fe4204a5bbbc..f53393f69a09 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.ts @@ -19,7 +19,7 @@ * This cache should be reset each time the state editor is initialized. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { Injectable } from '@angular/core'; import { downgradeInjectable } from '@angular/upgrade/static'; diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.spec.ts index 57e47eb244ea..d026fafa6516 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.spec.ts @@ -18,7 +18,7 @@ /* eslint-disable max-len */ import { InteractionDetailsCacheService } from - 'pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service'; /* eslint-enable max-len */ describe('Interaction Details Cache Service', () => { @@ -57,7 +57,7 @@ describe('Interaction Details Cache Service', () => { expect(idcs.contains('InteractionId')).toBe(true); expect(idcs.contains('NonPresentInteractionId')).toBe(false); expect(idcs.contains('')).toBe(false); - expect(idcs.contains(1)).toBe(false); + expect(idcs.contains('1')).toBe(false); }); it('should remove the interaction from the cache', () => { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.ts index d57c65826a1b..388e65479964 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.ts @@ -20,7 +20,7 @@ * editor is initialized. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { Injectable } from '@angular/core'; import { downgradeInjectable } from '@angular/upgrade/static'; diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-validity.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-validity.service.spec.ts index 4aea4e0d18e3..3bff739693a4 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-validity.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-validity.service.spec.ts @@ -18,7 +18,7 @@ /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ describe('Solution Validity Service', function() { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-verification.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-verification.service.spec.ts index 6feb3d49f449..9c54ec6999d2 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-verification.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-verification.service.spec.ts @@ -17,7 +17,7 @@ */ import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; require('App.ts'); require('domain/exploration/SolutionObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data.service.spec.ts index 49f3d7874aa3..bd673dd388a0 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data.service.spec.ts @@ -19,28 +19,28 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // training-data.service.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; /* eslint-disable max-len */ import { AnswerGroupsCacheService } from - 'pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service'; /* eslint-enable max-len */ import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; + 'domain/classifier/ClassifierObjectFactory'; import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('App.ts'); diff --git a/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.module.ts b/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.module.ts index 739c23996ad9..e77c37d77290 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.module.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { ClassifiersExtensionConstants } from 'classifiers/classifiers-extension.constants.ts'; import { CollectionSummaryTileConstants } from diff --git a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-data.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-data.service.spec.ts index 015a9c1b46f0..eee0b4e237ad 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-data.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-data.service.spec.ts @@ -20,9 +20,9 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // thread-data.service.ts is upgraded to Angular 8. import { FeedbackThreadObjectFactory } from - 'domain/feedback_thread/FeedbackThreadObjectFactory.ts'; + 'domain/feedback_thread/FeedbackThreadObjectFactory'; import { SuggestionObjectFactory } from - 'domain/suggestion/SuggestionObjectFactory.ts'; + 'domain/suggestion/SuggestionObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.spec.ts index 4e911f6758cf..a92b107da2fc 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.spec.ts @@ -20,7 +20,7 @@ /* eslint-disable max-len */ import { ThreadStatusDisplayService } from - 'pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts'; + 'pages/exploration-editor-page/feedback-tab/services/thread-status-display.service'; /* eslint-enable max-len */ describe('Thread Status Display Service', () => { diff --git a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts index 921a63877ff7..bdabeb7a3e3d 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts @@ -17,7 +17,7 @@ * status label for a thread in the feedback tab of the exploration editor. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { Injectable } from '@angular/core'; import { downgradeInjectable } from '@angular/upgrade/static'; diff --git a/core/templates/dev/head/pages/exploration-editor-page/history-tab/history-tab.directive.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/history-tab/history-tab.directive.spec.ts index da7cc8d8f57d..2775b38594e9 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/history-tab/history-tab.directive.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/history-tab/history-tab.directive.spec.ts @@ -18,18 +18,18 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // history-tab.directive.ts is upgraded to Angular 8. -import { EditabilityService } from 'services/EditabilityService.ts'; +import { EditabilityService } from 'services/EditabilityService'; import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VersionTreeService } from - 'pages/exploration-editor-page/history-tab/services/version-tree.service.ts'; + 'pages/exploration-editor-page/history-tab/services/version-tree.service'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('pages/exploration-editor-page/history-tab/history-tab.directive.ts'); diff --git a/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/compare-versions.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/compare-versions.service.spec.ts index 74f0e2b685ec..464b314cb654 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/compare-versions.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/compare-versions.service.spec.ts @@ -19,14 +19,14 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // compare-versions.service.ts is upgraded to Angular 8. import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VersionTreeService } from - 'pages/exploration-editor-page/history-tab/services/version-tree.service.ts'; + 'pages/exploration-editor-page/history-tab/services/version-tree.service'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.spec.ts index 186a5d3139f3..a4adfd0be895 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.spec.ts @@ -17,7 +17,7 @@ */ import { VersionTreeService } from - 'pages/exploration-editor-page/history-tab/services/version-tree.service.ts'; + 'pages/exploration-editor-page/history-tab/services/version-tree.service'; describe('Versions tree service', () => { describe('versions tree service', () => { diff --git a/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.ts b/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.ts index 63fb6d4e9d35..6b499f317f16 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.ts @@ -17,7 +17,7 @@ * tree. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { Injectable } from '@angular/core'; import { downgradeInjectable } from '@angular/upgrade/static'; diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/angular-name.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/services/angular-name.service.spec.ts index 9c861dd8f39a..71d01ad9b6fe 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/angular-name.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/angular-name.service.spec.ts @@ -17,7 +17,7 @@ */ import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; describe('Angular names service', () => { describe('angular name service', () => { diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-rights.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-rights.service.spec.ts index 63566ef6ccf7..bc3a89ca94ce 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-rights.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-rights.service.spec.ts @@ -20,7 +20,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // exploration-rights.service.ts is upgraded to Angular 8. import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; // ^^^ This block is to be removed. require('pages/exploration-editor-page/services/exploration-rights.service.ts'); diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-states.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-states.service.spec.ts index 64c90b8e191e..e7d7a8a4a7dc 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-states.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-states.service.spec.ts @@ -19,24 +19,24 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // exploration-states.service.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; + 'domain/classifier/ClassifierObjectFactory'; import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('components/state-editor/state-editor-properties-services/' + diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/learner-action-render.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/learner-action-render.service.spec.ts index f9bb138c95ce..b01e9e142d99 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/learner-action-render.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/learner-action-render.service.spec.ts @@ -22,28 +22,28 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // learner-action-render.service.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; -import { EditabilityService } from 'services/EditabilityService.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; +import { EditabilityService } from 'services/EditabilityService'; import { ExplorationFeaturesService } from - 'services/ExplorationFeaturesService.ts'; + 'services/ExplorationFeaturesService'; import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; + 'domain/classifier/ClassifierObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ -import { SuggestionModalService } from 'services/SuggestionModalService.ts'; +import { SuggestionModalService } from 'services/SuggestionModalService'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; // ^^^ This block is to be removed. require('domain/statistics/LearnerActionObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/state-improvement-suggestion.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/state-improvement-suggestion.service.spec.ts index 09d7b4dfac77..f43470d7e7f1 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/state-improvement-suggestion.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/state-improvement-suggestion.service.spec.ts @@ -19,12 +19,12 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // state-improvement-suggestion.service.ts is upgraded to Angular 8. import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('domain/exploration/StatesObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-status.service.spec.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-status.service.spec.ts index b6bec366de25..ee53c8a0fea1 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-status.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-status.service.spec.ts @@ -19,24 +19,24 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // translation-status.service.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; + 'domain/classifier/ClassifierObjectFactory'; import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('pages/exploration-editor-page/services/exploration-states.service.ts'); diff --git a/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.module.ts b/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.module.ts index 75a480ca7677..3120e306cc29 100644 --- a/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.module.ts +++ b/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { ClassifiersExtensionConstants } from 'classifiers/classifiers-extension.constants.ts'; import { CollectionSummaryTileConstants } from diff --git a/core/templates/dev/head/pages/exploration-player-page/services/answer-classification.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/answer-classification.service.spec.ts index a8c16f44a491..35a3ef40f14c 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/answer-classification.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/answer-classification.service.spec.ts @@ -19,16 +19,16 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // answer-classification.service.ts is upgraded to Angular 8. import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; + 'domain/classifier/ClassifierObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('domain/exploration/OutcomeObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/exploration-player-page/services/audio-preloader.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/audio-preloader.service.spec.ts index fba2da1015c1..9778228a7c33 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/audio-preloader.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/audio-preloader.service.spec.ts @@ -19,24 +19,24 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // audio-preloader.service.ts is upgraded to Angular 8. import { AudioFileObjectFactory } from - 'domain/utilities/AudioFileObjectFactory.ts'; + 'domain/utilities/AudioFileObjectFactory'; import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; import { FileDownloadRequestObjectFactory } from - 'domain/utilities/FileDownloadRequestObjectFactory.ts'; + 'domain/utilities/FileDownloadRequestObjectFactory'; import { ImageFileObjectFactory } from - 'domain/utilities/ImageFileObjectFactory.ts'; + 'domain/utilities/ImageFileObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; import { ParamTypeObjectFactory } from - 'domain/exploration/ParamTypeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamTypeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('domain/exploration/ExplorationObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-language.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-language.service.spec.ts index 4a378fcb4044..9840f92bb302 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-language.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-language.service.spec.ts @@ -19,9 +19,9 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // audio-translation-language.service.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.spec.ts index 291fb33a5d80..eb5868dced1e 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.spec.ts @@ -19,9 +19,9 @@ import { TestBed } from '@angular/core/testing'; import { AudioTranslationManagerService } from - 'pages/exploration-player-page/services/audio-translation-manager.service.ts'; + 'pages/exploration-player-page/services/audio-translation-manager.service'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; describe('Audio translation manager service', () => { let atms: AudioTranslationManagerService, vof: VoiceoverObjectFactory; @@ -67,7 +67,7 @@ describe('Audio translation manager service', () => { it('should properly set primary and secondary audio translations', () => { - atms.setContentAudioTranslations(testAudioTranslations); + atms.setContentAudioTranslations(testAudioTranslations, '', ''); expect(atms.getCurrentAudioTranslations()).toEqual({ en: vof.createFromBackendDict({ filename: 'audio-en.mp3', @@ -80,7 +80,7 @@ describe('Audio translation manager service', () => { needs_update: false }) }); - atms.setSecondaryAudioTranslations(testAudioTranslations2); + atms.setSecondaryAudioTranslations(testAudioTranslations2, '', ''); expect(atms.getCurrentAudioTranslations()).toEqual({ zh: vof.createFromBackendDict({ filename: 'audio-zh.mp3', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.ts index 571c69e131bc..5c39e1693da8 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.ts @@ -21,7 +21,7 @@ import { Injectable } from '@angular/core'; import { downgradeInjectable } from '@angular/upgrade/static'; import { Voiceover } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; export interface IAudioTranslations { [languageCode: string]: Voiceover diff --git a/core/templates/dev/head/pages/exploration-player-page/services/current-interaction.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/current-interaction.service.spec.ts index 6d9d806b68e0..8ec771d73f98 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/current-interaction.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/current-interaction.service.spec.ts @@ -19,15 +19,15 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // current-interaction.service.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; -import { EditabilityService } from 'services/EditabilityService.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; +import { EditabilityService } from 'services/EditabilityService'; /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ -import { SuggestionModalService } from 'services/SuggestionModalService.ts'; +import { SuggestionModalService } from 'services/SuggestionModalService'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/core/templates/dev/head/pages/exploration-player-page/services/extract-image-filenames-from-state.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/extract-image-filenames-from-state.service.spec.ts index 9b8d3ad5f567..9a9dc868c24e 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/extract-image-filenames-from-state.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/extract-image-filenames-from-state.service.spec.ts @@ -19,14 +19,14 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // extract-image-filenames-from-state.service.ts is upgraded to Angular 8. import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; import { ParamTypeObjectFactory } from - 'domain/exploration/ParamTypeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamTypeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('domain/exploration/ExplorationObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/exploration-player-page/services/image-preloader.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/image-preloader.service.spec.ts index 10c0a9b6a2c5..444b555db69b 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/image-preloader.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/image-preloader.service.spec.ts @@ -19,20 +19,20 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // image-preloader.service.ts is upgraded to Angular 8. import { AudioFileObjectFactory } from - 'domain/utilities/AudioFileObjectFactory.ts'; + 'domain/utilities/AudioFileObjectFactory'; import { FileDownloadRequestObjectFactory } from - 'domain/utilities/FileDownloadRequestObjectFactory.ts'; + 'domain/utilities/FileDownloadRequestObjectFactory'; import { ImageFileObjectFactory } from - 'domain/utilities/ImageFileObjectFactory.ts'; + 'domain/utilities/ImageFileObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; import { ParamTypeObjectFactory } from - 'domain/exploration/ParamTypeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamTypeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('domain/exploration/ExplorationObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.spec.ts index 8ffb4c3f8e66..705e959e7cef 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.spec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // learner-params.service.ts is upgraded to Angular 8. import { LearnerParamsService } from - 'pages/exploration-player-page/services/learner-params.service.ts'; + 'pages/exploration-player-page/services/learner-params.service'; // ^^^ This block is to be removed. describe('Learner parameters service', () => { diff --git a/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.ts index 3b181663776b..2a6744f59054 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.ts @@ -17,7 +17,7 @@ * learner. */ -import * as cloneDeep from 'lodash/cloneDeep'; +import cloneDeep from 'lodash/cloneDeep'; import { downgradeInjectable } from '@angular/upgrade/static'; import { Injectable } from '@angular/core'; diff --git a/core/templates/dev/head/pages/exploration-player-page/services/number-attempts.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/number-attempts.service.spec.ts index 7e38a14b36df..a88c9700a31e 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/number-attempts.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/number-attempts.service.spec.ts @@ -17,7 +17,7 @@ */ import { NumberAttemptsService } from - 'pages/exploration-player-page/services/number-attempts.service.ts'; + 'pages/exploration-player-page/services/number-attempts.service'; describe('Number attempts service', () => { let numberAttemptsService: NumberAttemptsService; diff --git a/core/templates/dev/head/pages/exploration-player-page/services/player-position.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/player-position.service.spec.ts index 9a0bff8c1f57..36dc57441521 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/player-position.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/player-position.service.spec.ts @@ -19,9 +19,9 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // player-position.service.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; // ^^^ This block is to be removed. require('domain/state_card/StateCardObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/exploration-player-page/services/player-transcript.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/player-transcript.service.spec.ts index 2e54501ae9ae..91729d41f417 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/player-transcript.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/player-transcript.service.spec.ts @@ -19,9 +19,9 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // player-transcript.service.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; // ^^^ This block is to be removed. require('domain/state_card/StateCardObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/exploration-player-page/services/state-classifier-mapping.service.spec.ts b/core/templates/dev/head/pages/exploration-player-page/services/state-classifier-mapping.service.spec.ts index 5d25f40b05df..c5162c8ebfd3 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/state-classifier-mapping.service.spec.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/state-classifier-mapping.service.spec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // state-classifier-mapping.service.ts is upgraded to Angular 8. import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; + 'domain/classifier/ClassifierObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/core/templates/dev/head/pages/get-started-page/get-started-page.module.ts b/core/templates/dev/head/pages/get-started-page/get-started-page.module.ts index c27764a460f4..0ac21e1e5329 100644 --- a/core/templates/dev/head/pages/get-started-page/get-started-page.module.ts +++ b/core/templates/dev/head/pages/get-started-page/get-started-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.module.ts b/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.module.ts index d1ecf8270662..55ceb76ad374 100644 --- a/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.module.ts +++ b/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.module.ts b/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.module.ts index e4fae02fbdc8..c8a2fcbc1de1 100644 --- a/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.module.ts +++ b/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.module.ts b/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.module.ts index 7ab80f689c7a..d3e7a51c43a2 100644 --- a/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.module.ts +++ b/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { CollectionSummaryTileConstants } from 'components/summary-tile/collection-summary-tile.constants.ts'; import { InteractionsExtensionsConstants } from diff --git a/core/templates/dev/head/pages/library-page/library-page.controller.spec.ts b/core/templates/dev/head/pages/library-page/library-page.controller.spec.ts index 0a0b597d4345..89a2f55050bb 100644 --- a/core/templates/dev/head/pages/library-page/library-page.controller.spec.ts +++ b/core/templates/dev/head/pages/library-page/library-page.controller.spec.ts @@ -19,8 +19,8 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // library-page.controller.ts is upgraded to Angular 8. import { LearnerDashboardActivityIdsObjectFactory } from - 'domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts'; -import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory.ts'; + 'domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory'; +import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory'; // ^^^ This block is to be removed. require('pages/library-page/library-page.directive.ts'); diff --git a/core/templates/dev/head/pages/library-page/library-page.module.ts b/core/templates/dev/head/pages/library-page/library-page.module.ts index cf36d9ff243b..0945a0ea5d04 100644 --- a/core/templates/dev/head/pages/library-page/library-page.module.ts +++ b/core/templates/dev/head/pages/library-page/library-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { CollectionSummaryTileConstants } from 'components/summary-tile/collection-summary-tile.constants.ts'; import { InteractionsExtensionsConstants } from diff --git a/core/templates/dev/head/pages/maintenance-page/maintenance-page.module.ts b/core/templates/dev/head/pages/maintenance-page/maintenance-page.module.ts index cf898045970f..b9d5c98b738b 100644 --- a/core/templates/dev/head/pages/maintenance-page/maintenance-page.module.ts +++ b/core/templates/dev/head/pages/maintenance-page/maintenance-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/moderator-page/moderator-page.module.ts b/core/templates/dev/head/pages/moderator-page/moderator-page.module.ts index 9124f7b7eb49..b9fa7cf6a0e1 100644 --- a/core/templates/dev/head/pages/moderator-page/moderator-page.module.ts +++ b/core/templates/dev/head/pages/moderator-page/moderator-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.module.ts b/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.module.ts index 246883dd9948..efeb8c37c742 100644 --- a/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.module.ts +++ b/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/practice-session-page/practice-session-page.module.ts b/core/templates/dev/head/pages/practice-session-page/practice-session-page.module.ts index 36bf1805f82d..bf1bf3ca49b5 100644 --- a/core/templates/dev/head/pages/practice-session-page/practice-session-page.module.ts +++ b/core/templates/dev/head/pages/practice-session-page/practice-session-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/preferences-page/preferences-page.controller.spec.ts b/core/templates/dev/head/pages/preferences-page/preferences-page.controller.spec.ts index 022d9d584e21..94f42f36c4b8 100644 --- a/core/templates/dev/head/pages/preferences-page/preferences-page.controller.spec.ts +++ b/core/templates/dev/head/pages/preferences-page/preferences-page.controller.spec.ts @@ -19,10 +19,10 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // preferences-page.controller.ts is upgraded to Angular 8. import { AudioLanguageObjectFactory } from - 'domain/utilities/AudioLanguageObjectFactory.ts'; + 'domain/utilities/AudioLanguageObjectFactory'; import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; -import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; +import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory'; // ^^^ This block is to be removed. require('pages/preferences-page/preferences-page.controller.ts'); diff --git a/core/templates/dev/head/pages/preferences-page/preferences-page.module.ts b/core/templates/dev/head/pages/preferences-page/preferences-page.module.ts index a60d086dcec2..664c72032122 100644 --- a/core/templates/dev/head/pages/preferences-page/preferences-page.module.ts +++ b/core/templates/dev/head/pages/preferences-page/preferences-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/privacy-page/privacy-page.module.ts b/core/templates/dev/head/pages/privacy-page/privacy-page.module.ts index 755e6a745065..387a82b43773 100644 --- a/core/templates/dev/head/pages/privacy-page/privacy-page.module.ts +++ b/core/templates/dev/head/pages/privacy-page/privacy-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/profile-page/profile-page.module.ts b/core/templates/dev/head/pages/profile-page/profile-page.module.ts index 791072ecb6b6..2afaded269bb 100644 --- a/core/templates/dev/head/pages/profile-page/profile-page.module.ts +++ b/core/templates/dev/head/pages/profile-page/profile-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/review-test-page/review-test-page.module.ts b/core/templates/dev/head/pages/review-test-page/review-test-page.module.ts index 270fe778a70a..8b45e793b397 100644 --- a/core/templates/dev/head/pages/review-test-page/review-test-page.module.ts +++ b/core/templates/dev/head/pages/review-test-page/review-test-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/signup-page/signup-page.module.ts b/core/templates/dev/head/pages/signup-page/signup-page.module.ts index 83526dfa6d8e..250ef80423b8 100644 --- a/core/templates/dev/head/pages/signup-page/signup-page.module.ts +++ b/core/templates/dev/head/pages/signup-page/signup-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-state.service.spec.ts b/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-state.service.spec.ts index 3c7d9d94ee11..88cfc87dbcf5 100644 --- a/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-state.service.spec.ts +++ b/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-state.service.spec.ts @@ -19,15 +19,15 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // skill-editor-state.service.ts is upgraded to Angular 8. import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; import { MisconceptionObjectFactory } from - 'domain/skill/MisconceptionObjectFactory.ts'; + 'domain/skill/MisconceptionObjectFactory'; import { SkillRightsObjectFactory } from - 'domain/skill/SkillRightsObjectFactory.ts'; + 'domain/skill/SkillRightsObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('domain/skill/SkillObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.module.ts b/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.module.ts index 6070deea1872..3dafb61c2a07 100644 --- a/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.module.ts +++ b/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { EditorDomainConstants } from 'domain/editor/editor-domain.constants.ts'; import { InteractionsExtensionsConstants } from diff --git a/core/templates/dev/head/pages/splash-page/splash-page.module.ts b/core/templates/dev/head/pages/splash-page/splash-page.module.ts index 3926803a15f5..8940b91686ab 100644 --- a/core/templates/dev/head/pages/splash-page/splash-page.module.ts +++ b/core/templates/dev/head/pages/splash-page/splash-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/story-editor-page/services/story-editor-state.service.spec.ts b/core/templates/dev/head/pages/story-editor-page/services/story-editor-state.service.spec.ts index 23ff944fc8f2..92ab70900cc0 100644 --- a/core/templates/dev/head/pages/story-editor-page/services/story-editor-state.service.spec.ts +++ b/core/templates/dev/head/pages/story-editor-page/services/story-editor-state.service.spec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // story-editor-state.service.ts is upgraded to Angular 8. import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; // ^^^ This block is to be removed. require('domain/story/StoryObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/story-editor-page/story-editor-page.module.ts b/core/templates/dev/head/pages/story-editor-page/story-editor-page.module.ts index d295745c68bc..1da0bd695eb7 100644 --- a/core/templates/dev/head/pages/story-editor-page/story-editor-page.module.ts +++ b/core/templates/dev/head/pages/story-editor-page/story-editor-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { EditorDomainConstants } from 'domain/editor/editor-domain.constants.ts'; import { InteractionsExtensionsConstants } from diff --git a/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.module.ts b/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.module.ts index 486cf9267e33..e0a01adde3d4 100644 --- a/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.module.ts +++ b/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/teach-page/teach-page.module.ts b/core/templates/dev/head/pages/teach-page/teach-page.module.ts index 666989b2d7b8..27a882d2c428 100644 --- a/core/templates/dev/head/pages/teach-page/teach-page.module.ts +++ b/core/templates/dev/head/pages/teach-page/teach-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/terms-page/terms-page.module.ts b/core/templates/dev/head/pages/terms-page/terms-page.module.ts index b56cac49df96..30543f179cd5 100644 --- a/core/templates/dev/head/pages/terms-page/terms-page.module.ts +++ b/core/templates/dev/head/pages/terms-page/terms-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/thanks-page/thanks-page.module.ts b/core/templates/dev/head/pages/thanks-page/thanks-page.module.ts index 918cc1bbcf95..1beb281ec6c6 100644 --- a/core/templates/dev/head/pages/thanks-page/thanks-page.module.ts +++ b/core/templates/dev/head/pages/thanks-page/thanks-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-state.service.spec.ts b/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-state.service.spec.ts index 9273f3f2f30f..200d7dd16b34 100644 --- a/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-state.service.spec.ts +++ b/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-state.service.spec.ts @@ -19,15 +19,15 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // topic-editor-state.service.ts is upgraded to Angular 8. import { AutogeneratedAudioLanguageObjectFactory } from - 'domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'; + 'domain/utilities/AutogeneratedAudioLanguageObjectFactory'; import { ChangeObjectFactory } from - 'domain/editor/undo_redo/ChangeObjectFactory.ts'; + 'domain/editor/undo_redo/ChangeObjectFactory'; import { SkillSummaryObjectFactory } from - 'domain/skill/SkillSummaryObjectFactory.ts'; + 'domain/skill/SkillSummaryObjectFactory'; import { TopicRightsObjectFactory } from - 'domain/topic/TopicRightsObjectFactory.ts'; + 'domain/topic/TopicRightsObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('domain/topic/SubtopicPageObjectFactory.ts'); diff --git a/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.module.ts b/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.module.ts index be6844cb717b..e8e60d15dcd9 100644 --- a/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.module.ts +++ b/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { EditorDomainConstants } from 'domain/editor/editor-domain.constants.ts'; import { InteractionsExtensionsConstants } from diff --git a/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.module.ts b/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.module.ts index 7a033f29ea21..764ae10302e9 100644 --- a/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.module.ts +++ b/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.module.ts b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.module.ts index 5a9e68c38203..62c5965d5368 100644 --- a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.module.ts +++ b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.module.ts @@ -32,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http'; }) export class ServiceBootstrapComponent {} -import { AppConstants } from 'app.constants.ts'; +import { AppConstants } from 'app.constants'; import { InteractionsExtensionsConstants } from 'interactions/interactions-extension.constants.ts'; import { ObjectsDomainConstants } from diff --git a/core/templates/dev/head/services/AssetsBackendApiServiceSpec.ts b/core/templates/dev/head/services/AssetsBackendApiServiceSpec.ts index 042705d01879..3b6343fbe275 100644 --- a/core/templates/dev/head/services/AssetsBackendApiServiceSpec.ts +++ b/core/templates/dev/head/services/AssetsBackendApiServiceSpec.ts @@ -19,11 +19,11 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // AssetsBackendApiService.ts is upgraded to Angular 8. import { AudioFileObjectFactory } from - 'domain/utilities/AudioFileObjectFactory.ts'; + 'domain/utilities/AudioFileObjectFactory'; import { FileDownloadRequestObjectFactory } from - 'domain/utilities/FileDownloadRequestObjectFactory.ts'; + 'domain/utilities/FileDownloadRequestObjectFactory'; import { ImageFileObjectFactory } from - 'domain/utilities/ImageFileObjectFactory.ts'; + 'domain/utilities/ImageFileObjectFactory'; // ^^^ This block is to be removed. require('domain/utilities/UrlInterpolationService.ts'); diff --git a/core/templates/dev/head/services/AutoplayedVideosServiceSpec.ts b/core/templates/dev/head/services/AutoplayedVideosServiceSpec.ts index 0808389ebb31..6b049a840d15 100644 --- a/core/templates/dev/head/services/AutoplayedVideosServiceSpec.ts +++ b/core/templates/dev/head/services/AutoplayedVideosServiceSpec.ts @@ -15,7 +15,7 @@ * @fileoverview Unit tests for AutoplayedVideosService. */ -import { AutoplayedVideosService } from 'services/AutoplayedVideosService.ts'; +import { AutoplayedVideosService } from 'services/AutoplayedVideosService'; describe('AutoplayedVideosService', () => { let autoplayedVideosService: AutoplayedVideosService; diff --git a/core/templates/dev/head/services/CodeNormalizerServiceSpec.ts b/core/templates/dev/head/services/CodeNormalizerServiceSpec.ts index 7b58e4a5cc30..6496cb0403e1 100644 --- a/core/templates/dev/head/services/CodeNormalizerServiceSpec.ts +++ b/core/templates/dev/head/services/CodeNormalizerServiceSpec.ts @@ -16,7 +16,7 @@ * @fileoverview Unit tests for the Code Normalizer Service. */ -import { CodeNormalizerService } from 'services/CodeNormalizerService.ts'; +import { CodeNormalizerService } from 'services/CodeNormalizerService'; describe('Code Normalization', () => { let cns: CodeNormalizerService; diff --git a/core/templates/dev/head/services/CsrfTokenService.ts b/core/templates/dev/head/services/CsrfTokenService.ts index a1462feb5cfb..94b5dca1f116 100644 --- a/core/templates/dev/head/services/CsrfTokenService.ts +++ b/core/templates/dev/head/services/CsrfTokenService.ts @@ -18,12 +18,8 @@ // This needs to be imported first instead of using the global definition // because Angular doesn't support global definitions and every library used -// needs to be imported explicitly. Also, default imports do not go do not go -// down well with Karma and thus the import-as syntax. -// https://stackoverflow.com/questions/49252655/injecting-lodash-in-karma -// The above link says about lodash but the same can be applied to other -// libraries as well. -import * as $ from 'jquery'; +// needs to be imported explicitly. +import $ from 'jquery'; angular.module('oppia').factory('CsrfTokenService', [function() { var tokenPromise = null; diff --git a/core/templates/dev/head/services/CsrfTokenServiceSpec.ts b/core/templates/dev/head/services/CsrfTokenServiceSpec.ts index 6c3e7e2d6b5b..b28c847485ee 100644 --- a/core/templates/dev/head/services/CsrfTokenServiceSpec.ts +++ b/core/templates/dev/head/services/CsrfTokenServiceSpec.ts @@ -18,12 +18,8 @@ // This needs to be imported first instead of using the global definition // because Angular doesn't support global definitions and every library used -// needs to be imported explicitly. Also, default imports do not go do not go -// down well with Karma and thus the import-as syntax. -// https://stackoverflow.com/questions/49252655/injecting-lodash-in-karma -// The above link says about lodash but the same can be applied to other -// libraries as well. -import * as $ from 'jquery'; +// needs to be imported explicitly. +import $ from 'jquery'; require('services/CsrfTokenService.ts'); diff --git a/core/templates/dev/head/services/EditabilityServiceSpec.ts b/core/templates/dev/head/services/EditabilityServiceSpec.ts index 08ab534711f0..64ffe3c066ce 100644 --- a/core/templates/dev/head/services/EditabilityServiceSpec.ts +++ b/core/templates/dev/head/services/EditabilityServiceSpec.ts @@ -16,7 +16,7 @@ * @fileoverview Unit tests for EditabilityService. */ -import { EditabilityService } from 'services/EditabilityService.ts'; +import { EditabilityService } from 'services/EditabilityService'; describe('EditabilityService', function() { let editabilityService: EditabilityService; diff --git a/core/templates/dev/head/services/ImprovementCardServiceSpec.ts b/core/templates/dev/head/services/ImprovementCardServiceSpec.ts index ef1ec1b3209c..f28694c5bd7b 100644 --- a/core/templates/dev/head/services/ImprovementCardServiceSpec.ts +++ b/core/templates/dev/head/services/ImprovementCardServiceSpec.ts @@ -19,39 +19,39 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // ImprovementCardService.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; -import { EditabilityService } from 'services/EditabilityService.ts'; + 'domain/classifier/ClassifierObjectFactory'; +import { EditabilityService } from 'services/EditabilityService'; import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; import { FeedbackThreadObjectFactory } from - 'domain/feedback_thread/FeedbackThreadObjectFactory.ts'; + 'domain/feedback_thread/FeedbackThreadObjectFactory'; import { ImprovementActionButtonObjectFactory } from - 'domain/statistics/ImprovementActionButtonObjectFactory.ts'; + 'domain/statistics/ImprovementActionButtonObjectFactory'; import { PlaythroughIssueObjectFactory } from - 'domain/statistics/PlaythroughIssueObjectFactory.ts'; + 'domain/statistics/PlaythroughIssueObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ -import { SuggestionModalService } from 'services/SuggestionModalService.ts'; +import { SuggestionModalService } from 'services/SuggestionModalService'; import { SuggestionObjectFactory } from - 'domain/suggestion/SuggestionObjectFactory.ts'; + 'domain/suggestion/SuggestionObjectFactory'; /* eslint-disable max-len */ import { ThreadStatusDisplayService } from - 'pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts'; + 'pages/exploration-editor-page/feedback-tab/services/thread-status-display.service'; /* eslint-enable max-len */ -import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory.ts'; +import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; // ^^^ This block is to be removed. require('domain/statistics/FeedbackImprovementCardObjectFactory.ts'); diff --git a/core/templates/dev/head/services/ImprovementsServiceSpec.ts b/core/templates/dev/head/services/ImprovementsServiceSpec.ts index 95883ae2d21e..19324f3f9b41 100644 --- a/core/templates/dev/head/services/ImprovementsServiceSpec.ts +++ b/core/templates/dev/head/services/ImprovementsServiceSpec.ts @@ -16,7 +16,7 @@ * @fileoverview Unit tests for improvements service. */ -import { ImprovementsService } from 'services/ImprovementsService.ts'; +import { ImprovementsService } from 'services/ImprovementsService'; describe('ImprovementsService', () => { let improvementsService: ImprovementsService; diff --git a/core/templates/dev/head/services/LocalStorageServiceSpec.ts b/core/templates/dev/head/services/LocalStorageServiceSpec.ts index 87740b8b8188..5ee0b4e2b5b0 100644 --- a/core/templates/dev/head/services/LocalStorageServiceSpec.ts +++ b/core/templates/dev/head/services/LocalStorageServiceSpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // LocalStorageService.ts is upgraded to Angular 8. import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; // ^^^ This block is to be removed. require('services/LocalStorageService.ts'); diff --git a/core/templates/dev/head/services/PageTitleServiceSpec.ts b/core/templates/dev/head/services/PageTitleServiceSpec.ts index 62ed9c1b83f9..a40a0759af15 100644 --- a/core/templates/dev/head/services/PageTitleServiceSpec.ts +++ b/core/templates/dev/head/services/PageTitleServiceSpec.ts @@ -16,7 +16,7 @@ * @fileoverview Unit test for the page title service. */ -import { PageTitleService } from 'services/PageTitleService.ts'; +import { PageTitleService } from 'services/PageTitleService'; import { TestBed } from '@angular/core/testing'; import { Title } from '@angular/platform-browser'; diff --git a/core/templates/dev/head/services/PlaythroughIssuesBackendApiServiceSpec.ts b/core/templates/dev/head/services/PlaythroughIssuesBackendApiServiceSpec.ts index 148060600d0f..b34d7d5b9285 100644 --- a/core/templates/dev/head/services/PlaythroughIssuesBackendApiServiceSpec.ts +++ b/core/templates/dev/head/services/PlaythroughIssuesBackendApiServiceSpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // PlaythroughIssuesBackendApiService.ts is upgraded to Angular 8. import { PlaythroughIssueObjectFactory } from - 'domain/statistics/PlaythroughIssueObjectFactory.ts'; + 'domain/statistics/PlaythroughIssueObjectFactory'; // ^^^ This block is to be removed. require('domain/statistics/PlaythroughObjectFactory.ts'); diff --git a/core/templates/dev/head/services/PlaythroughIssuesService.ts b/core/templates/dev/head/services/PlaythroughIssuesService.ts index c8d654003a2a..a9bcba77c757 100644 --- a/core/templates/dev/head/services/PlaythroughIssuesService.ts +++ b/core/templates/dev/head/services/PlaythroughIssuesService.ts @@ -220,8 +220,8 @@ angular.module('oppia').factory('PlaythroughIssuesService', [ var getRemainingActionsElements = function(pIdx, i) { // We only expect one element to match the below statement and // thus, we take the first element. - return document.getElementsByClassName( - 'remaining-actions' + pIdx.toString() + i.toString())[0]; + return (document.getElementsByClassName( + 'remaining-actions' + pIdx.toString() + i.toString())[0]); }; /** diff --git a/core/templates/dev/head/services/PlaythroughServiceSpec.ts b/core/templates/dev/head/services/PlaythroughServiceSpec.ts index 3a244711c1bd..aa7899696f75 100644 --- a/core/templates/dev/head/services/PlaythroughServiceSpec.ts +++ b/core/templates/dev/head/services/PlaythroughServiceSpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // PlaythroughService.ts is upgraded to Angular 8. import { ExplorationFeaturesService } from - 'services/ExplorationFeaturesService.ts'; + 'services/ExplorationFeaturesService'; // ^^^ This block is to be removed. require('App.ts'); diff --git a/core/templates/dev/head/services/StateRulesStatsServiceSpec.ts b/core/templates/dev/head/services/StateRulesStatsServiceSpec.ts index 5107e41b8c1f..d91bbc6c2591 100644 --- a/core/templates/dev/head/services/StateRulesStatsServiceSpec.ts +++ b/core/templates/dev/head/services/StateRulesStatsServiceSpec.ts @@ -19,11 +19,11 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // StateRulesStatsService.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; + 'domain/classifier/ClassifierObjectFactory'; // ^^^ This block is to be removed. require('App.ts'); diff --git a/core/templates/dev/head/services/StateTopAnswersStatsServiceSpec.ts b/core/templates/dev/head/services/StateTopAnswersStatsServiceSpec.ts index 4c662b009c0e..66d926907d04 100644 --- a/core/templates/dev/head/services/StateTopAnswersStatsServiceSpec.ts +++ b/core/templates/dev/head/services/StateTopAnswersStatsServiceSpec.ts @@ -20,26 +20,26 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // StateTopAnswersStatsService.ts is upgraded to Angular 8. import { AngularNameService } from - 'pages/exploration-editor-page/services/angular-name.service.ts'; + 'pages/exploration-editor-page/services/angular-name.service'; import { AnswerClassificationResultObjectFactory } from - 'domain/classifier/AnswerClassificationResultObjectFactory.ts'; + 'domain/classifier/AnswerClassificationResultObjectFactory'; import { IAnswerStatsBackendDict } from - 'domain/exploration/AnswerStatsObjectFactory.ts'; + 'domain/exploration/AnswerStatsObjectFactory'; import { ClassifierObjectFactory } from - 'domain/classifier/ClassifierObjectFactory.ts'; + 'domain/classifier/ClassifierObjectFactory'; import { ExplorationDraftObjectFactory } from - 'domain/exploration/ExplorationDraftObjectFactory.ts'; + 'domain/exploration/ExplorationDraftObjectFactory'; import { ParamChangeObjectFactory } from - 'domain/exploration/ParamChangeObjectFactory.ts'; -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; + 'domain/exploration/ParamChangeObjectFactory'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; /* eslint-disable max-len */ import { SolutionValidityService } from - 'pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts'; + 'pages/exploration-editor-page/editor-tab/services/solution-validity.service'; /* eslint-enable max-len */ import { VoiceoverObjectFactory } from - 'domain/exploration/VoiceoverObjectFactory.ts'; + 'domain/exploration/VoiceoverObjectFactory'; import { WrittenTranslationObjectFactory } from - 'domain/exploration/WrittenTranslationObjectFactory.ts'; + 'domain/exploration/WrittenTranslationObjectFactory'; // ^^^ This block is to be removed. require('App.ts'); diff --git a/core/templates/dev/head/services/UserServiceSpec.ts b/core/templates/dev/head/services/UserServiceSpec.ts index 39f29a2208d2..f40466824a35 100644 --- a/core/templates/dev/head/services/UserServiceSpec.ts +++ b/core/templates/dev/head/services/UserServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // UserService.ts is upgraded to Angular 8. -import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory.ts'; +import { UserInfoObjectFactory } from 'domain/user/UserInfoObjectFactory'; // ^^^ This block is to be removed. require('domain/utilities/UrlInterpolationService.ts'); diff --git a/core/tests/karma.conf.ts b/core/tests/karma.conf.ts index e7dda59b3019..92fecc5534a0 100644 --- a/core/tests/karma.conf.ts +++ b/core/tests/karma.conf.ts @@ -142,6 +142,7 @@ module.exports = function(config) { 'extensions', 'node_modules', ], + extensions: ['.ts', '.js', '.json', '.html', '.svg', '.png'] }, devtool: 'inline-source-map', module: { @@ -175,7 +176,10 @@ module.exports = function(config) { ] }, plugins: [ - new ForkTsCheckerWebpackPlugin({ checkSyntacticErrors: true }) + new ForkTsCheckerWebpackPlugin({ + async: false, + checkSyntacticErrors: true, + tsconfig: 'tsconfig-for-compile-check.json'}) ] } }); diff --git a/extensions/classifiers/SVMPredictionServiceSpec.ts b/extensions/classifiers/SVMPredictionServiceSpec.ts index b58c627bdcf8..a1c26b7b43e3 100644 --- a/extensions/classifiers/SVMPredictionServiceSpec.ts +++ b/extensions/classifiers/SVMPredictionServiceSpec.ts @@ -19,14 +19,14 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // SVMPredictionService.ts is upgraded to Angular 8. import { PredictionResultObjectFactory } from - 'domain/classifier/PredictionResultObjectFactory.ts'; + 'domain/classifier/PredictionResultObjectFactory'; // ^^^ This block is to be removed. describe('SVM prediction functions', function() { beforeEach(angular.mock.module('oppia')); beforeEach(angular.mock.module('oppia', function($provide) { $provide.value( - 'PredictionResultObjectFactory', new PredictionResultObjectFactory()); + 'PredictionResultObjectFactory', new PredictionResultObjectFactory(0, 0)); })); describe('Test SVM prediction functions', function() { diff --git a/extensions/classifiers/WinnowingPreprocessingServiceSpec.ts b/extensions/classifiers/WinnowingPreprocessingServiceSpec.ts index 9050e68be024..a1ac11642ef3 100644 --- a/extensions/classifiers/WinnowingPreprocessingServiceSpec.ts +++ b/extensions/classifiers/WinnowingPreprocessingServiceSpec.ts @@ -17,7 +17,7 @@ */ import { WinnowingPreprocessingService } from - 'classifiers/WinnowingPreprocessingService.ts'; + 'classifiers/WinnowingPreprocessingService'; describe('Winnowing preprocessing functions', function() { describe('Test winnowing preprocessing functions', function() { diff --git a/extensions/interactions/CodeRepl/CodeReplPredictionServiceSpec.ts b/extensions/interactions/CodeRepl/CodeReplPredictionServiceSpec.ts index a1e1fea6a474..5ea39e13c816 100644 --- a/extensions/interactions/CodeRepl/CodeReplPredictionServiceSpec.ts +++ b/extensions/interactions/CodeRepl/CodeReplPredictionServiceSpec.ts @@ -19,16 +19,16 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // CodeReplPredictionService.ts is upgraded to Angular 8. import { PredictionResultObjectFactory } from - 'domain/classifier/PredictionResultObjectFactory.ts'; + 'domain/classifier/PredictionResultObjectFactory'; import { WinnowingPreprocessingService } from - 'classifiers/WinnowingPreprocessingService.ts'; + 'classifiers/WinnowingPreprocessingService'; // ^^^ This block is to be removed. describe('CodeRepl prediction service', function() { beforeEach(angular.mock.module('oppia')); beforeEach(angular.mock.module('oppia', function($provide) { $provide.value( - 'PredictionResultObjectFactory', new PredictionResultObjectFactory()); + 'PredictionResultObjectFactory', new PredictionResultObjectFactory(0, 0)); $provide.value( 'WinnowingPreprocessingService', new WinnowingPreprocessingService()); })); diff --git a/extensions/interactions/CodeRepl/directives/CodeReplRulesServiceSpec.ts b/extensions/interactions/CodeRepl/directives/CodeReplRulesServiceSpec.ts index cd13cf174bef..68302cd3c6bb 100644 --- a/extensions/interactions/CodeRepl/directives/CodeReplRulesServiceSpec.ts +++ b/extensions/interactions/CodeRepl/directives/CodeReplRulesServiceSpec.ts @@ -17,7 +17,7 @@ */ import { CodeNormalizerService } from - 'services/CodeNormalizerService.ts'; + 'services/CodeNormalizerService'; require('interactions/CodeRepl/directives/CodeReplRulesService.ts'); diff --git a/extensions/interactions/CodeRepl/directives/CodeReplSpec.ts b/extensions/interactions/CodeRepl/directives/CodeReplSpec.ts index 6929f72d6fe9..de8096fe74d1 100644 --- a/extensions/interactions/CodeRepl/directives/CodeReplSpec.ts +++ b/extensions/interactions/CodeRepl/directives/CodeReplSpec.ts @@ -16,7 +16,7 @@ * @fileoverview Unit tests for the CodeRepl interaction. */ -import { CodeNormalizerService } from 'services/CodeNormalizerService.ts'; +import { CodeNormalizerService } from 'services/CodeNormalizerService'; describe('CodeRepl interaction', function() { describe('CodeRepl tests', function() { diff --git a/extensions/interactions/CodeRepl/directives/CodeReplValidationServiceSpec.ts b/extensions/interactions/CodeRepl/directives/CodeReplValidationServiceSpec.ts index 583eb36527df..35e4dc4f6ea5 100644 --- a/extensions/interactions/CodeRepl/directives/CodeReplValidationServiceSpec.ts +++ b/extensions/interactions/CodeRepl/directives/CodeReplValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // CodeReplValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require('interactions/CodeRepl/directives/CodeReplValidationService.ts'); diff --git a/extensions/interactions/Continue/directives/ContinueValidationServiceSpec.ts b/extensions/interactions/Continue/directives/ContinueValidationServiceSpec.ts index 12ef4f01dde7..e099fa05cbd8 100644 --- a/extensions/interactions/Continue/directives/ContinueValidationServiceSpec.ts +++ b/extensions/interactions/Continue/directives/ContinueValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // ContinueValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require('interactions/Continue/directives/ContinueValidationService.ts'); diff --git a/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputValidationServiceSpec.ts b/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputValidationServiceSpec.ts index 9a22bc2c014d..ab42c9592193 100644 --- a/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputValidationServiceSpec.ts +++ b/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // DragAndDropSortInputValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/extensions/interactions/FractionInput/directives/FractionInputValidationServiceSpec.ts b/extensions/interactions/FractionInput/directives/FractionInputValidationServiceSpec.ts index 531e53a4e643..7fb1ba3fea2e 100644 --- a/extensions/interactions/FractionInput/directives/FractionInputValidationServiceSpec.ts +++ b/extensions/interactions/FractionInput/directives/FractionInputValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // FractionInputValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. describe('FractionInputValidationService', function() { diff --git a/extensions/interactions/GraphInput/directives/GraphInputRulesServiceSpec.ts b/extensions/interactions/GraphInput/directives/GraphInputRulesServiceSpec.ts index f4db3b215503..83ec942be026 100644 --- a/extensions/interactions/GraphInput/directives/GraphInputRulesServiceSpec.ts +++ b/extensions/interactions/GraphInput/directives/GraphInputRulesServiceSpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // GraphInputRulesService is upgraded to Angular 8. import { GraphUtilsService } from - 'interactions/GraphInput/directives/GraphUtilsService.ts'; + 'interactions/GraphInput/directives/GraphUtilsService'; // ^^^ This block is to be removed. describe('Graph Input service', function() { diff --git a/extensions/interactions/GraphInput/directives/GraphInputValidationServiceSpec.ts b/extensions/interactions/GraphInput/directives/GraphInputValidationServiceSpec.ts index caae1f4f6bd3..36907591d6f3 100644 --- a/extensions/interactions/GraphInput/directives/GraphInputValidationServiceSpec.ts +++ b/extensions/interactions/GraphInput/directives/GraphInputValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // GraphInputValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. describe('GraphInputValidationService', function() { diff --git a/extensions/interactions/ImageClickInput/directives/ImageClickInputRulesServiceSpec.ts b/extensions/interactions/ImageClickInput/directives/ImageClickInputRulesServiceSpec.ts index ac85d3372d1a..0460b1dc34b4 100644 --- a/extensions/interactions/ImageClickInput/directives/ImageClickInputRulesServiceSpec.ts +++ b/extensions/interactions/ImageClickInput/directives/ImageClickInputRulesServiceSpec.ts @@ -17,7 +17,7 @@ */ import { ImageClickInputRulesService } from - 'interactions/ImageClickInput/directives/ImageClickInputRulesService.ts'; + 'interactions/ImageClickInput/directives/ImageClickInputRulesService'; describe('Image Click Input rules service', () => { let icirs: ImageClickInputRulesService = null; diff --git a/extensions/interactions/InteractiveMap/directives/InteractiveMapValidationServiceSpec.ts b/extensions/interactions/InteractiveMap/directives/InteractiveMapValidationServiceSpec.ts index 116bd6c460f4..f94db04a3919 100644 --- a/extensions/interactions/InteractiveMap/directives/InteractiveMapValidationServiceSpec.ts +++ b/extensions/interactions/InteractiveMap/directives/InteractiveMapValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // InteractiveMapValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputValidationServiceSpec.ts b/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputValidationServiceSpec.ts index 99be9ff78681..fc57f56d7374 100644 --- a/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputValidationServiceSpec.ts +++ b/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // ItemSelectionInputValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/extensions/interactions/LogicProof/directives/LogicProofValidationServiceSpec.ts b/extensions/interactions/LogicProof/directives/LogicProofValidationServiceSpec.ts index 9100c65c18ee..4114683b9b7b 100644 --- a/extensions/interactions/LogicProof/directives/LogicProofValidationServiceSpec.ts +++ b/extensions/interactions/LogicProof/directives/LogicProofValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // LogicProofValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require('interactions/LogicProof/directives/LogicProofValidationService.ts'); diff --git a/extensions/interactions/MathExpressionInput/directives/MathExpressionInputRulesServiceSpec.ts b/extensions/interactions/MathExpressionInput/directives/MathExpressionInputRulesServiceSpec.ts index a1c42301b0da..d2ef9cf6172e 100644 --- a/extensions/interactions/MathExpressionInput/directives/MathExpressionInputRulesServiceSpec.ts +++ b/extensions/interactions/MathExpressionInput/directives/MathExpressionInputRulesServiceSpec.ts @@ -18,7 +18,7 @@ /* eslint-disable max-len */ import { MathExpressionInputRulesService } from - 'interactions/MathExpressionInput/directives/MathExpressionInputRulesService.ts'; + 'interactions/MathExpressionInput/directives/MathExpressionInputRulesService'; /* eslint-enable max-len */ describe('Math expression input rules service', function() { diff --git a/extensions/interactions/MusicNotesInput/directives/MusicNotesInputValidationServiceSpec.ts b/extensions/interactions/MusicNotesInput/directives/MusicNotesInputValidationServiceSpec.ts index 9e58a9ad0d80..c339ec292581 100644 --- a/extensions/interactions/MusicNotesInput/directives/MusicNotesInputValidationServiceSpec.ts +++ b/extensions/interactions/MusicNotesInput/directives/MusicNotesInputValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // MusicNotesInputValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsValidationServiceSpec.ts b/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsValidationServiceSpec.ts index 45de0b8efaa0..ab2aa0b0cc2c 100644 --- a/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsValidationServiceSpec.ts +++ b/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // NumberWithUnitsValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/extensions/interactions/NumericInput/directives/NumericInputValidationServiceSpec.ts b/extensions/interactions/NumericInput/directives/NumericInputValidationServiceSpec.ts index 5bcb96531656..79bc062607a6 100644 --- a/extensions/interactions/NumericInput/directives/NumericInputValidationServiceSpec.ts +++ b/extensions/interactions/NumericInput/directives/NumericInputValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // NumericInputValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require( diff --git a/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorRulesServiceSpec.ts b/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorRulesServiceSpec.ts index f15e1b2af22e..5992bd8b498e 100644 --- a/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorRulesServiceSpec.ts +++ b/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorRulesServiceSpec.ts @@ -17,7 +17,7 @@ */ import { CodeNormalizerService } from - 'services/CodeNormalizerService.ts'; + 'services/CodeNormalizerService'; require( 'interactions/PencilCodeEditor/directives/PencilCodeEditorRulesService.ts'); diff --git a/extensions/interactions/SetInput/directives/SetInputValidationServiceSpec.ts b/extensions/interactions/SetInput/directives/SetInputValidationServiceSpec.ts index c6543fe25f4d..e2197d9502c5 100644 --- a/extensions/interactions/SetInput/directives/SetInputValidationServiceSpec.ts +++ b/extensions/interactions/SetInput/directives/SetInputValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // SetInputValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require('interactions/SetInput/directives/SetInputValidationService.ts'); diff --git a/extensions/interactions/TextInput/TextInputPredictionServiceSpec.ts b/extensions/interactions/TextInput/TextInputPredictionServiceSpec.ts index fae5097afe3a..89bc7358c686 100644 --- a/extensions/interactions/TextInput/TextInputPredictionServiceSpec.ts +++ b/extensions/interactions/TextInput/TextInputPredictionServiceSpec.ts @@ -19,7 +19,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // TextInputPredictionService.ts is upgraded to Angular 8. import { PredictionResultObjectFactory } from - 'domain/classifier/PredictionResultObjectFactory.ts'; + 'domain/classifier/PredictionResultObjectFactory'; // ^^^ This block is to be removed. describe('Text Input Prediction Service', function() { @@ -29,7 +29,7 @@ describe('Text Input Prediction Service', function() { beforeEach(angular.mock.module('oppia')); beforeEach(angular.mock.module('oppia', function($provide) { $provide.value( - 'PredictionResultObjectFactory', new PredictionResultObjectFactory()); + 'PredictionResultObjectFactory', new PredictionResultObjectFactory(0, 0)); })); describe('Test text prediction service', function() { diff --git a/extensions/interactions/TextInput/directives/TextInputValidationServiceSpec.ts b/extensions/interactions/TextInput/directives/TextInputValidationServiceSpec.ts index d3c9dd09a396..5783fd3561b8 100644 --- a/extensions/interactions/TextInput/directives/TextInputValidationServiceSpec.ts +++ b/extensions/interactions/TextInput/directives/TextInputValidationServiceSpec.ts @@ -18,7 +18,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // TextInputValidationService.ts is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. require('interactions/TextInput/directives/TextInputValidationService.ts'); diff --git a/extensions/interactions/baseValidatorSpec.ts b/extensions/interactions/baseValidatorSpec.ts index 1f26cd5d9678..ab6005e7c7e0 100644 --- a/extensions/interactions/baseValidatorSpec.ts +++ b/extensions/interactions/baseValidatorSpec.ts @@ -26,7 +26,7 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // interaction validators is upgraded to Angular 8. -import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory.ts'; +import { RuleObjectFactory } from 'domain/exploration/RuleObjectFactory'; // ^^^ This block is to be removed. describe('Interaction validator', function() { diff --git a/extensions/interactions/rulesSpec.ts b/extensions/interactions/rulesSpec.ts index 3b2d2fb2b6e8..000cfcc4e411 100644 --- a/extensions/interactions/rulesSpec.ts +++ b/extensions/interactions/rulesSpec.ts @@ -18,9 +18,9 @@ // TODO(#7222): Remove the following block of unnnecessary imports once // all the rules are upgraded to Angular 8. -import { CodeNormalizerService } from 'services/CodeNormalizerService.ts'; +import { CodeNormalizerService } from 'services/CodeNormalizerService'; import { GraphUtilsService } from - 'interactions/GraphInput/directives/GraphUtilsService.ts'; + 'interactions/GraphInput/directives/GraphUtilsService'; // ^^^ This block is to be removed. describe('Rule spec services', function() { diff --git a/tsconfig-for-compile-check.json b/tsconfig-for-compile-check.json new file mode 100644 index 000000000000..85bb9a200dc9 --- /dev/null +++ b/tsconfig-for-compile-check.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "allowJs": true, + "lib": ["es2017", "dom", "webworker"], + "noImplicitUseStrict": true, + "outDir": "local_compiled_js", + "rootDir": ".", + "skipLibCheck": true, + "target": "es5", + "typeRoots": ["./node_modules/@types"], + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "baseUrl": ".", + "paths": { + "app.constants": ["core/templates/dev/head/app.constants"], + "components/*": ["core/templates/dev/head/components/*"], + "domain/*": ["core/templates/dev/head/domain/*"], + "pages/*": ["core/templates/dev/head/pages/*"], + "services/*": ["core/templates/dev/head/services/*"], + "classifiers/*": ["extensions/classifiers/*"], + "interactions/*": ["extensions/interactions/*"] + } + }, + "files": ["assets/constants.js", "assets/rich_text_components_definitions.js", "core/tests/karma-globals.ts", "core/tests/karma.conf.ts"], + "include": ["core", "extensions", "typings"], + "exclude": ["core/tests"] +} diff --git a/tsconfig.json b/tsconfig.json index 7d68a678af86..e115d330d561 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,18 @@ "target": "es5", "typeRoots": ["./node_modules/@types"], "experimentalDecorators": true, - "emitDecoratorMetadata": true + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "baseUrl": ".", + "paths": { + "app.constants": ["core/templates/dev/head/app.constants"], + "components/*": ["core/templates/dev/head/components/*"], + "domain/*": ["core/templates/dev/head/domain/*"], + "pages/*": ["core/templates/dev/head/pages/*"], + "services/*": ["core/templates/dev/head/services/*"], + "classifiers/*": ["extensions/classifiers/*"], + "interactions/*": ["extensions/interactions/*"] + } }, "files_explanation": "These files are included separately since we still do not have webpack in extensions folder and these files are still included through scripts tags, so they need to be compiled separately.", "files": [ diff --git a/typings/custom-scope-defs.d.ts b/typings/custom-scope-defs.d.ts index d9ab00d1f315..627f535edcf1 100644 --- a/typings/custom-scope-defs.d.ts +++ b/typings/custom-scope-defs.d.ts @@ -4,7 +4,7 @@ interface ICustomScope extends ng.IScope { // ck-editor-4.directive.ts uiConfig?: any; - // AlertMessageDirective.ts + // alert-message.directive.ts getMessage?: (() => any); toastr?: any; AlertsService?: any; @@ -15,45 +15,45 @@ interface ICustomScope extends ng.IScope { onFileCleared?: (() => void); droppedFile?: any; - // custom-forms-directives/audio-file-uploader.directive.ts, ImageUploaderDirective.ts + // custom-forms-directives/audio-file-uploader.directive.ts, image-uploader.directive.ts errorMessage?: string; onFileChanged?: ((file: any, fileName?: string) => void); - // ImageUploaderDirective.ts + // image-uploader.directive.ts fileInputClassName?: string; // FormBuilder.ts validators?: any; - // ObjectEditorDirective.ts, ValueGeneratorEditorDirective.ts + // object-editor.directive.ts, value-generator-editor.directive.ts objType?: string; initArgs?: any; getInitArgs?: (() => any); - // ObjectEditorDirective.ts + // object-editor.directive.ts alwaysEditable?: boolean; isEditable?: boolean; getAlwaysEditable?: (() => boolean); getIsEditable?: (() => boolean); - // ValueGeneratorEditorDirective.ts, Copier.ts, RandomSelector.ts + // value-generator-editor.directive.ts, CopierDirective.ts, RandomSelectorDirective.ts generatorId?: string; - // ValueGeneratorEditorDirective.ts + // value-generator-editor.directive.ts getObjType?: (() => string); getGeneratorId?: (() => string); - // AudioTranslationBarDirective.ts + // audio-translation-bar.directive.ts showDropArea?: boolean; getVoiceoverRecorder?: (() => void); openAddAudioTranslationModal?: ((files: any) => void); userIsGuest?: boolean; dropAreaIsAccessible?: boolean; - // ConversationSkinDirective.ts + // conversation-skin.directive.ts directiveTemplate?: string; - // Copier.ts, RandomSelector.ts + // CopierDirective.ts, RandomSelectorDirective.ts getTemplateUrl?: (() => string); // OppiaInteractiveMusicNotesInputDirective.ts @@ -81,4 +81,7 @@ interface ICustomScope extends ng.IScope { staffTop?: number; submitAnswer?: (() => void); topPositionForCenterOfTopStaffLine?: number; + + // apply-validation.directive.ts + $ctrl: any; } diff --git a/typings/globals.d.ts b/typings/globals.d.ts new file mode 100644 index 000000000000..9fd2595152ac --- /dev/null +++ b/typings/globals.d.ts @@ -0,0 +1,8 @@ +// Using angular without declaration gives the following error: +// 'angular' refers to a UMD global, but the current file is a module. +// Consider adding an import instead. To fix this, we need to mark +// angular as a global. Ref: https://stackoverflow.com/a/42035067 +declare global { + const angular: ng.IAngularStatic; +} +export {}; diff --git a/webpack.config.ts b/webpack.config.ts index 0bf1928d43b1..d7a4a8664764 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -17,7 +17,6 @@ */ var CleanWebpackPlugin = require('clean-webpack-plugin'); -var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin'); const CKEditorWebpackPlugin = require( @@ -519,7 +518,6 @@ module.exports = { 'topic-viewer-page.mainpage.html', minify: htmlMinifyConfig, inject: false - }), - new ForkTsCheckerWebpackPlugin({ checkSyntacticErrors: true }) + }) ] }; diff --git a/webpack.dev.config.ts b/webpack.dev.config.ts index b6644e5dc04f..2e2b6d94e29a 100644 --- a/webpack.dev.config.ts +++ b/webpack.dev.config.ts @@ -16,11 +16,19 @@ * @fileoverview Development environment config file for Webpack. */ +var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); + var commonWebpackConfig = require('./webpack.config.ts'); var path = require('path'); const { styles } = require('@ckeditor/ckeditor5-dev-utils/lib/'); +var plugins = commonWebpackConfig.plugins; +plugins.push( + new ForkTsCheckerWebpackPlugin({ + checkSyntacticErrors: true, + tsconfig: 'tsconfig-for-compile-check.json'})); + module.exports = { mode: 'development', resolve: { @@ -29,13 +37,14 @@ module.exports = { path.resolve(__dirname, 'extensions'), path.resolve(__dirname, 'node_modules') ], + extensions: ['.ts', '.js', '.json', '.html', '.svg', '.png'], alias: { '@angular/upgrade/static': ( '@angular/upgrade/bundles/upgrade-static.umd.js') } }, entry: commonWebpackConfig.entries, - plugins: commonWebpackConfig.plugins, + plugins: plugins, module: { rules: [{ test: /ckeditor5-[^\/]+\/theme\/icons\/[^\/]+\.svg$/, diff --git a/webpack.prod.config.ts b/webpack.prod.config.ts index 586ed89d51cf..7bc400c56849 100644 --- a/webpack.prod.config.ts +++ b/webpack.prod.config.ts @@ -16,11 +16,20 @@ * @fileoverview Production environment config file for Webpack. */ +var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); + var commonWebpackConfig = require('./webpack.config.ts'); var path = require('path'); const { styles } = require('@ckeditor/ckeditor5-dev-utils/lib/'); +var plugins = commonWebpackConfig.plugins; +plugins.push( + new ForkTsCheckerWebpackPlugin({ + async: false, + checkSyntacticErrors: true, + tsconfig: 'tsconfig-for-compile-check.json'})); + module.exports = { mode: 'production', resolve: { @@ -29,13 +38,14 @@ module.exports = { path.resolve(__dirname, 'extensions'), path.resolve(__dirname, 'node_modules') ], + extensions: ['.ts', '.js', '.json', '.html', '.svg', '.png'], alias: { '@angular/upgrade/static': ( '@angular/upgrade/bundles/upgrade-static.umd.js') } }, entry: commonWebpackConfig.entries, - plugins: commonWebpackConfig.plugins, + plugins: plugins, module: { rules: [{ test: /ckeditor5-[^\/]+\/theme\/icons\/[^\/]+\.svg$/,