Skip to content

Commit 02b8689

Browse files
committed
Adjust patterns imports to reflect new directory structure
1 parent 57e3a8e commit 02b8689

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

design_patterns/behavioral/observer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* Declare methods for managing subscribers
3030
*/
3131

32-
import { SmartTV, AirConditioner } from "./class";
32+
import { SmartTV, AirConditioner } from "../class";
3333

3434
type SceneName =
3535
| "movie-night"

design_patterns/behavioral/strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
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

1616
export class DefaultPower implements PowerControl {
1717
powerOn(): void {

design_patterns/behavioral/strategy/RemoteDevice.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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

88
export class RemoteDevice {
99
constructor(

design_patterns/creational/factory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
import { 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.

design_patterns/creational/factory/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
import { ConfigurableLightFactory } from '../factory';
11-
import { DimmingLightDecorator } from '../decorator';
11+
import { DimmingLightDecorator } from '../../structural/decorator';
1212

1313
// Factory Registry Map
1414
const sceneFactoryMap = new Map<string, ConfigurableLightFactory>([

design_patterns/creational/singleton.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* central point of control for the devices.
2323
*/
2424

25-
import { SmartTV, AirConditioner } from "./class";
25+
import { SmartTV, AirConditioner } from "../class";
2626

2727
type SceneName =
2828
| "movie-night"

design_patterns/creational/singleton/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66

77
import { 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

1111
const hub = SingletonHomeHub.getInstance();
1212
const tv = new SmartTVObserver();

design_patterns/structural/decorator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
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
/**

design_patterns/structural/decorator/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Each decorator adds specific functionality to the base lightBulb class.
77
*/
88

9-
import { LightBulb } from '../class';
9+
import { LightBulb } from '../../class';
1010
import { CoolWhiteLightStrategy,
1111
WarmWhiteLightStrategy,
1212
RGBLightDecorator,

0 commit comments

Comments
 (0)