website icon indicating copy to clipboard operation
website copied to clipboard

Typescript docs is missing single file component state definition

Open erdebaru opened this issue 2 years ago • 0 comments

Hey, just noticed that there is no docs relating to state definition for single file components like below

class {
  declare state: { x: number, y: number };
  onCreate() {
    this.state = { x: 0, y: 0 }
  }
}

<div>${state.x + state.y}</div>

erdebaru avatar Jul 01 '23 04:07 erdebaru