Skip to content

Зернюков Никита#8

Open
daleunixal wants to merge 3 commits into
RTF-Angular-2021:masterfrom
daleunixal:master
Open

Зернюков Никита#8
daleunixal wants to merge 3 commits into
RTF-Angular-2021:masterfrom
daleunixal:master

Conversation

@daleunixal
Copy link
Copy Markdown

No description provided.

Comment thread src/task_1/index.ts
let q = new Calculator(15, 78);
let ruCalc = new DecorateRu(15,78);
let enCalc = new DecorateEn(15,78);
console.log(`${q.exec()} \n ${enCalc.exec()} \n ${ruCalc.exec()}`)
Copy link
Copy Markdown

@m-abrosimov m-abrosimov Apr 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

засчитано 1 бал

Comment thread src/task_2/index.ts
Comment thread src/task_3/index.ts Outdated
public getInstance<?>(type: ?): ? {
public getInstance<T>(type: new () => Control<T>): Control<T> {
const instanceType = type.toString()
return this._collection.find(control => control.type === instanceType);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут TypeScript компилятор выдаст ошибку. потому что ты не возвращаешь .instance

Comment thread src/task_3/index.ts
public register<?>(type: ?) {
public register<T extends Control<any>>(type: new () => T) {

}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут нет регистрации

Comment thread src/task_4/index.ts
Comment thread src/task_5/index.ts
let property: T;
let descriptor: PropertyDescriptor = {
set(value: T) {
if (!(prop in value)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нет проверки на соответствие типа.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants