Skip to content

Commit d0dd124

Browse files
authored
Fix outdated jsx factory function needing @noself (#99)
1 parent d37a955 commit d0dd124

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

docs/jsx.md

-2
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,9 @@ Instead, typescript looks for types for jsx on the special `JSX` namespace. You
117117
Typescript expects the jsx factory function to be similar to the following:
118118

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

124-
- The function should have a `@noSelf` annotation or have a `this: void` parameter. See [here](the-self-parameter.md) for more info.
125123
- `type` will be a string for intrinsic properties (tag name starts with a lowercase letter), or a function/class component.
126124
- `props` will be the tag properties as an object/table, or `undefined`/`null`/`nil` if no properties are specified.
127125
- 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.

0 commit comments

Comments
 (0)