1 | import { ElementRef } from '@angular/core';
|
2 |
|
3 | import { Direction } from '../miscellaneous/miscellaneous';
|
4 |
|
5 | export class Tada {}
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export class Todo extends Tada {
|
12 | |
13 |
|
14 |
|
15 | completed: boolean;
|
16 | |
17 |
|
18 |
|
19 | editing: boolean;
|
20 |
|
21 | pos?: PopupPosition;
|
22 |
|
23 | |
24 |
|
25 |
|
26 | #newprivateproperty: boolean = false;
|
27 |
|
28 | private optionalProperty?: boolean;
|
29 |
|
30 | [index: number]: string;
|
31 |
|
32 | testCommentFunction(dig: number, str: string, bool: boolean): object {
|
33 | return {};
|
34 | }
|
35 |
|
36 | dir: Direction = Direction.Left;
|
37 |
|
38 | |
39 |
|
40 |
|
41 | private _title: string;
|
42 | |
43 |
|
44 |
|
45 | get title() {
|
46 | return this._title;
|
47 | }
|
48 | |
49 |
|
50 |
|
51 |
|
52 | set title(value: string) {
|
53 | this._title = value.trim();
|
54 | }
|
55 |
|
56 | static classMethod() {
|
57 | return 'hello';
|
58 | }
|
59 |
|
60 | |
61 |
|
62 |
|
63 |
|
64 | get runtimePath() {
|
65 | return this._options.runtimePath;
|
66 | }
|
67 |
|
68 | |
69 |
|
70 |
|
71 |
|
72 | constructor(title: string) {
|
73 | this.completed = false;
|
74 | this.editing = false;
|
75 | this.title = title.trim();
|
76 | }
|
77 |
|
78 | |
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 | fakeMethod(): boolean {
|
85 | return true;
|
86 | }
|
87 |
|
88 | azert() {
|
89 | return 5;
|
90 | }
|
91 |
|
92 | abstract abstractMethod(input: string): string;
|
93 |
|
94 | async asyncMethod() {}
|
95 |
|
96 | url2state = async <T>(defaults: Partial<T>) =>
|
97 | await this.route.queryParamMap
|
98 | .pipe(
|
99 |
|
100 | first(),
|
101 | map(r => {}),
|
102 | catchError(e => {})
|
103 | )
|
104 |
|
105 | .toPromise();
|
106 |
|
107 | #clicked() {
|
108 | this.editing = true;
|
109 | }
|
110 | }
|
111 |
|
112 | export type PopupPosition = ElementRef | HTMLElement;
|