source: imaps-frontend/node_modules/eslint-plugin-react/lib/util/jsx.d.ts

main
Last change on this file was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/**
2 * Checks if a node represents a DOM element according to React.
3 * @param {object} node - JSXOpeningElement to check.
4 * @returns {boolean} Whether or not the node corresponds to a DOM element.
5 */
6export function isDOMComponent(node: object): boolean;
7/**
8 * Test whether a JSXElement is a fragment
9 * @param {JSXElement} node
10 * @param {string} reactPragma
11 * @param {string} fragmentPragma
12 * @returns {boolean}
13 */
14export function isFragment(node: JSXElement, reactPragma: string, fragmentPragma: string): boolean;
15/**
16 * Checks if a node represents a JSX element or fragment.
17 * @param {object} node - node to check.
18 * @returns {boolean} Whether or not the node if a JSX element or fragment.
19 */
20export function isJSX(node: object): boolean;
21/**
22 * Check if node is like `key={...}` as in `<Foo key={...} />`
23 * @param {ASTNode} node
24 * @returns {boolean}
25 */
26export function isJSXAttributeKey(node: ASTNode): boolean;
27/**
28 * Check if value has only whitespaces
29 * @param {unknown} value
30 * @returns {boolean}
31 */
32export function isWhiteSpaces(value: unknown): boolean;
33/**
34 * Check if the node is returning JSX or null
35 *
36 * @param {Context} context The context of `ASTNode`.
37 * @param {ASTNode} ASTnode The AST node being checked
38 * @param {boolean} [strict] If true, in a ternary condition the node must return JSX in both cases
39 * @param {boolean} [ignoreNull] If true, null return values will be ignored
40 * @returns {boolean} True if the node is returning JSX or null, false if not
41 */
42export function isReturningJSX(context: Context, ASTnode: ASTNode, strict?: boolean, ignoreNull?: boolean): boolean;
43/**
44 * Check if the node is returning only null values
45 *
46 * @param {ASTNode} ASTnode The AST node being checked
47 * @param {Context} context The context of `ASTNode`.
48 * @returns {boolean} True if the node is returning only null values
49 */
50export function isReturningOnlyNull(ASTnode: ASTNode, context: Context): boolean;
51//# sourceMappingURL=jsx.d.ts.map
Note: See TracBrowser for help on using the repository browser.