Skip to content

Commit

Permalink
refactor: remove _ prefix from private fields
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Dec 19, 2019
1 parent 49481c7 commit f98c7a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ObjectBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
*/

export class ObjectBuilder {
private _source: any = {}
private source: { [key: string]: any } = {}

public addProp (key, value) {
public addProp (key: string, value: any) {
if (value === undefined) {
return
}
this._source[key] = value
this.source[key] = value
}

public toJSON () {
return this._source
public toJSON (): { [key: string]: any } {
return this.source
}
}

0 comments on commit f98c7a0

Please sign in to comment.