Skip to content

Commit adb92cb

Browse files
committed
ex-02: add AffricanSwallow to speciesDelegate resolution
1 parent 81bfbaa commit adb92cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/example-02/birds/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { AffricanSwallowDelegate } from './affrican-swallow/delegate/index.js';
12
import { EuropeanSwallowDelegate } from './european-swallow/delegate/index.js';
23

34
export class Bird {
@@ -23,6 +24,8 @@ export class Bird {
2324
switch (data.type) {
2425
case 'EuropeanSwallow':
2526
return new EuropeanSwallowDelegate();
27+
case 'AffricanSwallow':
28+
return new AffricanSwallowDelegate(data);
2629
default:
2730
return null;
2831
}

0 commit comments

Comments
 (0)