From 74e65089aaad6c4344b504ad4c28ace7daefa9b6 Mon Sep 17 00:00:00 2001 From: Andy Hopkins Date: Fri, 9 Jul 2021 10:52:56 +0100 Subject: [PATCH] build(webpack): fixes type errors when importing interfaces The root cause is in Typescript and transpilation. Once TypeScript code is transpiled, interfaces/types are gone. They don't exist anymore in the emitted files. https://stackoverflow.com/questions/40841641/cannot-import-exported-interface-export-not-found --- .../accordion-panel-heading.component.ts | 2 +- .../canopy/src/lib/accordion/accordion.component.ts | 2 +- .../canopy/src/lib/alert/alert.component.spec.ts | 2 +- projects/canopy/src/lib/alert/alert.component.ts | 2 +- projects/canopy/src/lib/button/button.component.ts | 2 +- projects/canopy/src/lib/button/button.stories.ts | 4 ++-- .../src/lib/card/card-title/card-title.component.ts | 2 +- .../canopy/src/lib/carousel/carousel.component.ts | 2 +- .../data-point-label/data-point-label.component.ts | 2 +- .../details-panel-heading.component.ts | 2 +- projects/canopy/src/lib/details/details.component.ts | 2 +- .../feature-toggle/feature-toggle.directive.spec.ts | 2 +- .../lib/feature-toggle/feature-toggle.directive.ts | 4 ++-- .../src/lib/feature-toggle/feature-toggle.module.ts | 2 +- .../src/lib/feature-toggle/feature-toggle.stories.ts | 2 +- projects/canopy/src/lib/forms/input/input.stories.ts | 2 +- .../src/lib/forms/radio/radio-button.component.ts | 2 +- .../src/lib/forms/radio/radio-group.component.ts | 2 +- .../canopy/src/lib/forms/radio/segment.stories.ts | 2 +- .../src/lib/forms/toggle/toggle.component.spec.ts | 12 +++++------- .../canopy/src/lib/forms/toggle/toggle.component.ts | 2 +- .../src/lib/forms/toggle/toggle.stories.common.ts | 2 +- .../forms/validation/validation.component.spec.ts | 2 +- .../src/lib/forms/validation/validation.component.ts | 2 +- projects/canopy/src/lib/heading/heading.component.ts | 2 +- .../hero-card-data-point-label.component.ts | 2 +- ...hero-card-principle-data-point-label.component.ts | 2 +- .../hero-card-title/hero-card-title.component.ts | 2 +- projects/canopy/src/lib/hide-at/hide-at.directive.ts | 2 +- .../lib/modal/modal-header/modal-header.component.ts | 2 +- .../promo-card-list-title.component.ts | 2 +- .../promo-card/promo-card/promo-card.component.ts | 2 +- .../canopy/src/lib/separator/separator.component.ts | 2 +- projects/canopy/src/lib/show-at/show-at.directive.ts | 2 +- .../src/lib/spacing/margin/margin.directive.ts | 2 +- .../src/lib/spacing/padding/padding.directive.ts | 2 +- projects/canopy/src/lib/spinner/spinner.component.ts | 2 +- projects/canopy/src/lib/table/table.stories.ts | 7 ++----- .../canopy/src/lib/table/table/table.component.ts | 7 ++----- projects/canopy/src/lib/tabs/tabs.component.ts | 2 +- .../canopy/src/lib/variant/variant.directive.spec.ts | 2 +- projects/canopy/src/lib/variant/variant.directive.ts | 2 +- projects/canopy/src/lib/variant/variant.stories.ts | 2 +- 43 files changed, 51 insertions(+), 59 deletions(-) diff --git a/projects/canopy/src/lib/accordion/accordion-panel-heading/accordion-panel-heading.component.ts b/projects/canopy/src/lib/accordion/accordion-panel-heading/accordion-panel-heading.component.ts index 3935d97d5..e2984c2d0 100644 --- a/projects/canopy/src/lib/accordion/accordion-panel-heading/accordion-panel-heading.component.ts +++ b/projects/canopy/src/lib/accordion/accordion-panel-heading/accordion-panel-heading.component.ts @@ -8,7 +8,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { HeadingLevel } from '../../heading'; +import type { HeadingLevel } from '../../heading'; let nextUniqueId = 0; diff --git a/projects/canopy/src/lib/accordion/accordion.component.ts b/projects/canopy/src/lib/accordion/accordion.component.ts index 97cbc74d2..7dea5f40a 100644 --- a/projects/canopy/src/lib/accordion/accordion.component.ts +++ b/projects/canopy/src/lib/accordion/accordion.component.ts @@ -11,7 +11,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { HeadingLevel } from '../heading'; +import type { HeadingLevel } from '../heading'; import { LgAccordionPanelHeadingComponent } from './accordion-panel-heading/accordion-panel-heading.component'; export const LG_ACCORDION = new InjectionToken('LG_ACCORDION'); diff --git a/projects/canopy/src/lib/alert/alert.component.spec.ts b/projects/canopy/src/lib/alert/alert.component.spec.ts index 70040b887..d69d66afa 100644 --- a/projects/canopy/src/lib/alert/alert.component.spec.ts +++ b/projects/canopy/src/lib/alert/alert.component.spec.ts @@ -5,7 +5,7 @@ import { MockComponents } from 'ng-mocks'; import { LgAlertComponent } from './alert.component'; import { LgIconComponent } from '../icon'; -import { Variant } from '../variant/variant.interface'; +import type { Variant } from '../variant/variant.interface'; describe('LgAlertComponent', () => { let component: LgAlertComponent; diff --git a/projects/canopy/src/lib/alert/alert.component.ts b/projects/canopy/src/lib/alert/alert.component.ts index 8f671939c..594c53239 100644 --- a/projects/canopy/src/lib/alert/alert.component.ts +++ b/projects/canopy/src/lib/alert/alert.component.ts @@ -7,7 +7,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { Variant } from '../variant/variant.interface'; +import type { Variant } from '../variant/variant.interface'; @Component({ selector: 'lg-alert', diff --git a/projects/canopy/src/lib/button/button.component.ts b/projects/canopy/src/lib/button/button.component.ts index 39dbc7b76..d350f1433 100644 --- a/projects/canopy/src/lib/button/button.component.ts +++ b/projects/canopy/src/lib/button/button.component.ts @@ -7,7 +7,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { ButtonVariant, ButtonIconPosition, ButtonSize } from './button.interface'; +import type { ButtonVariant, ButtonIconPosition, ButtonSize } from './button.interface'; @Component({ selector: '[lg-button]', diff --git a/projects/canopy/src/lib/button/button.stories.ts b/projects/canopy/src/lib/button/button.stories.ts index ffe2b6761..25dbb0859 100644 --- a/projects/canopy/src/lib/button/button.stories.ts +++ b/projects/canopy/src/lib/button/button.stories.ts @@ -7,8 +7,8 @@ import { LgButtonModule } from './button.module'; import { notes } from './button.notes'; import { iconsArray } from '../icon/icons.stories'; import { LgIconModule, LgIconRegistry } from '../icon'; -import { ButtonIconPosition } from '.'; -import { ButtonVariant, ButtonSize } from './button.interface'; +import type { ButtonIconPosition } from '.'; +import type { ButtonVariant, ButtonSize } from './button.interface'; const buttonVariants = [ 'add-on', diff --git a/projects/canopy/src/lib/card/card-title/card-title.component.ts b/projects/canopy/src/lib/card/card-title/card-title.component.ts index 948d07350..ed32021c4 100644 --- a/projects/canopy/src/lib/card/card-title/card-title.component.ts +++ b/projects/canopy/src/lib/card/card-title/card-title.component.ts @@ -6,7 +6,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { HeadingLevel } from '../../heading'; +import type { HeadingLevel } from '../../heading'; @Component({ selector: 'lg-card-title', diff --git a/projects/canopy/src/lib/carousel/carousel.component.ts b/projects/canopy/src/lib/carousel/carousel.component.ts index 3633510ab..bbbf91878 100644 --- a/projects/canopy/src/lib/carousel/carousel.component.ts +++ b/projects/canopy/src/lib/carousel/carousel.component.ts @@ -13,7 +13,7 @@ import { import { BehaviorSubject, defer, interval, Observable, Subject } from 'rxjs'; import { filter, map, takeUntil, withLatestFrom } from 'rxjs/operators'; -import { HeadingLevel } from '../heading'; +import type { HeadingLevel } from '../heading'; import { LgCarouselItemComponent } from './carousel-item/carousel-item.component'; @Component({ diff --git a/projects/canopy/src/lib/data-point/data-point-label/data-point-label.component.ts b/projects/canopy/src/lib/data-point/data-point-label/data-point-label.component.ts index 7f8d1e4a7..c65988b94 100644 --- a/projects/canopy/src/lib/data-point/data-point-label/data-point-label.component.ts +++ b/projects/canopy/src/lib/data-point/data-point-label/data-point-label.component.ts @@ -6,7 +6,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { HeadingLevel } from '../../heading'; +import type { HeadingLevel } from '../../heading'; @Component({ selector: 'lg-data-point-label', diff --git a/projects/canopy/src/lib/details/details-panel-heading/details-panel-heading.component.ts b/projects/canopy/src/lib/details/details-panel-heading/details-panel-heading.component.ts index 228fcd67b..39a43ebfb 100644 --- a/projects/canopy/src/lib/details/details-panel-heading/details-panel-heading.component.ts +++ b/projects/canopy/src/lib/details/details-panel-heading/details-panel-heading.component.ts @@ -9,7 +9,7 @@ import { } from '@angular/core'; import { lgIconChevronDown } from '../../icon'; -import { Variant } from '../../variant'; +import type { Variant } from '../../variant'; let nextUniqueId = 0; @Component({ diff --git a/projects/canopy/src/lib/details/details.component.ts b/projects/canopy/src/lib/details/details.component.ts index e20d4afaf..2e0982e0a 100644 --- a/projects/canopy/src/lib/details/details.component.ts +++ b/projects/canopy/src/lib/details/details.component.ts @@ -16,7 +16,7 @@ import { import { Subscription } from 'rxjs'; -import { Variant } from '../variant'; +import type { Variant } from '../variant'; import { LgDetailsPanelHeadingComponent } from './details-panel-heading/details-panel-heading.component'; let nextUniqueId = 0; diff --git a/projects/canopy/src/lib/feature-toggle/feature-toggle.directive.spec.ts b/projects/canopy/src/lib/feature-toggle/feature-toggle.directive.spec.ts index 57ae17677..4d6dc8211 100644 --- a/projects/canopy/src/lib/feature-toggle/feature-toggle.directive.spec.ts +++ b/projects/canopy/src/lib/feature-toggle/feature-toggle.directive.spec.ts @@ -6,7 +6,7 @@ import { of } from 'rxjs'; import { instance, mock, when } from 'ts-mockito'; import { LgFeatureToggleDirective } from './feature-toggle.directive'; -import { LgFeatureToggleOptions } from './feature-toggle.interface'; +import type { LgFeatureToggleOptions } from './feature-toggle.interface'; import { LgFeatureToggleService } from './feature-toggle.service'; @Component({ diff --git a/projects/canopy/src/lib/feature-toggle/feature-toggle.directive.ts b/projects/canopy/src/lib/feature-toggle/feature-toggle.directive.ts index b7d0552d4..13b8aae53 100644 --- a/projects/canopy/src/lib/feature-toggle/feature-toggle.directive.ts +++ b/projects/canopy/src/lib/feature-toggle/feature-toggle.directive.ts @@ -12,11 +12,11 @@ import { import { filter, tap } from 'rxjs/operators'; import { Subscription } from 'rxjs'; -import { +import type { LgFeatureToggleConfig, LgFeatureToggleOptions, - togglesOptionsInjectable, } from './feature-toggle.interface'; +import { togglesOptionsInjectable } from './feature-toggle.interface'; import { LgFeatureToggleService } from './feature-toggle.service'; diff --git a/projects/canopy/src/lib/feature-toggle/feature-toggle.module.ts b/projects/canopy/src/lib/feature-toggle/feature-toggle.module.ts index 5a91f9366..34debdba1 100644 --- a/projects/canopy/src/lib/feature-toggle/feature-toggle.module.ts +++ b/projects/canopy/src/lib/feature-toggle/feature-toggle.module.ts @@ -1,8 +1,8 @@ import { ModuleWithProviders, NgModule } from '@angular/core'; import { LgFeatureToggleDirective } from './feature-toggle.directive'; +import type { LgFeatureToggleOptions } from './feature-toggle.interface'; import { - LgFeatureToggleOptions, LgToggles, togglesInjectable, togglesOptionsInjectable, diff --git a/projects/canopy/src/lib/feature-toggle/feature-toggle.stories.ts b/projects/canopy/src/lib/feature-toggle/feature-toggle.stories.ts index f8668bc85..895c5a614 100644 --- a/projects/canopy/src/lib/feature-toggle/feature-toggle.stories.ts +++ b/projects/canopy/src/lib/feature-toggle/feature-toggle.stories.ts @@ -2,7 +2,7 @@ import { storiesOf } from '@storybook/angular'; import { of } from 'rxjs'; import { CanopyModule } from '../canopy.module'; -import { LgFeatureToggleOptions } from './feature-toggle.interface'; +import type { LgFeatureToggleOptions } from './feature-toggle.interface'; import { LgFeatureToggleModule } from './feature-toggle.module'; import { notes } from './feature-toggle.notes'; diff --git a/projects/canopy/src/lib/forms/input/input.stories.ts b/projects/canopy/src/lib/forms/input/input.stories.ts index b61d4d869..e3a4cb07f 100644 --- a/projects/canopy/src/lib/forms/input/input.stories.ts +++ b/projects/canopy/src/lib/forms/input/input.stories.ts @@ -12,7 +12,7 @@ import { LgLabelModule } from '../label/label.module'; import { LgButtonModule } from '../../button/button.module'; import { LgHintModule } from '../hint'; import { iconsArray } from '../../icon/icons.stories'; -import { ButtonVariant } from '../../button'; +import type { ButtonVariant } from '../../button'; import { LgSuffixModule } from '../../suffix'; import { LgPrefixModule } from '../../prefix'; diff --git a/projects/canopy/src/lib/forms/radio/radio-button.component.ts b/projects/canopy/src/lib/forms/radio/radio-button.component.ts index f0d49b4b6..50450c1be 100644 --- a/projects/canopy/src/lib/forms/radio/radio-button.component.ts +++ b/projects/canopy/src/lib/forms/radio/radio-button.component.ts @@ -15,7 +15,7 @@ import { FormGroupDirective, NgControl } from '@angular/forms'; import { LgErrorStateMatcher } from '../validation/error-state-matcher'; import { LgRadioGroupComponent } from './radio-group.component'; -import { RadioStackBreakpoint, RadioVariant } from './radio.interface'; +import type { RadioStackBreakpoint, RadioVariant } from './radio.interface'; let nextUniqueId = 0; diff --git a/projects/canopy/src/lib/forms/radio/radio-group.component.ts b/projects/canopy/src/lib/forms/radio/radio-group.component.ts index d025b10e5..e2b94ad9e 100644 --- a/projects/canopy/src/lib/forms/radio/radio-group.component.ts +++ b/projects/canopy/src/lib/forms/radio/radio-group.component.ts @@ -21,7 +21,7 @@ import { LgHintComponent } from '../hint/hint.component'; import { LgErrorStateMatcher } from '../validation/error-state-matcher'; import { LgValidationComponent } from '../validation/validation.component'; import { LgRadioButtonComponent } from './radio-button.component'; -import { RadioStackBreakpoint, RadioVariant } from './radio.interface'; +import type { RadioStackBreakpoint, RadioVariant } from './radio.interface'; let uniqueId = 0; diff --git a/projects/canopy/src/lib/forms/radio/segment.stories.ts b/projects/canopy/src/lib/forms/radio/segment.stories.ts index 0e6733264..5a4d1de6d 100644 --- a/projects/canopy/src/lib/forms/radio/segment.stories.ts +++ b/projects/canopy/src/lib/forms/radio/segment.stories.ts @@ -7,7 +7,7 @@ import { action } from '@storybook/addon-actions'; import { notes } from './radio.notes'; import { LgRadioModule } from './radio.module'; -import { RadioStackBreakpoint } from './radio.interface'; +import type { RadioStackBreakpoint } from './radio.interface'; @Component({ selector: 'lg-reactive-form-segment', diff --git a/projects/canopy/src/lib/forms/toggle/toggle.component.spec.ts b/projects/canopy/src/lib/forms/toggle/toggle.component.spec.ts index 7cfe30481..4f32c77a0 100644 --- a/projects/canopy/src/lib/forms/toggle/toggle.component.spec.ts +++ b/projects/canopy/src/lib/forms/toggle/toggle.component.spec.ts @@ -18,7 +18,7 @@ import { LgIconComponent } from '../../icon'; import { LgErrorStateMatcher } from '../validation/error-state-matcher'; import { LgValidationComponent } from '../validation/validation.component'; import { LgToggleComponent } from './toggle.component'; -import { ToggleVariant } from './toggle.interface'; +import type { ToggleVariant } from './toggle.interface'; const validationTestId = 'test-validation-id'; @@ -134,9 +134,8 @@ describe('LgToggleComponent', () => { toggleDebugElement = fixture.debugElement.query(By.directive(LgToggleComponent)); - toggleInstance = toggleDebugElement.injector.get( - LgToggleComponent, - ); + toggleInstance = + toggleDebugElement.injector.get(LgToggleComponent); inputDebugElement = fixture.debugElement.query(By.css('.lg-toggle__input')); inputLabelElement = fixture.debugElement.query(By.css('.lg-toggle__label')); @@ -276,9 +275,8 @@ describe('LgToggleComponent selector variant', () => { toggleDebugElement = fixture.debugElement.query(By.directive(LgToggleComponent)); - toggleInstance = toggleDebugElement.injector.get( - LgToggleComponent, - ); + toggleInstance = + toggleDebugElement.injector.get(LgToggleComponent); inputLabelElement = fixture.debugElement.query(By.css('.lg-toggle__label')); fixture.detectChanges(); diff --git a/projects/canopy/src/lib/forms/toggle/toggle.component.ts b/projects/canopy/src/lib/forms/toggle/toggle.component.ts index 9491b8421..ca93e6d0c 100644 --- a/projects/canopy/src/lib/forms/toggle/toggle.component.ts +++ b/projects/canopy/src/lib/forms/toggle/toggle.component.ts @@ -18,7 +18,7 @@ import { LgDomService } from '../../utils/dom.service'; import { LgErrorStateMatcher } from '../validation/error-state-matcher'; import { LgValidationComponent } from '../validation/validation.component'; import { LgCheckboxGroupComponent } from '../checkbox-group'; -import { ToggleVariant } from './toggle.interface'; +import type { ToggleVariant } from './toggle.interface'; let nextUniqueId = 0; diff --git a/projects/canopy/src/lib/forms/toggle/toggle.stories.common.ts b/projects/canopy/src/lib/forms/toggle/toggle.stories.common.ts index d702d5303..7a7c3716b 100644 --- a/projects/canopy/src/lib/forms/toggle/toggle.stories.common.ts +++ b/projects/canopy/src/lib/forms/toggle/toggle.stories.common.ts @@ -11,7 +11,7 @@ import { FormBuilder, FormGroup } from '@angular/forms'; import { action } from '@storybook/addon-actions'; import { boolean, text } from '@storybook/addon-knobs'; -import { ToggleVariant } from './toggle.interface'; +import type { ToggleVariant } from './toggle.interface'; @Component({ selector: 'lg-reactive-form', diff --git a/projects/canopy/src/lib/forms/validation/validation.component.spec.ts b/projects/canopy/src/lib/forms/validation/validation.component.spec.ts index f8147a218..124f9e520 100644 --- a/projects/canopy/src/lib/forms/validation/validation.component.spec.ts +++ b/projects/canopy/src/lib/forms/validation/validation.component.spec.ts @@ -5,7 +5,7 @@ import { CanopyModule } from '../../canopy.module'; import { LgValidationComponent } from './validation.component'; import { LgIconComponent } from '../../icon'; -import { Variant } from '../../variant'; +import type { Variant } from '../../variant'; describe('LgValidationComponent', () => { let component: LgValidationComponent; diff --git a/projects/canopy/src/lib/forms/validation/validation.component.ts b/projects/canopy/src/lib/forms/validation/validation.component.ts index 251a9ac1f..1796b62fe 100644 --- a/projects/canopy/src/lib/forms/validation/validation.component.ts +++ b/projects/canopy/src/lib/forms/validation/validation.component.ts @@ -7,7 +7,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { Variant } from '../../variant'; +import type { Variant } from '../../variant'; let nextUniqueId = 0; diff --git a/projects/canopy/src/lib/heading/heading.component.ts b/projects/canopy/src/lib/heading/heading.component.ts index 6535a5fe1..f2bd1d2cf 100644 --- a/projects/canopy/src/lib/heading/heading.component.ts +++ b/projects/canopy/src/lib/heading/heading.component.ts @@ -1,6 +1,6 @@ import { Component, Input, ViewEncapsulation } from '@angular/core'; -import { HeadingLevel } from './heading.interface'; +import type { HeadingLevel } from './heading.interface'; @Component({ selector: 'lg-heading', diff --git a/projects/canopy/src/lib/hero/hero-card-data-point-label/hero-card-data-point-label.component.ts b/projects/canopy/src/lib/hero/hero-card-data-point-label/hero-card-data-point-label.component.ts index dfff0eb86..d8cc9fb18 100644 --- a/projects/canopy/src/lib/hero/hero-card-data-point-label/hero-card-data-point-label.component.ts +++ b/projects/canopy/src/lib/hero/hero-card-data-point-label/hero-card-data-point-label.component.ts @@ -6,7 +6,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { HeadingLevel } from '../../heading'; +import type { HeadingLevel } from '../../heading'; @Component({ selector: 'lg-hero-card-data-point-label', diff --git a/projects/canopy/src/lib/hero/hero-card-principle-data-point-label/hero-card-principle-data-point-label.component.ts b/projects/canopy/src/lib/hero/hero-card-principle-data-point-label/hero-card-principle-data-point-label.component.ts index 641fd8faa..d36aef9cc 100644 --- a/projects/canopy/src/lib/hero/hero-card-principle-data-point-label/hero-card-principle-data-point-label.component.ts +++ b/projects/canopy/src/lib/hero/hero-card-principle-data-point-label/hero-card-principle-data-point-label.component.ts @@ -6,7 +6,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { HeadingLevel } from '../../heading'; +import type { HeadingLevel } from '../../heading'; @Component({ selector: 'lg-hero-card-principle-data-point-label', diff --git a/projects/canopy/src/lib/hero/hero-card-title/hero-card-title.component.ts b/projects/canopy/src/lib/hero/hero-card-title/hero-card-title.component.ts index f9794096a..7d8be82e9 100644 --- a/projects/canopy/src/lib/hero/hero-card-title/hero-card-title.component.ts +++ b/projects/canopy/src/lib/hero/hero-card-title/hero-card-title.component.ts @@ -1,6 +1,6 @@ import { Component, HostBinding, Input, ViewEncapsulation } from '@angular/core'; -import { HeadingLevel } from '../../heading'; +import type { HeadingLevel } from '../../heading'; @Component({ selector: 'lg-hero-card-title', diff --git a/projects/canopy/src/lib/hide-at/hide-at.directive.ts b/projects/canopy/src/lib/hide-at/hide-at.directive.ts index f9e27adc5..1f3702939 100644 --- a/projects/canopy/src/lib/hide-at/hide-at.directive.ts +++ b/projects/canopy/src/lib/hide-at/hide-at.directive.ts @@ -1,6 +1,6 @@ import { Directive, ElementRef, Input, Renderer2 } from '@angular/core'; -import { Breakpoints } from '../shared/breakpoints.interface'; +import type { Breakpoints } from '../shared/breakpoints.interface'; @Directive({ selector: '[lgHideAt]', diff --git a/projects/canopy/src/lib/modal/modal-header/modal-header.component.ts b/projects/canopy/src/lib/modal/modal-header/modal-header.component.ts index 90f400346..6766131ee 100644 --- a/projects/canopy/src/lib/modal/modal-header/modal-header.component.ts +++ b/projects/canopy/src/lib/modal/modal-header/modal-header.component.ts @@ -8,7 +8,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { HeadingLevel } from '../../heading'; +import type { HeadingLevel } from '../../heading'; import { LgModalService } from '../modal.service'; @Component({ diff --git a/projects/canopy/src/lib/promo-card/promo-card-list/promo-card-list-title/promo-card-list-title.component.ts b/projects/canopy/src/lib/promo-card/promo-card-list/promo-card-list-title/promo-card-list-title.component.ts index d64a878dc..2cb892ffb 100644 --- a/projects/canopy/src/lib/promo-card/promo-card-list/promo-card-list-title/promo-card-list-title.component.ts +++ b/projects/canopy/src/lib/promo-card/promo-card-list/promo-card-list-title/promo-card-list-title.component.ts @@ -6,7 +6,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { HeadingLevel } from '../../../heading'; +import type { HeadingLevel } from '../../../heading'; @Component({ selector: 'lg-promo-card-list-title', diff --git a/projects/canopy/src/lib/promo-card/promo-card/promo-card.component.ts b/projects/canopy/src/lib/promo-card/promo-card/promo-card.component.ts index f6c5d2bbd..8711eca9f 100644 --- a/projects/canopy/src/lib/promo-card/promo-card/promo-card.component.ts +++ b/projects/canopy/src/lib/promo-card/promo-card/promo-card.component.ts @@ -7,7 +7,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { PromoCardVariant } from '../promo-card.interface'; +import type { PromoCardVariant } from '../promo-card.interface'; @Component({ selector: 'lg-promo-card', diff --git a/projects/canopy/src/lib/separator/separator.component.ts b/projects/canopy/src/lib/separator/separator.component.ts index 457a87c01..c56595888 100644 --- a/projects/canopy/src/lib/separator/separator.component.ts +++ b/projects/canopy/src/lib/separator/separator.component.ts @@ -7,7 +7,7 @@ import { ViewEncapsulation, } from '@angular/core'; -import { SeparatorVariant } from './separator.interface'; +import type { SeparatorVariant } from './separator.interface'; @Component({ selector: 'lg-separator', diff --git a/projects/canopy/src/lib/show-at/show-at.directive.ts b/projects/canopy/src/lib/show-at/show-at.directive.ts index 258900ec2..f177aabbe 100644 --- a/projects/canopy/src/lib/show-at/show-at.directive.ts +++ b/projects/canopy/src/lib/show-at/show-at.directive.ts @@ -1,6 +1,6 @@ import { Directive, ElementRef, Input, Renderer2 } from '@angular/core'; -import { Breakpoints } from '../shared/breakpoints.interface'; +import type { Breakpoints } from '../shared/breakpoints.interface'; @Directive({ selector: '[lgShowAt]', diff --git a/projects/canopy/src/lib/spacing/margin/margin.directive.ts b/projects/canopy/src/lib/spacing/margin/margin.directive.ts index af37a794e..3a3fec82d 100644 --- a/projects/canopy/src/lib/spacing/margin/margin.directive.ts +++ b/projects/canopy/src/lib/spacing/margin/margin.directive.ts @@ -1,6 +1,6 @@ import { Directive, ElementRef, Input, Renderer2 } from '@angular/core'; -import { SpacingVariant } from '../spacing.interface'; +import type { SpacingVariant } from '../spacing.interface'; @Directive({ selector: ` diff --git a/projects/canopy/src/lib/spacing/padding/padding.directive.ts b/projects/canopy/src/lib/spacing/padding/padding.directive.ts index e55078fed..b12629a8a 100644 --- a/projects/canopy/src/lib/spacing/padding/padding.directive.ts +++ b/projects/canopy/src/lib/spacing/padding/padding.directive.ts @@ -1,6 +1,6 @@ import { Directive, ElementRef, Input, Renderer2 } from '@angular/core'; -import { SpacingVariant } from '../spacing.interface'; +import type { SpacingVariant } from '../spacing.interface'; @Directive({ selector: ` diff --git a/projects/canopy/src/lib/spinner/spinner.component.ts b/projects/canopy/src/lib/spinner/spinner.component.ts index 062db1d2c..f0aa06b1d 100644 --- a/projects/canopy/src/lib/spinner/spinner.component.ts +++ b/projects/canopy/src/lib/spinner/spinner.component.ts @@ -1,6 +1,6 @@ import { Component, HostBinding, Input, ViewEncapsulation } from '@angular/core'; -import { SpinnerVariant, SpinnerSize } from './spinner.interface'; +import type { SpinnerVariant, SpinnerSize } from './spinner.interface'; @Component({ selector: 'lg-spinner', diff --git a/projects/canopy/src/lib/table/table.stories.ts b/projects/canopy/src/lib/table/table.stories.ts index ea7c976a9..38cf5695c 100644 --- a/projects/canopy/src/lib/table/table.stories.ts +++ b/projects/canopy/src/lib/table/table.stories.ts @@ -3,11 +3,8 @@ import { ChangeDetectorRef, Component, Input } from '@angular/core'; import { boolean, object, select, withKnobs } from '@storybook/addon-knobs'; import { moduleMetadata } from '@storybook/angular'; -import { - AlignmentOptions, - TableColumnLayoutBreakpoints, - TableVariant, -} from './table.interface'; +import type { TableVariant } from './table.interface'; +import { AlignmentOptions, TableColumnLayoutBreakpoints } from './table.interface'; import { LgInputModule } from '../forms'; import { LgMarginModule } from '../spacing'; import { LgSuffixModule } from '../suffix'; diff --git a/projects/canopy/src/lib/table/table/table.component.ts b/projects/canopy/src/lib/table/table/table.component.ts index 119181cd6..daeee752b 100644 --- a/projects/canopy/src/lib/table/table/table.component.ts +++ b/projects/canopy/src/lib/table/table/table.component.ts @@ -12,11 +12,8 @@ import { import { LgTableBodyComponent } from '../table-body/table-body.component'; import { LgTableHeadComponent } from '../table-head/table-head.component'; -import { - TableColumn, - TableColumnLayoutBreakpoints, - TableVariant, -} from '../table.interface'; +import type { TableColumn, TableVariant } from '../table.interface'; +import { TableColumnLayoutBreakpoints } from '../table.interface'; let nextUniqueId = 0; diff --git a/projects/canopy/src/lib/tabs/tabs.component.ts b/projects/canopy/src/lib/tabs/tabs.component.ts index 2e2f0de54..82d4832a8 100644 --- a/projects/canopy/src/lib/tabs/tabs.component.ts +++ b/projects/canopy/src/lib/tabs/tabs.component.ts @@ -16,7 +16,7 @@ import { import { Subscription } from 'rxjs'; -import { HeadingLevel } from '../heading/heading.interface'; +import type { HeadingLevel } from '../heading/heading.interface'; import { isKeyDown, isKeyLeft, isKeyRight, isKeyUp } from '../utils/keyboard-keys'; import { LgTabItemComponent } from './tab-item/tab-item.component'; diff --git a/projects/canopy/src/lib/variant/variant.directive.spec.ts b/projects/canopy/src/lib/variant/variant.directive.spec.ts index 9554eb3ac..86b1b082c 100644 --- a/projects/canopy/src/lib/variant/variant.directive.spec.ts +++ b/projects/canopy/src/lib/variant/variant.directive.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { LgVariantDirective } from './variant.directive'; -import { Variant } from './variant.interface'; +import type { Variant } from './variant.interface'; @Component({ template: `
Test
`, diff --git a/projects/canopy/src/lib/variant/variant.directive.ts b/projects/canopy/src/lib/variant/variant.directive.ts index 3eb7f0c0f..eb4cc9a4d 100644 --- a/projects/canopy/src/lib/variant/variant.directive.ts +++ b/projects/canopy/src/lib/variant/variant.directive.ts @@ -1,6 +1,6 @@ import { Directive, ElementRef, Input, Renderer2 } from '@angular/core'; -import { Variant } from './variant.interface'; +import type { Variant } from './variant.interface'; @Directive({ selector: '[lgVariant]', diff --git a/projects/canopy/src/lib/variant/variant.stories.ts b/projects/canopy/src/lib/variant/variant.stories.ts index cf602378e..eee52f46d 100644 --- a/projects/canopy/src/lib/variant/variant.stories.ts +++ b/projects/canopy/src/lib/variant/variant.stories.ts @@ -9,7 +9,7 @@ import { LgGridModule } from '../grid'; import { LgIconModule, LgIconRegistry } from '../icon'; import { iconsArray } from '../icon/icons.stories'; import { LgSpacingModule } from '../spacing'; -import { Variant } from './variant.interface'; +import type { Variant } from './variant.interface'; import { LgVariantModule } from './variant.module'; import { notes } from './variant.notes';