Skip to content

Possibly broken withDefaultTranscoder example in README.md #54

@akaustav

Description

@akaustav

Problem Description

In the README.md file, under the "Storage transcoders" section, the example code for withDefaultTranscoder function is possibly broken because of two problems:

  1. Missing this keyword:
    Cannot find name 'numberStorage'. Did you mean the instance member 'this.numberStorage'? ts(2663)
  2. Returned value from a setter:
    Setters cannot return a value. ts(2408)

Current Code

...
return numberStorage.get('answer');
...
return numberStorage.set('answer', value);
...

Expected Code

...
return this.numberStorage.get('answer');
...
this.numberStorage.set('answer', value);
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions