Skip to content

Instantly share code, notes, and snippets.

@Caballerog
Created May 16, 2022 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Caballerog/7f2c14bf86ad61fd905a286df42ec12d to your computer and use it in GitHub Desktop.
Save Caballerog/7f2c14bf86ad61fd905a286df42ec12d to your computer and use it in GitHub Desktop.
class Character {
_name!: string;
constructor(name: string){
this._name = name;
}
get name(): string {
return this._name;
}
set name(value: string) {
this._name = value;
}
}
class CharacterRepository {
save(character: Character): void{
// Actions
}
delete(character: Character): void {
// Actions
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment