Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/jsx.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,9 @@ Instead, typescript looks for types for jsx on the special `JSX` namespace. You
Typescript expects the jsx factory function to be similar to the following:

```ts
/** @noSelf */
function createElement(type: string | Function | Class, props?: object, ...children: any[]): any;
```

- The function should have a `@noSelf` annotation or have a `this: void` parameter. See [here](the-self-parameter.md) for more info.
- `type` will be a string for intrinsic properties (tag name starts with a lowercase letter), or a function/class component.
- `props` will be the tag properties as an object/table, or `undefined`/`null`/`nil` if no properties are specified.
- The remaining parameters form the `children`, and should be collected with a rest parameter (`...`), and not as one array parameter. The type of the children will be strings for inner text, and values passed directly for JSX expressions and nested elements.
Expand Down