Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Gali taip, bet cia su private tiesiog iškvietus constructorių
- class Test {
- constructor(setup: string) {
- this.Create(setup);
- }
- private Create(setup):void {
- // kažka padarom
- }
- }
- // Gali ir taip su public
- interface ITest {
- Create(setup?: string): void;
- }
- class Test {
- private setup:
- constructor(setup: string) {
- this.SetSetup(setup);
- }
- private SetSetup(setup: string) {
- this.setup = setup;
- }
- public Create(setup: string = null):void {
- if(setup != null) {
- this.setup = setup;
- }
- // kažka padarom su this.setup
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment