mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-06 10:27:22 +00:00
refactor: JS to TS for Rax Renderer
Link: https://code.aone.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/codereview/3678935 * refactor: rax-renderer * Merge remote-tracking branch 'origin/refactor/js-to-ts' into refactor/js2ts-rax-renderer * Merge remote-tracking branch 'origin/refactor/js-to-ts' into refactor/js2ts-rax-renderer * refactor: ts-nocheck * chore: ts compile error * fix: ts rootDir * fix: compile error * chore: using same tsconfig for rax component * refactor: ts compile rax-renderer && rax-provider
This commit is contained in:
parent
13989d3cc9
commit
436e396f59
@ -1,12 +1,25 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"declaration": false,
|
"lib": ["es2015", "dom"],
|
||||||
"outDir": "lib",
|
"target": "esnext",
|
||||||
|
"module": "esnext",
|
||||||
|
"moduleResolution": "node",
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"rootDir": "../"
|
"strictPropertyInitialization": false,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"importHelpers": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"outDir": "lib"
|
||||||
},
|
},
|
||||||
|
"exclude": ["test", "lib", "es", "node_modules"],
|
||||||
"include": [
|
"include": [
|
||||||
"./src/"
|
"src"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,6 +40,7 @@
|
|||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"events": "^3.0.0",
|
"events": "^3.0.0",
|
||||||
"fetch-jsonp": "^1.1.3",
|
"fetch-jsonp": "^1.1.3",
|
||||||
|
"fs-extra": "^9.0.1",
|
||||||
"intl-messageformat": "^9.3.1",
|
"intl-messageformat": "^9.3.1",
|
||||||
"jsonuri": "^2.1.2",
|
"jsonuri": "^2.1.2",
|
||||||
"keymaster": "^1.6.2",
|
"keymaster": "^1.6.2",
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
// @ts-nocheck
|
||||||
import { Component } from 'rax';
|
import { Component } from 'rax';
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
// @ts-nocheck
|
||||||
import { Component, createElement } from 'rax';
|
import { Component, createElement } from 'rax';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Debug from 'debug';
|
import Debug from 'debug';
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
// @ts-nocheck
|
||||||
import { createElement } from 'rax';
|
import { createElement } from 'rax';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Debug from 'debug';
|
import Debug from 'debug';
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
import { createElement } from 'rax';
|
import { createElement } from 'rax';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Debug from 'debug';
|
import Debug from 'debug';
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
// @ts-nocheck
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { Component, createElement } from 'rax';
|
import { Component, createElement } from 'rax';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
import { createElement } from 'rax';
|
import { createElement } from 'rax';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Debug from 'debug';
|
import Debug from 'debug';
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
import { createElement } from 'rax';
|
import { createElement } from 'rax';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Debug from 'debug';
|
import Debug from 'debug';
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
import { Component, createElement, forwardRef } from 'rax';
|
import { Component, createElement, forwardRef } from 'rax';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import AppHelper from '../utils/appHelper';
|
import AppHelper from '../utils/appHelper';
|
||||||
@ -1,7 +1,9 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
import { createElement, Component } from 'rax';
|
import { createElement, Component } from 'rax';
|
||||||
|
|
||||||
export default function (Comp) {
|
export default function (Comp) {
|
||||||
class compWrapper extends Component {
|
return class CompWrapper extends Component {
|
||||||
constructor(props, context) {
|
constructor(props, context) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
}
|
}
|
||||||
@ -12,6 +14,4 @@ export default function (Comp) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return compWrapper;
|
|
||||||
}
|
}
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
import EventEmitter from 'events';
|
import EventEmitter from 'events';
|
||||||
|
|
||||||
let instance = null;
|
let instance = null;
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
import { transformArrayToMap, isJSFunction, transformStringToFunction, clone } from './index';
|
import { transformArrayToMap, isJSFunction, transformStringToFunction, clone } from './index';
|
||||||
import { jsonp, mtop, request, get, post, bzb } from './request';
|
import { jsonp, mtop, request, get, post, bzb } from './request';
|
||||||
|
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
import Debug from 'debug';
|
import Debug from 'debug';
|
||||||
import _keymaster from 'keymaster';
|
import _keymaster from 'keymaster';
|
||||||
import { forEach as _forEach, shallowEqual as _shallowEqual } from '@ali/b3-one/lib/obj';
|
import { forEach as _forEach, shallowEqual as _shallowEqual } from '@ali/b3-one/lib/obj';
|
||||||
@ -13,9 +15,10 @@ import _debounce from 'lodash/debounce';
|
|||||||
import _serialize from 'serialize-javascript';
|
import _serialize from 'serialize-javascript';
|
||||||
import * as _jsonuri from 'jsonuri';
|
import * as _jsonuri from 'jsonuri';
|
||||||
import IntlMessageFormat from 'intl-messageformat';
|
import IntlMessageFormat from 'intl-messageformat';
|
||||||
import pkg from '../../package.json';
|
import * as fs from 'fs-extra';
|
||||||
|
|
||||||
window.sdkVersion = pkg.version;
|
const sdkVersion = fs.readJSONSync(path.join(__dirname, '..', '..', 'package.json'));
|
||||||
|
window.sdkVersion = sdkVersion;
|
||||||
|
|
||||||
export const moment = _moment;
|
export const moment = _moment;
|
||||||
moment.locale('zh-cn');
|
moment.locale('zh-cn');
|
||||||
@ -281,7 +284,7 @@ export function goldlog(gmKey, params = {}, logKey = 'other') {
|
|||||||
// vscode 黄金令箭API
|
// vscode 黄金令箭API
|
||||||
const sendIDEMessage = window.sendIDEMessage || getParentWinValue('sendIDEMessage');
|
const sendIDEMessage = window.sendIDEMessage || getParentWinValue('sendIDEMessage');
|
||||||
const goKey = serializeParams({
|
const goKey = serializeParams({
|
||||||
sdkVersion: pkg.version,
|
sdkVersion,
|
||||||
env: getEnv(),
|
env: getEnv(),
|
||||||
...params,
|
...params,
|
||||||
});
|
});
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
import 'whatwg-fetch';
|
import 'whatwg-fetch';
|
||||||
import fetchMtop from '@ali/lib-mtop';
|
import fetchMtop from '@ali/lib-mtop';
|
||||||
import fetchJsonp from 'fetch-jsonp';
|
import fetchJsonp from 'fetch-jsonp';
|
||||||
25
packages/rax-render/tsconfig.json
Normal file
25
packages/rax-render/tsconfig.json
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"lib": ["es2015", "dom"],
|
||||||
|
"target": "esnext",
|
||||||
|
"module": "esnext",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"strict": false,
|
||||||
|
"strictPropertyInitialization": false,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"importHelpers": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"outDir": "lib"
|
||||||
|
},
|
||||||
|
"exclude": ["test", "lib", "es", "node_modules"],
|
||||||
|
"include": [
|
||||||
|
"src"
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user