UNPKG

roblox-ts

Version:

<div align="center"><img width=25% src="https://i.imgur.com/yCjHmng.png"></div> <h1 align="center"><a href="https://roblox-ts.github.io/">roblox-ts</a></h1> <div align="center">A TypeScript-to-Lua Compiler for Roblox</div> <br> <div align="center"> <a hr

14 lines (13 loc) 1.31 kB
import * as ts from "ts-morph"; import { CompilerState } from "../CompilerState"; export declare const ROACT_COMPONENT_TYPE = "Roact.Component"; export declare const ROACT_PURE_COMPONENT_TYPE = "Roact.PureComponent"; export declare const ROACT_DERIVED_CLASSES_ERROR: string; export declare function inheritsFromRoact(type: ts.Type): boolean; export declare function getRoactType(node: ts.ClassDeclaration | ts.ClassExpression): "Roact.Component" | "Roact.PureComponent" | undefined; export declare function inheritsFromRoactComponent(node: ts.ClassDeclaration | ts.ClassExpression): boolean; export declare function checkRoactReserved(className: string, name: string, node: ts.Node<ts.ts.Node>): void; export declare function generateRoactSymbolProperty(state: CompilerState, roactSymbol: "Event" | "Change" | "Ref", node: ts.JsxAttributeLike, attributeCollection: Array<string>, hasExtraAttributes?: boolean): void; export declare function generateRoactElement(state: CompilerState, nameNode: ts.JsxTagNameExpression, attributes: Array<ts.JsxAttributeLike>, children: Array<ts.JsxChild>): string; export declare function compileJsxElement(state: CompilerState, node: ts.JsxElement): string; export declare function compileJsxSelfClosingElement(state: CompilerState, node: ts.JsxSelfClosingElement): string;