Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Add protected constructor topic - #158

Merged
Daniel Rosenwasser (DanielRosenwasser) merged 3 commits into
microsoft:masterfrom
AbubakerB:classesModifierUpdate
Feb 19, 2016
Merged

Add protected constructor topic#158
Daniel Rosenwasser (DanielRosenwasser) merged 3 commits into
microsoft:masterfrom
AbubakerB:classesModifierUpdate

Conversation

@AbubakerB

Copy link
Copy Markdown
Contributor

This PR adds some documentation for private and protected constructor in Classes.md
(TypeScript-6885#comment)

Comment thread pages/Classes.md Outdated
}

new Animal("Cat").name; // Error: 'name' is private;
new Employee("Bob"); // Error: 'Employee' is private;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The 'Employee' constructor is private.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't end these with semicolons

@AbubakerB Abubaker Bashir (AbubakerB) changed the title Add private and protected constructor topic Feb 19, 2016
Daniel Rosenwasser (DanielRosenwasser) added a commit that referenced this pull request Feb 19, 2016
@DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser) merged commit 97047b5 into microsoft:master Feb 19, 2016
@DanielRosenwasser

Copy link
Copy Markdown
Member

I've created a new branch called release-2.0 where the content is available.

@AbubakerB
Abubaker Bashir (AbubakerB) deleted the classesModifierUpdate branch February 19, 2016 21:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants