File tree Expand file tree Collapse file tree 9 files changed +13
-13
lines changed Expand file tree Collapse file tree 9 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 2929 * Declare methods for managing subscribers
3030 */
3131
32- import { SmartTV , AirConditioner } from "./class" ;
32+ import { SmartTV , AirConditioner } from ".. /class" ;
3333
3434type SceneName =
3535 | "movie-night"
Original file line number Diff line number Diff line change 1111 * This example shows how to implement a strategy pattern as a universal remote control.
1212 */
1313
14- import { PowerControl , VolumeControl , ChannelControl } from "./interface" ;
14+ import { PowerControl , VolumeControl , ChannelControl } from ".. /interface" ;
1515
1616export class DefaultPower implements PowerControl {
1717 powerOn ( ) : void {
Original file line number Diff line number Diff line change 33 * This file implements a universal remote control using the Strategy Pattern.
44 */
55
6- import { PowerControl , VolumeControl , ChannelControl } from "../interface" ;
6+ import { PowerControl , VolumeControl , ChannelControl } from "../../ interface" ;
77
88export class RemoteDevice {
99 constructor (
Original file line number Diff line number Diff line change 1818import { LightSceneFactory ,
1919 PowerControl ,
2020 BrightnessControl ,
21- } from "./interface" ;
21+ } from ".. /interface" ;
2222
23- import { LightBulb } from "./class" ;
23+ import { LightBulb } from ".. /class" ;
2424
25- import { DimmingLightDecorator , RGBLightDecorator } from "./decorator" ;
25+ import { DimmingLightDecorator , RGBLightDecorator } from "../structural /decorator" ;
2626
2727// A Parameterised (or Configurable) Factory
2828// One flexible factory that takes in the mood or colour as a parameter.
Original file line number Diff line number Diff line change 88 */
99
1010import { ConfigurableLightFactory } from '../factory' ;
11- import { DimmingLightDecorator } from '../decorator' ;
11+ import { DimmingLightDecorator } from '../../structural/ decorator' ;
1212
1313// Factory Registry Map
1414const sceneFactoryMap = new Map < string , ConfigurableLightFactory > ( [
Original file line number Diff line number Diff line change 2222 * central point of control for the devices.
2323*/
2424
25- import { SmartTV , AirConditioner } from "./class" ;
25+ import { SmartTV , AirConditioner } from ".. /class" ;
2626
2727type SceneName =
2828 | "movie-night"
Original file line number Diff line number Diff line change 55 */
66
77import { SingletonHomeHub } from '../singleton' ;
8- import { SmartTVObserver } from '../observer' ;
9- import { SmartTV } from '../class' ;
8+ import { SmartTVObserver } from '../../behavioral/ observer' ;
9+ import { SmartTV } from '../../ class' ;
1010
1111const hub = SingletonHomeHub . getInstance ( ) ;
1212const tv = new SmartTVObserver ( ) ;
Original file line number Diff line number Diff line change 44 * used to attach additional responsibilities to an object dynamically.
55 */
66
7- import { LightBulb } from "./class" ;
8- import { LightTemperatureStrategy } from "./interface" ;
7+ import { LightBulb } from ".. /class" ;
8+ import { LightTemperatureStrategy } from ".. /interface" ;
99
1010
1111/**
Original file line number Diff line number Diff line change 66 * Each decorator adds specific functionality to the base lightBulb class.
77 */
88
9- import { LightBulb } from '../class' ;
9+ import { LightBulb } from '../../ class' ;
1010import { CoolWhiteLightStrategy ,
1111 WarmWhiteLightStrategy ,
1212 RGBLightDecorator ,
You can’t perform that action at this time.
0 commit comments