-
-
Save justinyoo/f75994e6a536d687b5938f360e651b47 to your computer and use it in GitHub Desktop.
Using IoC Container in Vue.js and TypeScript App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// models/Weapon.ts | |
import { injectable } from "inversify"; | |
import Weapon from "../interfaces/Weapon"; | |
@injectable() | |
class Shuriken implements Weapon { | |
public constructor() { | |
this.name = "Shuriken"; | |
} | |
public name: string; | |
} | |
@injectable() | |
class Katana implements Weapon { | |
public constructor() { | |
this.name = "Katana"; | |
} | |
public name: string; | |
} | |
export { Shuriken, Katana }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment