We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9c653ca + 771ad9a commit b618b89Copy full SHA for b618b89
factory_method/factoryMethod.ts
@@ -17,8 +17,8 @@ namespace FactoryMethodPattern {
17
}
18
19
20
- export class ProductFactory {
21
- public static createProduct(type: string) : AbstractProduct {
+ export namespace ProductFactory {
+ export function createProduct(type: string) : AbstractProduct {
22
if (type === "A") {
23
return new ConcreteProductA();
24
} else if (type === "B") {
0 commit comments