-
Notifications
You must be signed in to change notification settings - Fork 10
Михайловский Евгений #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
The head ref may contain hidden characters: "\u041C\u0438\u0445\u0430\u0439\u043B\u043E\u0432\u0441\u043A\u0438\u0439-\u0415\u0432\u0433\u0435\u043D\u0438\u0439"
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| /// <reference path="typing.d.ts" /> | ||
| var Custom; | ||
| (function (Custom) { | ||
| var User = /** @class */ (function () { | ||
| function User(a, n) { | ||
| this.age = a; // number | ||
| this.name = n; // string | ||
| } | ||
| User.prototype.upAgeByYear = function () { | ||
| this.age++; | ||
| }; | ||
| return User; | ||
| }()); | ||
| Custom.user = new User(18, "Михаил"); | ||
| })(Custom || (Custom = {})); | ||
| Custom.user.upAgeByYear(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| declare class User { | ||
| public a: number; | ||
| public n: string; | ||
| constructor(a: number, n: string); | ||
| public upAgeByYear():void; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| export class Example { | ||
| public title: string; | ||
| public id: number; | ||
| private _setting: Setting; | ||
|
|
||
| constructor(s: Setting) { | ||
| this._setting = s; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| export class Setting { | ||
| public key: string; | ||
| public value: SettingValue; | ||
|
|
||
| constructor(k: string, ov: SettingValue) { | ||
| this.key = k; | ||
| this.value = ov; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| export class SettingValue { | ||
| public property1: string; | ||
| public property2: string; | ||
|
|
||
| constructor(p1: string, p2: string) { | ||
| this.property1 = p1; | ||
| this.property2 = p2; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>Document</title> | ||
| </head> | ||
| <body> | ||
| <script> src="SettingValue.js" </script> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Это не будет работать |
||
| </body> | ||
| </html> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это не будет работать.
https://www.youtube.com/watch?v=6ITG7PU2jlM&list=PL51FNaeWDci7CPQ-5BiqeFd6hfRWY_c6d&index=24