Assigning Typescript constructor parameters : <p>I have interface :</p>

<pre><code>export interface IFieldValue {
    name: string;
    value: string;
}
</code></pre>

<p>And I have class that implements it :</p>

<pre><code>class Person implements IFieldValue{
    name: string;
    value: string;
    constructor (name: string, value: string) {
        this.name = name;
        this.value = value;
    }
}
</code></pre>

<p>after reading <a href="https://www.stevefenton.co.uk/2013/04/stop-manually-assigning-typescript-constructor-parameters/" rel="noreferrer">this post</a> I've thinking about refactoring :</p>

<pre><code>class Person implements IFieldValue{
    constructor(public name: string, public value: string) {
    }
}
</code></pre>

<p>Question : In first class I have fields which by default should be as <code>private</code>. In second sample I can only set them as <code>public</code>. Is it all correct or my understanding of default Access modifiers in TypeScript? </p>
