You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2020/02/16 21:28:02 UTC

[incubator-echarts] branch typescript created (now 4ee8ee6)

This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a change to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git.


      at 4ee8ee6  migrate PieSeries and PieView as an example.

This branch includes the following new commits:

     new 6dc77e1  rename source code files from js to ts
     new ba1639f  make build tool support ts. And update dependencies.
     new c21d828  remove npm product from git.
     new a829cd9  ignore npm and esm product.
     new 6b991be  mark ts-nocheck temporarily to not modified files.
     new 3229e88  Migrate to TS -- Part I (some of the basic class and utils) Note: lots of the common type are put in `src/util/types.ts`.
     new 36cfe77  tweak build and eslint
     new e9a2af6  fix TS semantic error.
     new 4ee8ee6  migrate PieSeries and PieView as an example.

The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 02/09: make build tool support ts. And update dependencies.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit ba1639f01f5e12b7e5a3fc00543b8b92f9718035
Author: 100pah <su...@gmail.com>
AuthorDate: Sat Feb 15 11:23:08 2020 +0800

    make build tool support ts.
    And update dependencies.
---
 .gitignore                                         |    4 +-
 build/build.js                                     |  275 ++++-
 build/config.js                                    |  118 +-
 ...-plugin-ec-lang.js => ec-lang-rollup-plugin.js} |    0
 build/pre-publish.js                               |  342 +++++-
 ...ec-remove-dev.js => remove-dev-babel-plugin.js} |   44 +-
 ...c-remove-dev.js => remove-dev-rollup-plugin.js} |   14 +-
 ...ollup-plugin-ec-remove-dev.js => remove-dev.js} |   51 +-
 package-lock.json                                  | 1222 +++++++++++++++++++-
 package.json                                       |   20 +-
 tsconfig.json                                      |   24 +
 11 files changed, 1889 insertions(+), 225 deletions(-)

diff --git a/.gitignore b/.gitignore
index edf6813..4097609 100644
--- a/.gitignore
+++ b/.gitignore
@@ -173,7 +173,9 @@ map/tool
 map/raw
 theme/thumb
 /lib
+/esm
+pre-publish-tmp
 todo
 **/*.log
 *.sublime-workspace
-*.sublime-project
+*.sublime-project
\ No newline at end of file
diff --git a/build/build.js b/build/build.js
index bd252a2..1be3afd 100755
--- a/build/build.js
+++ b/build/build.js
@@ -21,15 +21,18 @@
 
 const fsExtra = require('fs-extra');
 const fs = require('fs');
-const {resolve} = require('path');
+const nodePath = require('path');
 const config = require('./config.js');
 const commander = require('commander');
-const {build, watch, color} = require('zrender/build/helper');
-const ecLangPlugin = require('./rollup-plugin-ec-lang');
+const chalk = require('chalk');
+const rollup = require('rollup');
+const ecLangPlugin = require('./ec-lang-rollup-plugin');
 const prePublish = require('./pre-publish');
-const recheckDEV = require('zrender/build/babel-plugin-transform-remove-dev').recheckDEV;
+const recheckDEV = require('./remove-dev').recheckDEV;
+const assert = require('assert');
 
-function run() {
+
+async function run() {
 
     /**
      * Tips for `commander`:
@@ -148,7 +151,7 @@ function run() {
         watch(config.createECharts(opt));
     }
     else if (isPrePublish) {
-        prePublish();
+        await prePublish();
     }
     else if (isRelease) {
         let configs = [];
@@ -180,21 +183,19 @@ function run() {
             config.createDataTool(true)
         );
 
-        build(configs)
-            .then(function () {
-                checkCode(configForCheck);
-                prePublish();
-            }).catch(handleBuildError);
+        await build(configs);
+
+        checkBundleCode(configForCheck);
+
+        await prePublish();
     }
     else {
         let cfg = config.createECharts(opt);
-        build([cfg])
-            .then(function () {
-                if (opt.removeDev) {
-                    checkCode(cfg);
-                }
-            })
-            .catch(handleBuildError);
+        await build([cfg]);
+
+        if (opt.removeDev) {
+            checkBundleCode(cfg);
+        }
     }
 }
 
@@ -207,18 +208,14 @@ function normalizeParams(opt) {
     }
 }
 
-function handleBuildError(err) {
-    console.log(err);
-}
-
-function checkCode(singleConfig) {
+function checkBundleCode(singleConfig) {
     // Make sure __DEV__ is eliminated.
     let code = fs.readFileSync(singleConfig.output.file, {encoding: 'utf-8'});
     if (!code) {
         throw new Error(`${singleConfig.output.file} is empty`);
     }
     recheckDEV(code);
-    console.log(color('fgGreen', 'dim')('Check code: correct.'));
+    console.log(chalk.green.dim('Check code: correct.'));
 }
 
 function validateIO(input, output) {
@@ -249,7 +246,233 @@ function validateLang(lang, output) {
  * @return {string} Absolute path.
  */
 function getPath(relativePath) {
-    return resolve(__dirname, '../', relativePath);
+    return nodePath.resolve(__dirname, '../', relativePath);
+}
+
+/**
+ * @param {Array.<Object>} configs A list of rollup configs:
+ *  See: <https://rollupjs.org/#big-list-of-options>
+ *  For example:
+ *  [
+ *      {
+ *          ...inputOptions,
+ *          output: [outputOptions],
+ *          watch: {chokidar, include, exclude}
+ *      },
+ *      ...
+ *  ]
+ */
+async function build(configs) {
+
+    ensureZRenderCode.prepare();
+
+    for (let singleConfig of configs) {
+        console.log(
+            chalk.cyan.dim('\nBundles '),
+            chalk.cyan(singleConfig.input),
+            chalk.cyan.dim('=>'),
+            chalk.cyan(singleConfig.output.file),
+            chalk.cyan.dim(' ...')
+        );
+
+        console.time('rollup build');
+        const bundle = await rollup.rollup(singleConfig);
+        console.timeEnd('rollup build');
+
+        await bundle.write(singleConfig.output);
+
+        console.log(
+            chalk.green.dim('Created '),
+            chalk.green(singleConfig.output.file),
+            chalk.green.dim(' successfully.')
+        );
+    }
+
+    ensureZRenderCode.clear();
+}
+
+/**
+ * @param {Object} singleConfig A single rollup config:
+ *  See: <https://rollupjs.org/#big-list-of-options>
+ *  For example:
+ *  {
+ *      ...inputOptions,
+ *      output: [outputOptions],
+ *      watch: {chokidar, include, exclude}
+ *  }
+ */
+function watch(singleConfig) {
+
+    // FIXME:TS call `ensureZRenderCode`
+    let watcher = rollup.watch(singleConfig);
+
+    watcher.on('event', function (event) {
+        // event.code can be one of:
+        //   START        — the watcher is (re)starting
+        //   BUNDLE_START — building an individual bundle
+        //   BUNDLE_END   — finished building a bundle
+        //   END          — finished building all bundles
+        //   ERROR        — encountered an error while bundling
+        //   FATAL        — encountered an unrecoverable error
+        if (event.code !== 'START' && event.code !== 'END') {
+            console.log(
+                chalk.blue('[' + getTimeString() + ']'),
+                chalk.blue.dim('build'),
+                event.code.replace(/_/g, ' ').toLowerCase()
+            );
+        }
+        if (event.code === 'ERROR' || event.code === 'FATAL') {
+            printCodeError(event.error);
+        }
+        if (event.code === 'BUNDLE_END') {
+            printWatchResult(event);
+        }
+        if (event.code === 'START') {
+            ensureZRenderCode.prepare();
+        }
+        if (event.code === 'END' || event.code === 'ERROR' || event.code === 'FATAL') {
+            ensureZRenderCode.clear();
+        }
+    });
+}
+
+function printWatchResult(event) {
+    console.log(
+        chalk.green.dim('Created'),
+        chalk.green(event.output.join(', ')),
+        chalk.green.dim('in'),
+        chalk.green(event.duration),
+        chalk.green.dim('ms.')
+    );
+}
+
+function printCodeError(error) {
+    console.log('\n' + error.code);
+    if (error.code === 'PARSE_ERROR') {
+        console.log(
+            'line',
+            chalk.cyan(error.loc.line),
+            'column',
+            chalk.cyan(error.loc.column),
+            'in',
+            chalk.cyan(error.loc.file)
+        );
+    }
+    if (error.frame) {
+        console.log('\n' + chalk.red(error.frame));
+    }
+    console.log(chalk.red.dim('\n' + error.stack));
+}
+
+function getTimeString() {
+    return (new Date()).toLocaleString();
+}
+
+
+// Symbol link do not work currently. So have to copy code manually.
+// See: https://github.com/ezolenko/rollup-plugin-typescript2/issues/188
+var ensureZRenderCode = (function () {
+
+    const nodeModulesZr = getPath('./node_modules/zrender');
+    // const nodeModulesZrDirTmp = getPath('./node_modules/zrender-dir-tmp');
+    const nodeModulesZrSymlinkTmp = getPath('./node_modules/zrender-symlink-tmp');
+    const nodeModulesZrSrcDir = getPath('./node_modules/zrender/src');
+    const zrSrcDir = getPath('../zrender/src')
+
+    let stats = 'cleared';
+
+    function doClear() {
+        if (!fs.existsSync(nodeModulesZrSymlinkTmp)
+            || !fs.lstatSync(nodeModulesZrSymlinkTmp).isSymbolicLink()
+        ) {
+            return;
+        }
+
+        if (fs.existsSync(nodeModulesZr)
+            && fs.lstatSync(nodeModulesZr).isDirectory()
+        ) {
+            console.log(chalk.blue(`rm -rf dir: ${nodeModulesZr}`));
+            // ensure save.
+            assert(nodeModulesZr.includes('node_modules') && nodeModulesZr.includes('zrender'));
+            fsExtra.removeSync(nodeModulesZr);
+        }
+
+        // recover the symbollink so that vs code can continue to visit the zrender source code.
+        console.log(chalk.blue(`mv symbol link: ${nodeModulesZrSymlinkTmp} => ${nodeModulesZr}`));
+        fs.renameSync(nodeModulesZrSymlinkTmp, nodeModulesZr);
+    }
+
+    return {
+        prepare: function () {
+            // Calling guard
+            assert(stats === 'cleared');
+            stats = 'prepared';
+
+            console.time('ensure zr code cost');
+            // In case that the last build terminated manually.
+            doClear();
+
+            if (!fs.existsSync(nodeModulesZr)
+                || !fs.lstatSync(nodeModulesZr).isSymbolicLink()
+            ) {
+                return;
+            }
+
+            if (!fs.existsSync(zrSrcDir)
+                || !fs.lstatSync(zrSrcDir).isDirectory()
+            ) {
+                throw new Error(`${zrSrcDir} does not exist.`);
+            }
+
+            console.log(chalk.blue(`mv symbol link: ${nodeModulesZr} => ${nodeModulesZrSymlinkTmp}`));
+            fs.renameSync(nodeModulesZr, nodeModulesZrSymlinkTmp);
+
+            fsExtra.ensureDirSync(nodeModulesZr);
+            fsExtra.copySync(zrSrcDir, nodeModulesZrSrcDir);
+            console.log(chalk.blue(`copied: ${nodeModulesZrSrcDir} => ${zrSrcDir}`));
+
+            console.timeEnd('ensure zr code cost');
+        },
+
+        clear: function () {
+            // Calling guard
+            assert(stats === 'prepared');
+            stats = 'cleared';
+
+            doClear();
+        }
+    }
+})();
+
+
+async function main() {
+    try {
+        await run();
+    }
+    catch (err) {
+
+        ensureZRenderCode.clear();
+
+        console.log(chalk.red('BUILD ERROR!'));
+
+        // rollup parse error.
+        if (err) {
+            if (err.loc) {
+                console.warn(chalk.red(`${err.loc.file} (${err.loc.line}:${err.loc.column})`));
+                console.warn(chalk.red(err.message));
+            }
+            if (err.frame) {
+                console.warn(chalk.red(err.frame));
+            }
+            console.log(chalk.red(err ? err.stack : err));
+
+            err.id != null && console.warn(chalk.red(`id: ${err.id}`));
+            err.hook != null && console.warn(chalk.red(`hook: ${err.hook}`));
+            err.code != null && console.warn(chalk.red(`code: ${err.code}`));
+            err.plugin != null && console.warn(chalk.red(`plugin: ${err.plugin}`));
+        }
+        // console.log(err);
+    }
 }
 
-run();
+main();
diff --git a/build/config.js b/build/config.js
index 04f6b3f..8cd69bd 100644
--- a/build/config.js
+++ b/build/config.js
@@ -17,19 +17,37 @@
 * under the License.
 */
 
-const nodeResolvePlugin = require('rollup-plugin-node-resolve');
+const assert = require('assert');
+// const nodeResolvePlugin = require('rollup-plugin-node-resolve');
 const uglifyPlugin = require('rollup-plugin-uglify');
-const ecRemoveDevPlugin = require('./rollup-plugin-ec-remove-dev');
-const ecLangPlugin = require('./rollup-plugin-ec-lang');
-const {resolve} = require('path');
+const ecRemoveDevPlugin = require('./remove-dev-rollup-plugin');
+const ecLangPlugin = require('./ec-lang-rollup-plugin');
+const nodePath = require('path');
 const preamble = require('./preamble');
+const ecDir = nodePath.resolve(__dirname, '..');
+const typescriptPlugin = require('rollup-plugin-typescript2');
 
-function getPathBasedOnECharts(path) {
-    return resolve(__dirname, '../', path);
-}
-
-function getPlugins({min, lang, sourcemap, removeDev, addBundleVersion}) {
-    let plugins = [];
+function preparePlugins({min, lang, sourcemap, removeDev, addBundleVersion}, {include, exclude}) {
+    assert(include);
+    let plugins = [
+        // nodeResolvePlugin(),
+        typescriptPlugin({
+            tsconfig: nodePath.resolve(ecDir, 'tsconfig.json'),
+            tsconfigOverride: {
+                // See: https://www.typescriptlang.org/docs/handbook/compiler-options.html
+                compilerOptions: {
+                    // By default: target === "ES3" or "ES5" ? "CommonJS" : "ES6".
+                    // But rollup don't use CommonJS.
+                    module: 'ES2015',
+                    sourceMap: !!sourcemap,
+                    // Use the esm d.ts
+                    declaration: false
+                },
+                include: include,
+                exclude: exclude || []
+            }
+        })
+    ];
 
     removeDev && plugins.push(
         ecRemoveDevPlugin({sourcemap})
@@ -39,9 +57,9 @@ function getPlugins({min, lang, sourcemap, removeDev, addBundleVersion}) {
         ecLangPlugin({lang})
     );
 
-    plugins.push(
-        nodeResolvePlugin()
-    );
+    // plugins.push(
+    //     nodeResolvePlugin()
+    // );
 
     addBundleVersion && plugins.push({
         outro: function () {
@@ -93,30 +111,57 @@ exports.createECharts = function (opt = {}) {
 
     if (input != null || output != null) {
         // Based on process.cwd();
-        input = resolve(input);
-        output = resolve(output);
+        input = nodePath.resolve(input);
+        output = nodePath.resolve(output);
     }
     else {
-        input = getPathBasedOnECharts(`./echarts${srcType}.js`);
-        output = getPathBasedOnECharts(`dist/echarts${postfixLang}${postfixType}${postfixMin}.js`);
+        input = nodePath.resolve(ecDir, `echarts${srcType}.ts`);
+        output = nodePath.resolve(ecDir, `dist/echarts${postfixLang}${postfixType}${postfixMin}.js`);
     }
 
     return {
-        plugins: getPlugins(opt),
+        plugins: preparePlugins(opt, {
+            include: [
+                nodePath.resolve(ecDir, 'src/**/*.ts'),
+                nodePath.resolve(ecDir, 'echarts*.ts'),
+                // nodePath.resolve(ecDir, '/Users/s/sushuangwork/met/act/tigall/echarts/zrender/src/**/*.ts')
+                // nodePath.resolve(ecDir, '../zrender/src/**/*.ts')
+            ]
+        }),
+
+        // external: ['zrender'],
+        // external: id => ['zrender'].includes(id),
+
         input: input,
-        legacy: true, // Support IE8-
+        // FIXME ??? ie8 support removed since rollup 0.60
+        // legacy: true, // Support IE8-
+
+        // onwarn ({loc, frame, message}) {
+        //     if (loc) {
+        //         console.warn(`${loc.file} (${loc.line}:${loc.column}) ${message}`);
+        //         if (frame) {
+        //             console.warn(frame);
+        //         }
+        //     }
+        //     else {
+        //         console.warn(message);
+        //     }
+        // },
+
         output: {
             name: 'echarts',
             format: format,
             sourcemap: sourcemap,
-            legacy: true, // Must be declared both in inputOptions and outputOptions.
+            // legacy: true, // Must be declared both in inputOptions and outputOptions.
             file: output
         },
         watch: {
             include: [
-                getPathBasedOnECharts('./src/**'),
-                getPathBasedOnECharts('./echarts*.js'),
-                getPathBasedOnECharts('../zrender/src/**')
+                nodePath.resolve(ecDir, 'src/**'),
+                nodePath.resolve(ecDir, 'echarts*.ts'),
+                // FIXME
+                // zrender code watch is broken until "ensure zr code" can be removed.
+                // nodePath.resolve(ecDir, '../zrender/src/**/*.ts')
             ]
         }
     };
@@ -127,10 +172,15 @@ exports.createECharts = function (opt = {}) {
  */
 exports.createBMap = function (min) {
     let postfix = min ? '.min' : '';
+    let input = nodePath.resolve(ecDir, `extension-src/bmap/bmap.ts`);
 
     return {
-        plugins: getPlugins({min}),
-        input: getPathBasedOnECharts(`./extension-src/bmap/bmap.js`),
+        plugins: preparePlugins({min}, {
+            include: [
+                nodePath.resolve(ecDir, 'extension-src/bmap/**/*.ts')
+            ]
+        }),
+        input: input,
         legacy: true, // Support IE8-
         external: ['echarts'],
         output: {
@@ -142,10 +192,10 @@ exports.createBMap = function (min) {
                 // For UMD `global.echarts`
                 echarts: 'echarts'
             },
-            file: getPathBasedOnECharts(`dist/extension/bmap${postfix}.js`)
+            file: nodePath.resolve(ecDir, `dist/extension/bmap${postfix}.js`)
         },
         watch: {
-            include: [getPathBasedOnECharts('./extension-src/bmap/**')]
+            include: [nodePath.resolve(ecDir, 'extension-src/bmap/**')]
         }
     };
 };
@@ -155,9 +205,15 @@ exports.createBMap = function (min) {
  */
 exports.createDataTool = function (min) {
     let postfix = min ? '.min' : '';
+    let input = nodePath.resolve(ecDir, `extension-src/dataTool/index.ts`);
+
     return {
-        plugins: getPlugins({min}),
-        input: getPathBasedOnECharts(`./extension-src/dataTool/index.js`),
+        plugins: preparePlugins({min}, {
+            include: [
+                nodePath.resolve(ecDir, 'extension-src/dataTool/**/*.ts')
+            ]
+        }),
+        input: input,
         legacy: true, // Support IE8-
         external: ['echarts'],
         output: {
@@ -169,10 +225,10 @@ exports.createDataTool = function (min) {
                 // For UMD `global.echarts`
                 echarts: 'echarts'
             },
-            file: getPathBasedOnECharts(`dist/extension/dataTool${postfix}.js`)
+            file: nodePath.resolve(ecDir, `dist/extension/dataTool${postfix}.js`)
         },
         watch: {
-            include: [getPathBasedOnECharts('./extension-src/dataTool/**')]
+            include: [nodePath.resolve(ecDir, 'extension-src/dataTool/**')]
         }
     };
 };
diff --git a/build/rollup-plugin-ec-lang.js b/build/ec-lang-rollup-plugin.js
similarity index 100%
rename from build/rollup-plugin-ec-lang.js
rename to build/ec-lang-rollup-plugin.js
diff --git a/build/pre-publish.js b/build/pre-publish.js
index 3b87cdb..1d58395 100644
--- a/build/pre-publish.js
+++ b/build/pre-publish.js
@@ -18,80 +18,312 @@
 */
 
 /**
+ * [Create CommonJS files]:
  * Compatible with prevoius folder structure: `echarts/lib` exists in `node_modules`
  * (1) Build all files to CommonJS to `echarts/lib`.
  * (2) Remove __DEV__.
  * (3) Mount `echarts/src/export.js` to `echarts/lib/echarts.js`.
+ *
+ * [Create ESModule files]:
+ * Build all files to CommonJS to `echarts/esm`.
  */
 
-const path = require('path');
+const nodePath = require('path');
+const assert = require('assert');
+const fs = require('fs');
 const fsExtra = require('fs-extra');
-const {color, travelSrcDir, prePulishSrc} = require('zrender/build/helper');
-
-const ecDir = path.resolve(__dirname, '..');
-const srcDir = path.resolve(__dirname, '../src');
-const extensionSrcDir = path.resolve(__dirname, '../extension-src');
-const extensionDir = path.resolve(__dirname, '../extension');
-const libDir = path.resolve(__dirname, '../lib');
+const chalk = require('chalk');
+const ts = require('typescript');
+const globby = require('globby');
+const removeDEVUtil = require('./remove-dev');
 const preamble = require('./preamble');
+const {promisify} = require('util');
+const readFileAsync = promisify(fs.readFile);
+const writeFileAsync = promisify(fs.writeFile);
 
+const ecDir = nodePath.resolve(__dirname, '..');
+const tmpDir = nodePath.resolve(ecDir, 'pre-publish-tmp');
 
-module.exports = function () {
+const tsConfig = readTSConfig();
 
-    fsExtra.removeSync(libDir);
-    fsExtra.ensureDirSync(libDir);
+const autoGeneratedFileAlert = `
 
-    travelSrcDir(srcDir, ({fileName, relativePath, absolutePath}) => {
-        prePulishSrc({
-            inputPath: absolutePath,
-            outputPath: path.resolve(libDir, relativePath, fileName),
-            transform: transform,
-            preamble: preamble.js
-        });
-    });
+/**
+ * AUTO-GENERATED FILE. DO NOT MODIFY.
+ */
 
-    travelSrcDir(extensionSrcDir, ({fileName, relativePath, absolutePath}) => {
-        prePulishSrc({
-            inputPath: absolutePath,
-            outputPath: path.resolve(extensionDir, relativePath, fileName),
-            transform: transform,
-            preamble: preamble.js
-        });
-    });
+`;
 
-    prePulishSrc({
-        inputPath: path.resolve(ecDir, 'echarts.all.js'),
-        outputPath: path.resolve(ecDir, 'index.js'),
-        preamble: preamble.js
-    });
-    prePulishSrc({
-        inputPath: path.resolve(ecDir, 'echarts.common.js'),
-        outputPath: path.resolve(ecDir, 'index.common.js'),
-        preamble: preamble.js
-    });
-    prePulishSrc({
-        inputPath: path.resolve(ecDir, 'echarts.simple.js'),
-        outputPath: path.resolve(ecDir, 'index.simple.js'),
-        preamble: preamble.js
+const mainSrcGlobby = {
+    patterns: [
+        'src/**/*.ts',
+        'echarts.all.ts',
+        'echarts.blank.ts',
+        'echarts.common.ts',
+        'echarts.simple.ts'
+    ],
+    cwd: ecDir
+};
+const extensionSrcGlobby = {
+    patterns: [
+        'extension-src/**/*.ts'
+    ],
+    cwd: ecDir
+};
+const extensionSrcDir = nodePath.resolve(ecDir, 'extension-src');
+const extensionCJSDir = nodePath.resolve(ecDir, 'extension');
+const extensionESMDir = nodePath.resolve(ecDir, 'extension-esm');
+
+const compileWorkList = [
+    {
+        logLabel: 'main ts -> js-cjs',
+        compilerOptionsOverride: {
+            module: 'CommonJS',
+            // `rootDir` Only use to control the output
+            // directory structure with --outDir.
+            rootDir: ecDir,
+            outDir: tmpDir
+        },
+        srcGlobby: mainSrcGlobby,
+        transformOptions: {
+            filesGlobby: {patterns: ['**/*.js'], cwd: tmpDir},
+            preamble: preamble.js,
+            removeDEV: true,
+            cjsEntryCompat: cjsEntryCompat
+        },
+        before: async function () {
+            fsExtra.removeSync(tmpDir);
+            fsExtra.removeSync(nodePath.resolve(ecDir, 'lib'));
+            fsExtra.removeSync(nodePath.resolve(ecDir, 'index.js'));
+            fsExtra.removeSync(nodePath.resolve(ecDir, 'index.blank.js'));
+            fsExtra.removeSync(nodePath.resolve(ecDir, 'index.common.js'));
+            fsExtra.removeSync(nodePath.resolve(ecDir, 'index.simple.js'));
+        },
+        after: async function () {
+            fs.renameSync(nodePath.resolve(tmpDir, 'echarts.all.js'), nodePath.resolve(ecDir, 'index.js'));
+            fs.renameSync(nodePath.resolve(tmpDir, 'echarts.blank.js'), nodePath.resolve(ecDir, 'index.blank.js'));
+            fs.renameSync(nodePath.resolve(tmpDir, 'echarts.common.js'), nodePath.resolve(ecDir, 'index.common.js'));
+            fs.renameSync(nodePath.resolve(tmpDir, 'echarts.simple.js'), nodePath.resolve(ecDir, 'index.simple.js'));
+            fs.renameSync(nodePath.resolve(tmpDir, 'src'), nodePath.resolve(ecDir, 'lib'));
+            fsExtra.removeSync(tmpDir);
+        }
+    },
+    {
+        logLabel: 'main ts -> js-esm',
+        compilerOptionsOverride: {
+            module: 'ES2015',
+            rootDir: ecDir,
+            outDir: tmpDir
+        },
+        srcGlobby: mainSrcGlobby,
+        transformOptions: {
+            filesGlobby: {patterns: ['**/*.js'], cwd: tmpDir},
+            preamble: preamble.js,
+            // esm do not remove DEV. Keep it them same with
+            // the previous state before migrate to ts.
+            removeDEV: false
+        },
+        before: async function () {
+            fsExtra.removeSync(tmpDir);
+            fsExtra.removeSync(nodePath.resolve(ecDir, 'esm'));
+            fsExtra.removeSync(nodePath.resolve(ecDir, 'echarts.all.js'));
+            fsExtra.removeSync(nodePath.resolve(ecDir, 'echarts.blank.js'));
+            fsExtra.removeSync(nodePath.resolve(ecDir, 'echarts.common.js'));
+            fsExtra.removeSync(nodePath.resolve(ecDir, 'echarts.simple.js'));
+        },
+        after: async function () {
+            fs.renameSync(nodePath.resolve(tmpDir, 'echarts.all.js'), nodePath.resolve(ecDir, 'echarts.all.js'));
+            fs.renameSync(nodePath.resolve(tmpDir, 'echarts.blank.js'), nodePath.resolve(ecDir, 'echarts.blank.js'));
+            fs.renameSync(nodePath.resolve(tmpDir, 'echarts.common.js'), nodePath.resolve(ecDir, 'echarts.common.js'));
+            fs.renameSync(nodePath.resolve(tmpDir, 'echarts.simple.js'), nodePath.resolve(ecDir, 'echarts.simple.js'));
+            fs.renameSync(nodePath.resolve(tmpDir, 'src'), nodePath.resolve(ecDir, 'esm'));
+            fsExtra.removeSync(tmpDir);
+        }
+    },
+    {
+        logLabel: 'extension ts -> js-cjs',
+        compilerOptions: {
+            module: 'CommonJS',
+            rootDir: extensionSrcDir,
+            outDir: extensionCJSDir
+        },
+        srcGlobby: extensionSrcGlobby,
+        transformOptions: {
+            filesGlobby: {patterns: ['**/*.js'], cwd: extensionCJSDir},
+            preamble: preamble.js,
+            removeDEV: true,
+            cjsEntryCompat: cjsEntryCompat
+        },
+        before: async function () {
+            fsExtra.removeSync(extensionCJSDir);
+        }
+    },
+    {
+        logLabel: 'extension ts -> js-esm',
+        compilerOptions: {
+            module: 'ES2015',
+            rootDir: extensionSrcDir,
+            outDir: extensionESMDir
+        },
+        srcGlobby: extensionSrcGlobby,
+        transformOptions: {
+            filesGlobby: {patterns: ['**/*.js'], cwd: extensionESMDir},
+            preamble: preamble.js,
+            removeDEV: false
+        },
+        before: async function () {
+            fsExtra.removeSync(extensionESMDir);
+        }
+    }
+];
+
+
+
+/**
+ * @public
+ */
+module.exports = async function () {
+
+    for (let {
+        logLabel, compilerOptionsOverride, srcGlobby,
+        transformOptions, before, after
+    } of compileWorkList) {
+
+        process.stdout.write(chalk.green.dim(`[${logLabel}]: compiling ...`));
+
+        before && await before();
+
+        let srcPathList = await readFilePaths(srcGlobby);
+
+        await tsCompile(compilerOptionsOverride, srcPathList);
+
+        process.stdout.write(chalk.green.dim(` done \n`));
+
+        process.stdout.write(chalk.green.dim(`[${logLabel}]: transforming ...`));
+
+        await transformCode(transformOptions);
+
+        after && await after();
+
+        process.stdout.write(chalk.green.dim(` done \n`));
+    }
+
+    console.log(chalk.green.bright('All done.'));
+};
+
+async function tsCompile(compilerOptionsOverride, srcPathList) {
+    assert(
+        compilerOptionsOverride
+        && compilerOptionsOverride.module
+        && compilerOptionsOverride.rootDir
+        && compilerOptionsOverride.outDir
+    );
+
+    let compilerOptions = {
+        ...tsConfig.compilerOptions,
+        ...compilerOptionsOverride,
+        sourceMap: false,
+        // Use the esm d.ts
+        declaration: false
+    };
+
+    // Must do it. becuase the value in tsconfig.json might be different from the inner representation.
+    // For example: moduleResolution: "NODE" => moduleResolution: 2
+    const {options, errors} = ts.convertCompilerOptionsFromJson(compilerOptions, ecDir);
+    if (errors.length) {
+        let errMsg = 'tsconfig parse failed: '
+            + errors.map(error => error.messageText).join('. ')
+            + '\n compilerOptions: \n' + JSON.stringify(compilerOptions, null, 4);
+        assert(false, errMsg);
+    }
+
+    // See: https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API
+    let program = ts.createProgram(srcPathList, options);
+    let emitResult = program.emit();
+
+    let allDiagnostics = ts
+        .getPreEmitDiagnostics(program)
+        .concat(emitResult.diagnostics);
+
+    allDiagnostics.forEach(diagnostic => {
+        if (diagnostic.file) {
+            let {line, character} = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
+            let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
+            console.log(chalk.red(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`));
+        }
+        else {
+            console.log(chalk.red(ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')));
+        }
     });
+    assert(!emitResult.emitSkipped, 'ts compile failed.');
+}
+
+/**
+ * @param {Object} transformOptions
+ * @param {Object} transformOptions.filesGlobby {patterns: string[], cwd: string}
+ * @param {string} [transformOptions.preamble] See './preamble.js'
+ * @param {Function} [transformOptions.cjsEntryCompat]
+ * @param {boolean} [transformOptions.removeDEV]
+ */
+async function transformCode({filesGlobby, preamble, cjsEntryCompat, removeDEV}) {
+
+    let filePaths = readFilePaths(filesGlobby);
 
-    function transform({code, inputPath, outputPath}) {
-        if (inputPath === path.resolve(ecDir, 'src/echarts.js')) {
-            // Using `echarts/echarts.blank.js` to overwrite `echarts/lib/echarts.js`
-            // for including exports API.
-            code += `
+    await Promise.all(filePaths.map(async filePath => {
+        let code = await readFileAsync(filePath, {encoding: 'utf8'});
+
+        if (removeDEV) {
+            let result = removeDEVUtil.transform(code, false);
+            code = result.code;
+            removeDEVPlugin.recheckDEV(code);
+        }
+
+        if (cjsEntryCompat) {
+            code = cjsEntryCompat({code, filePath});
+        }
+
+        code = autoGeneratedFileAlert + code;
+
+        if (preamble) {
+            code = preamble + code;
+        }
+
+        await writeFileAsync(filePath, code, {encoding: 'utf8'});
+    }));
+}
+
+function cjsEntryCompat({code, filePath}) {
+    if (filePath === nodePath.resolve(ecDir, 'src/echarts.js')) {
+        // For backward compat.
+        // Using `echarts/echarts.blank.js` to overwrite `echarts/lib/echarts.js`
+        // for including exports API.
+        code += `
 var ___ec_export = require("./export");
 (function () {
-    for (var key in ___ec_export) {
-        if (___ec_export.hasOwnProperty(key)) {
-            exports[key] = ___ec_export[key];
-        }
+for (var key in ___ec_export) {
+    if (___ec_export.hasOwnProperty(key)) {
+        exports[key] = ___ec_export[key];
     }
+}
 })();`;
-        }
-
-        return code;
     }
 
-    console.log(color('fgGreen', 'bright')('All done.'));
-};
+    return code;
+}
+
+async function readFilePaths({patterns, cwd}) {
+    assert(patterns && cwd);
+    return (
+        await globby(patterns, {cwd})
+    ).map(
+        srcPath => nodePath.resolve(cwd, srcPath)
+    );
+}
+
+function readTSConfig() {
+    // tsconfig.json may have comment string, which is invalid if
+    // using `require('tsconfig.json'). So we use a loose parser.
+    let filePath = nodePath.resolve(ecDir, 'tsconfig.json');
+    const tsConfigText = fs.readFileSync(filePath, {encoding: 'utf8'});
+    return (new Function(`return ( ${tsConfigText} )`))();
+}
diff --git a/build/rollup-plugin-ec-remove-dev.js b/build/remove-dev-babel-plugin.js
similarity index 53%
copy from build/rollup-plugin-ec-remove-dev.js
copy to build/remove-dev-babel-plugin.js
index a38ebbb..884e630 100644
--- a/build/rollup-plugin-ec-remove-dev.js
+++ b/build/remove-dev-babel-plugin.js
@@ -17,38 +17,20 @@
 * under the License.
 */
 
-/**
- * Remove the code of `if (__DEV__) { ... }`.
- *
- * Usage:
- *
- * import ecRemoveDevPlugin from 'echats/build/rollup-plugin-ec-remove-dev';
- * let rollupConfig = {
- *     plugins: [
- *         ecRemoveDevPlugin(),
- *         ...
- *     ]
- * };
- */
-
-const babel = require('@babel/core');
-const removeDEVPlugin = require('zrender/build/babel-plugin-transform-remove-dev');
-
-/**
- * @param {Object} [opt]
- * @param {Object} [opt.sourcemap]
- */
-module.exports = function ({sourcemap} = {}) {
-
+module.exports = function ({types, template}, options) {
     return {
-        transform: function (sourceCode) {
-
-            let {code, map} = babel.transform(sourceCode, {
-                plugins: [removeDEVPlugin],
-                sourceMaps: sourcemap
-            });
-
-            return {code, map};
+        visitor: {
+            IfStatement: {
+                exit(path) {
+                    removeDEV(path);
+                }
+            }
         }
     };
 };
+
+function removeDEV(path) {
+    if (path.node.test.name === '__DEV__') {
+        path.remove();
+    }
+}
diff --git a/build/rollup-plugin-ec-remove-dev.js b/build/remove-dev-rollup-plugin.js
similarity index 77%
copy from build/rollup-plugin-ec-remove-dev.js
copy to build/remove-dev-rollup-plugin.js
index a38ebbb..f07ff23 100644
--- a/build/rollup-plugin-ec-remove-dev.js
+++ b/build/remove-dev-rollup-plugin.js
@@ -31,24 +31,18 @@
  * };
  */
 
-const babel = require('@babel/core');
-const removeDEVPlugin = require('zrender/build/babel-plugin-transform-remove-dev');
+const removeDEV = require('./remove-dev');
 
 /**
  * @param {Object} [opt]
- * @param {Object} [opt.sourcemap]
+ * @param {boolean} [opt.sourcemap]
  */
 module.exports = function ({sourcemap} = {}) {
 
     return {
         transform: function (sourceCode) {
-
-            let {code, map} = babel.transform(sourceCode, {
-                plugins: [removeDEVPlugin],
-                sourceMaps: sourcemap
-            });
-
-            return {code, map};
+            return removeDEV.transform(sourceCode, sourcemap);
         }
     };
 };
+
diff --git a/build/rollup-plugin-ec-remove-dev.js b/build/remove-dev.js
similarity index 53%
rename from build/rollup-plugin-ec-remove-dev.js
rename to build/remove-dev.js
index a38ebbb..18a1937 100644
--- a/build/rollup-plugin-ec-remove-dev.js
+++ b/build/remove-dev.js
@@ -17,38 +17,33 @@
 * under the License.
 */
 
-/**
- * Remove the code of `if (__DEV__) { ... }`.
- *
- * Usage:
- *
- * import ecRemoveDevPlugin from 'echats/build/rollup-plugin-ec-remove-dev';
- * let rollupConfig = {
- *     plugins: [
- *         ecRemoveDevPlugin(),
- *         ...
- *     ]
- * };
- */
-
 const babel = require('@babel/core');
-const removeDEVPlugin = require('zrender/build/babel-plugin-transform-remove-dev');
+const removeDEVBabelPlugin = require('./remove-dev-babel-plugin');
 
 /**
- * @param {Object} [opt]
- * @param {Object} [opt.sourcemap]
+ * @param {string} sourceCode
+ * @param {boolean} sourcemap
+ * @return {Object} {code: string, map: string}
  */
-module.exports = function ({sourcemap} = {}) {
-
-    return {
-        transform: function (sourceCode) {
+module.exports.transform = function (sourceCode, sourcemap) {
+    let {code, map} = babel.transformSync(sourceCode, {
+        plugins: [removeDEVBabelPlugin],
+        sourceMaps: sourcemap
+    });
 
-            let {code, map} = babel.transform(sourceCode, {
-                plugins: [removeDEVPlugin],
-                sourceMaps: sourcemap
-            });
+    return {code, map};
+};
 
-            return {code, map};
-        }
-    };
+/**
+ * @param {string} code
+ * @throws {Error} If check failed.
+ */
+module.exports.recheckDEV = function (code) {
+    let result = code.match(/.if\s*\([^()]*__DEV__/);
+    if (result
+        && result[0].indexOf('`if') < 0
+        && result[0].indexOf('if (typeof __DEV__') < 0
+    ) {
+        throw new Error('__DEV__ is not removed.');
+    }
 };
diff --git a/package-lock.json b/package-lock.json
index f18660a..57c236e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -274,6 +274,28 @@
         "chalk": "^2.0.0",
         "esutils": "^2.0.2",
         "js-tokens": "^4.0.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "@babel/parser": {
@@ -314,11 +336,31 @@
             "js-tokens": "^3.0.0"
           }
         },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
         "js-tokens": {
           "version": "3.0.2",
           "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
           "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
           "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
         }
       }
     },
@@ -388,6 +430,28 @@
         "@jest/source-map": "^24.9.0",
         "chalk": "^2.0.1",
         "slash": "^2.0.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "@jest/core": {
@@ -424,6 +488,28 @@
         "rimraf": "^2.5.4",
         "slash": "^2.0.0",
         "strip-ansi": "^5.0.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "@jest/environment": {
@@ -478,6 +564,17 @@
         "string-length": "^2.0.0"
       },
       "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
         "glob": {
           "version": "7.1.6",
           "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
@@ -497,6 +594,15 @@
           "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
           "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
           "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
         }
       }
     },
@@ -566,11 +672,31 @@
         "write-file-atomic": "2.4.1"
       },
       "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
         "source-map": {
           "version": "0.6.1",
           "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
           "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
           "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
         }
       }
     },
@@ -585,6 +711,142 @@
         "@types/yargs": "^13.0.0"
       }
     },
+    "@microsoft/api-extractor": {
+      "version": "7.7.2",
+      "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.7.2.tgz",
+      "integrity": "sha512-W75kcjWlONyB9kQKYAfSMiG3v2JMGlgUihny8PucZqdRatcYADeQiEcX5qE5sWdNRHD/J+5INiwlooZDd82sDQ==",
+      "dev": true,
+      "requires": {
+        "@microsoft/api-extractor-model": "7.7.2",
+        "@microsoft/node-core-library": "3.18.2",
+        "@microsoft/ts-command-line": "4.3.7",
+        "@microsoft/tsdoc": "0.12.14",
+        "colors": "~1.2.1",
+        "lodash": "~4.17.15",
+        "resolve": "1.8.1",
+        "source-map": "~0.6.1",
+        "typescript": "~3.7.2"
+      },
+      "dependencies": {
+        "resolve": {
+          "version": "1.8.1",
+          "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz",
+          "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==",
+          "dev": true,
+          "requires": {
+            "path-parse": "^1.0.5"
+          }
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "@microsoft/api-extractor-model": {
+      "version": "7.7.2",
+      "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.7.2.tgz",
+      "integrity": "sha512-USwWUPV3YLS8ZOS11vFh3nzEWXC2d8OZJ6CGp0nRnCXtbqmKqAq4Jg9J5gs1PCemo7JQEbzbHGGwycC0DbRJqw==",
+      "dev": true,
+      "requires": {
+        "@microsoft/node-core-library": "3.18.2",
+        "@microsoft/tsdoc": "0.12.14"
+      }
+    },
+    "@microsoft/node-core-library": {
+      "version": "3.18.2",
+      "resolved": "https://registry.npmjs.org/@microsoft/node-core-library/-/node-core-library-3.18.2.tgz",
+      "integrity": "sha512-IRoRmLwNvrR0rTNavYlfNObz9pr4Epo8Hd//0SNptt7adOySd735ur7YBO7SzafeijHsD3/dC4PXLLwhIsMU7Q==",
+      "dev": true,
+      "requires": {
+        "@types/node": "8.10.54",
+        "colors": "~1.2.1",
+        "fs-extra": "~7.0.1",
+        "jju": "~1.4.0",
+        "semver": "~5.3.0",
+        "timsort": "~0.3.0",
+        "z-schema": "~3.18.3"
+      },
+      "dependencies": {
+        "fs-extra": {
+          "version": "7.0.1",
+          "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
+          "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "^4.1.2",
+            "jsonfile": "^4.0.0",
+            "universalify": "^0.1.0"
+          }
+        },
+        "jsonfile": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+          "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "^4.1.6"
+          }
+        },
+        "semver": {
+          "version": "5.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
+          "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
+          "dev": true
+        }
+      }
+    },
+    "@microsoft/ts-command-line": {
+      "version": "4.3.7",
+      "resolved": "https://registry.npmjs.org/@microsoft/ts-command-line/-/ts-command-line-4.3.7.tgz",
+      "integrity": "sha512-dl7j5E4Ly4vin0dFRNyDEmslpqLTeFkSvWi1Ux2OhTXbORpaRm2qivTQzUgbPSh8Mtc1LSZGekqEMNl0e0OMNw==",
+      "dev": true,
+      "requires": {
+        "@types/argparse": "1.0.33",
+        "argparse": "~1.0.9",
+        "colors": "~1.2.1"
+      }
+    },
+    "@microsoft/tsdoc": {
+      "version": "0.12.14",
+      "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.12.14.tgz",
+      "integrity": "sha512-518yewjSga1jLdiLrcmpMFlaba5P+50b0TWNFUpC+SL9Yzf0kMi57qw+bMl+rQ08cGqH1vLx4eg9YFUbZXgZ0Q==",
+      "dev": true
+    },
+    "@nodelib/fs.scandir": {
+      "version": "2.1.3",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
+      "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==",
+      "dev": true,
+      "requires": {
+        "@nodelib/fs.stat": "2.0.3",
+        "run-parallel": "^1.1.9"
+      }
+    },
+    "@nodelib/fs.stat": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
+      "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==",
+      "dev": true
+    },
+    "@nodelib/fs.walk": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz",
+      "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==",
+      "dev": true,
+      "requires": {
+        "@nodelib/fs.scandir": "2.1.3",
+        "fastq": "^1.6.0"
+      }
+    },
+    "@types/argparse": {
+      "version": "1.0.33",
+      "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.33.tgz",
+      "integrity": "sha512-VQgHxyPMTj3hIlq9SY1mctqx+Jj8kpQfoLvDlVSDNOyuYs8JYfkuY3OW/4+dO657yPmNhHpePRx0/Tje5ImNVQ==",
+      "dev": true
+    },
     "@types/babel__core": {
       "version": "7.1.3",
       "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz",
@@ -678,6 +940,24 @@
         }
       }
     },
+    "@types/color-name": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+      "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
+      "dev": true
+    },
+    "@types/eslint-visitor-keys": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
+      "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==",
+      "dev": true
+    },
+    "@types/estree": {
+      "version": "0.0.42",
+      "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.42.tgz",
+      "integrity": "sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ==",
+      "dev": true
+    },
     "@types/istanbul-lib-coverage": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz",
@@ -703,6 +983,18 @@
         "@types/istanbul-lib-report": "*"
       }
     },
+    "@types/json-schema": {
+      "version": "7.0.4",
+      "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz",
+      "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==",
+      "dev": true
+    },
+    "@types/node": {
+      "version": "8.10.54",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.54.tgz",
+      "integrity": "sha512-kaYyLYf6ICn6/isAyD4K1MyWWd5Q3JgH6bnMN089LUx88+s4W8GvK9Q6JMBVu5vsFFp7pMdSxdKmlBXwH/VFRg==",
+      "dev": true
+    },
     "@types/stack-utils": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz",
@@ -724,6 +1016,130 @@
       "integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg==",
       "dev": true
     },
+    "@typescript-eslint/eslint-plugin": {
+      "version": "2.15.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.15.0.tgz",
+      "integrity": "sha512-XRJFznI5v4K1WvIrWmjFjBAdQWaUTz4xJEdqR7+wAFsv6Q9dP3mOlE6BMNT3pdlp9eF1+bC5m5LZTmLMqffCVw==",
+      "dev": true,
+      "requires": {
+        "@typescript-eslint/experimental-utils": "2.15.0",
+        "eslint-utils": "^1.4.3",
+        "functional-red-black-tree": "^1.0.1",
+        "regexpp": "^3.0.0",
+        "tsutils": "^3.17.1"
+      },
+      "dependencies": {
+        "@typescript-eslint/experimental-utils": {
+          "version": "2.15.0",
+          "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.15.0.tgz",
+          "integrity": "sha512-Qkxu5zndY5hqlcQkmA88gfLvqQulMpX/TN91XC7OuXsRf4XG5xLGie0sbpX97o/oeccjeZYRMipIsjKk/tjDHA==",
+          "dev": true,
+          "requires": {
+            "@types/json-schema": "^7.0.3",
+            "@typescript-eslint/typescript-estree": "2.15.0",
+            "eslint-scope": "^5.0.0"
+          }
+        },
+        "@typescript-eslint/typescript-estree": {
+          "version": "2.15.0",
+          "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.15.0.tgz",
+          "integrity": "sha512-L6Pog+w3VZzXkAdyqA0VlwybF8WcwZX+mufso86CMxSdWmcizJ38lgBdpqTbc9bo92iyi0rOvmATKiwl+amjxg==",
+          "dev": true,
+          "requires": {
+            "debug": "^4.1.1",
+            "eslint-visitor-keys": "^1.1.0",
+            "glob": "^7.1.6",
+            "is-glob": "^4.0.1",
+            "lodash.unescape": "4.0.1",
+            "semver": "^6.3.0",
+            "tsutils": "^3.17.1"
+          }
+        },
+        "eslint-utils": {
+          "version": "1.4.3",
+          "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
+          "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
+          "dev": true,
+          "requires": {
+            "eslint-visitor-keys": "^1.1.0"
+          }
+        },
+        "glob": {
+          "version": "7.1.6",
+          "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+          "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+          "dev": true,
+          "requires": {
+            "fs.realpath": "^1.0.0",
+            "inflight": "^1.0.4",
+            "inherits": "2",
+            "minimatch": "^3.0.4",
+            "once": "^1.3.0",
+            "path-is-absolute": "^1.0.0"
+          }
+        },
+        "regexpp": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz",
+          "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==",
+          "dev": true
+        }
+      }
+    },
+    "@typescript-eslint/experimental-utils": {
+      "version": "2.18.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.18.0.tgz",
+      "integrity": "sha512-J6MopKPHuJYmQUkANLip7g9I82ZLe1naCbxZZW3O2sIxTiq/9YYoOELEKY7oPg0hJ0V/AQ225h2z0Yp+RRMXhw==",
+      "dev": true,
+      "requires": {
+        "@types/json-schema": "^7.0.3",
+        "@typescript-eslint/typescript-estree": "2.18.0",
+        "eslint-scope": "^5.0.0"
+      }
+    },
+    "@typescript-eslint/parser": {
+      "version": "2.18.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.18.0.tgz",
+      "integrity": "sha512-SJJPxFMEYEWkM6pGfcnjLU+NJIPo+Ko1QrCBL+i0+zV30ggLD90huEmMMhKLHBpESWy9lVEeWlQibweNQzyc+A==",
+      "dev": true,
+      "requires": {
+        "@types/eslint-visitor-keys": "^1.0.0",
+        "@typescript-eslint/experimental-utils": "2.18.0",
+        "@typescript-eslint/typescript-estree": "2.18.0",
+        "eslint-visitor-keys": "^1.1.0"
+      }
+    },
+    "@typescript-eslint/typescript-estree": {
+      "version": "2.18.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.18.0.tgz",
+      "integrity": "sha512-gVHylf7FDb8VSi2ypFuEL3hOtoC4HkZZ5dOjXvVjoyKdRrvXAOPSzpNRnKMfaUUEiSLP8UF9j9X9EDLxC0lfZg==",
+      "dev": true,
+      "requires": {
+        "debug": "^4.1.1",
+        "eslint-visitor-keys": "^1.1.0",
+        "glob": "^7.1.6",
+        "is-glob": "^4.0.1",
+        "lodash": "^4.17.15",
+        "semver": "^6.3.0",
+        "tsutils": "^3.17.1"
+      },
+      "dependencies": {
+        "glob": {
+          "version": "7.1.6",
+          "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+          "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+          "dev": true,
+          "requires": {
+            "fs.realpath": "^1.0.0",
+            "inflight": "^1.0.4",
+            "inherits": "2",
+            "minimatch": "^3.0.4",
+            "once": "^1.3.0",
+            "path-is-absolute": "^1.0.0"
+          }
+        }
+      }
+    },
     "abab": {
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.2.tgz",
@@ -942,6 +1358,12 @@
       "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
       "dev": true
     },
+    "array-union": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+      "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
+      "dev": true
+    },
     "array-unique": {
       "version": "0.3.2",
       "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
@@ -963,15 +1385,6 @@
         "safer-buffer": "~2.1.0"
       }
     },
-    "assert": {
-      "version": "1.4.1",
-      "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
-      "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
-      "dev": true,
-      "requires": {
-        "util": "0.10.3"
-      }
-    },
     "assert-plus": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
@@ -1033,6 +1446,28 @@
         "babel-preset-jest": "^24.9.0",
         "chalk": "^2.4.2",
         "slash": "^2.0.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "babel-plugin-istanbul": {
@@ -1326,14 +1761,40 @@
       "dev": true
     },
     "chalk": {
-      "version": "2.4.2",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
-      "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+      "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
       "dev": true,
       "requires": {
-        "ansi-styles": "^3.2.1",
-        "escape-string-regexp": "^1.0.5",
-        "supports-color": "^5.3.0"
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+          "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+          "dev": true,
+          "requires": {
+            "@types/color-name": "^1.1.1",
+            "color-convert": "^2.0.1"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true
+        }
       }
     },
     "chardet": {
@@ -1479,6 +1940,12 @@
       "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
       "dev": true
     },
+    "colors": {
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz",
+      "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==",
+      "dev": true
+    },
     "combined-stream": {
       "version": "1.0.8",
       "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -1494,6 +1961,12 @@
       "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
       "dev": true
     },
+    "commondir": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+      "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
+      "dev": true
+    },
     "component-bind": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
@@ -1770,6 +2243,23 @@
       "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==",
       "dev": true
     },
+    "dir-glob": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+      "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+      "dev": true,
+      "requires": {
+        "path-type": "^4.0.0"
+      },
+      "dependencies": {
+        "path-type": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+          "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+          "dev": true
+        }
+      }
+    },
     "doctrine": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@@ -2068,11 +2558,31 @@
         "v8-compile-cache": "^2.0.3"
       },
       "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
         "strip-json-comments": {
           "version": "3.0.1",
           "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
           "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==",
           "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
         }
       }
     },
@@ -2368,6 +2878,73 @@
       "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
       "dev": true
     },
+    "fast-glob": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.1.1.tgz",
+      "integrity": "sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g==",
+      "dev": true,
+      "requires": {
+        "@nodelib/fs.stat": "^2.0.2",
+        "@nodelib/fs.walk": "^1.2.3",
+        "glob-parent": "^5.1.0",
+        "merge2": "^1.3.0",
+        "micromatch": "^4.0.2"
+      },
+      "dependencies": {
+        "braces": {
+          "version": "3.0.2",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+          "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+          "dev": true,
+          "requires": {
+            "fill-range": "^7.0.1"
+          }
+        },
+        "fill-range": {
+          "version": "7.0.1",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+          "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+          "dev": true,
+          "requires": {
+            "to-regex-range": "^5.0.1"
+          }
+        },
+        "glob-parent": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz",
+          "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
+          "dev": true,
+          "requires": {
+            "is-glob": "^4.0.1"
+          }
+        },
+        "is-number": {
+          "version": "7.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+          "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+          "dev": true
+        },
+        "micromatch": {
+          "version": "4.0.2",
+          "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
+          "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
+          "dev": true,
+          "requires": {
+            "braces": "^3.0.1",
+            "picomatch": "^2.0.5"
+          }
+        },
+        "to-regex-range": {
+          "version": "5.0.1",
+          "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+          "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+          "dev": true,
+          "requires": {
+            "is-number": "^7.0.0"
+          }
+        }
+      }
+    },
     "fast-json-stable-stringify": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
@@ -2389,6 +2966,15 @@
         "punycode": "^1.3.2"
       }
     },
+    "fastq": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.0.tgz",
+      "integrity": "sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==",
+      "dev": true,
+      "requires": {
+        "reusify": "^1.0.0"
+      }
+    },
     "fb-watchman": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz",
@@ -2439,6 +3025,71 @@
         }
       }
     },
+    "find-cache-dir": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.2.0.tgz",
+      "integrity": "sha512-1JKclkYYsf1q9WIJKLZa9S9muC+08RIjzAlLrK4QcYLJMS6mk9yombQ9qf+zJ7H9LS800k0s44L4sDq9VYzqyg==",
+      "dev": true,
+      "requires": {
+        "commondir": "^1.0.1",
+        "make-dir": "^3.0.0",
+        "pkg-dir": "^4.1.0"
+      },
+      "dependencies": {
+        "find-up": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+          "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+          "dev": true,
+          "requires": {
+            "locate-path": "^5.0.0",
+            "path-exists": "^4.0.0"
+          }
+        },
+        "locate-path": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+          "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+          "dev": true,
+          "requires": {
+            "p-locate": "^4.1.0"
+          }
+        },
+        "make-dir": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz",
+          "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==",
+          "dev": true,
+          "requires": {
+            "semver": "^6.0.0"
+          }
+        },
+        "p-locate": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+          "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+          "dev": true,
+          "requires": {
+            "p-limit": "^2.2.0"
+          }
+        },
+        "path-exists": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+          "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+          "dev": true
+        },
+        "pkg-dir": {
+          "version": "4.2.0",
+          "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+          "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+          "dev": true,
+          "requires": {
+            "find-up": "^4.0.0"
+          }
+        }
+      }
+    },
     "find-up": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
@@ -3221,6 +3872,34 @@
       "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
       "dev": true
     },
+    "globby": {
+      "version": "11.0.0",
+      "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.0.tgz",
+      "integrity": "sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg==",
+      "dev": true,
+      "requires": {
+        "array-union": "^2.1.0",
+        "dir-glob": "^3.0.1",
+        "fast-glob": "^3.1.1",
+        "ignore": "^5.1.4",
+        "merge2": "^1.3.0",
+        "slash": "^3.0.0"
+      },
+      "dependencies": {
+        "ignore": {
+          "version": "5.1.4",
+          "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz",
+          "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==",
+          "dev": true
+        },
+        "slash": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+          "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+          "dev": true
+        }
+      }
+    },
     "graceful-fs": {
       "version": "4.2.2",
       "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz",
@@ -3479,6 +4158,28 @@
         "string-width": "^2.1.0",
         "strip-ansi": "^5.1.0",
         "through": "^2.3.6"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "invariant": {
@@ -3862,6 +4563,28 @@
             "prompts": "^2.0.1",
             "realpath-native": "^1.1.0",
             "yargs": "^13.3.0"
+          },
+          "dependencies": {
+            "chalk": {
+              "version": "2.4.2",
+              "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+              "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+              "dev": true,
+              "requires": {
+                "ansi-styles": "^3.2.1",
+                "escape-string-regexp": "^1.0.5",
+                "supports-color": "^5.3.0"
+              }
+            }
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
           }
         }
       }
@@ -3912,6 +4635,17 @@
         "realpath-native": "^1.1.0"
       },
       "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
         "glob": {
           "version": "7.1.6",
           "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
@@ -3925,6 +4659,15 @@
             "once": "^1.3.0",
             "path-is-absolute": "^1.0.0"
           }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
         }
       }
     },
@@ -3938,6 +4681,28 @@
         "diff-sequences": "^24.9.0",
         "jest-get-type": "^24.9.0",
         "pretty-format": "^24.9.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "jest-docblock": {
@@ -3960,6 +4725,28 @@
         "jest-get-type": "^24.9.0",
         "jest-util": "^24.9.0",
         "pretty-format": "^24.9.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "jest-environment-jsdom": {
@@ -4162,6 +4949,28 @@
         "jest-util": "^24.9.0",
         "pretty-format": "^24.9.0",
         "throat": "^4.0.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "jest-leak-detector": {
@@ -4184,6 +4993,28 @@
         "jest-diff": "^24.9.0",
         "jest-get-type": "^24.9.0",
         "pretty-format": "^24.9.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "jest-message-util": {
@@ -4200,6 +5031,28 @@
         "micromatch": "^3.1.10",
         "slash": "^2.0.0",
         "stack-utils": "^1.0.1"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "jest-mock": {
@@ -4234,6 +5087,28 @@
         "chalk": "^2.0.1",
         "jest-pnp-resolver": "^1.2.1",
         "realpath-native": "^1.1.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "jest-resolve-dependencies": {
@@ -4272,6 +5147,28 @@
         "jest-worker": "^24.6.0",
         "source-map-support": "^0.5.6",
         "throat": "^4.0.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "jest-runtime": {
@@ -4305,6 +5202,17 @@
         "yargs": "^13.3.0"
       },
       "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
         "glob": {
           "version": "7.1.6",
           "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
@@ -4318,6 +5226,15 @@
             "once": "^1.3.0",
             "path-is-absolute": "^1.0.0"
           }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
         }
       }
     },
@@ -4358,6 +5275,26 @@
             "lodash": "^4.17.13",
             "to-fast-properties": "^2.0.0"
           }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
         }
       }
     },
@@ -4381,11 +5318,31 @@
         "source-map": "^0.6.0"
       },
       "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
         "source-map": {
           "version": "0.6.1",
           "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
           "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
           "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
         }
       }
     },
@@ -4401,6 +5358,28 @@
         "jest-get-type": "^24.9.0",
         "leven": "^3.1.0",
         "pretty-format": "^24.9.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "jest-watcher": {
@@ -4416,6 +5395,28 @@
         "chalk": "^2.0.1",
         "jest-util": "^24.9.0",
         "string-length": "^2.0.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "jest-worker": {
@@ -4439,6 +5440,12 @@
         }
       }
     },
+    "jju": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz",
+      "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=",
+      "dev": true
+    },
     "js-tokens": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -4705,12 +5712,30 @@
       "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
       "dev": true
     },
+    "lodash.get": {
+      "version": "4.4.2",
+      "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
+      "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
+      "dev": true
+    },
+    "lodash.isequal": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
+      "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=",
+      "dev": true
+    },
     "lodash.sortby": {
       "version": "4.7.0",
       "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
       "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=",
       "dev": true
     },
+    "lodash.unescape": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz",
+      "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=",
+      "dev": true
+    },
     "loose-envify": {
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
@@ -4783,6 +5808,12 @@
       "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
       "dev": true
     },
+    "merge2": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz",
+      "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==",
+      "dev": true
+    },
     "micromatch": {
       "version": "3.1.10",
       "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
@@ -5471,6 +6502,12 @@
       "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
       "dev": true
     },
+    "picomatch": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz",
+      "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==",
+      "dev": true
+    },
     "pify": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
@@ -5873,6 +6910,12 @@
       "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
       "dev": true
     },
+    "reusify": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+      "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+      "dev": true
+    },
     "rimraf": {
       "version": "2.7.1",
       "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -5899,10 +6942,23 @@
       }
     },
     "rollup": {
-      "version": "0.50.0",
-      "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.50.0.tgz",
-      "integrity": "sha512-7RqCBQ9iwsOBPkjYgoIaeUij606mSkDMExP0NT7QDI3bqkHYQHrQ83uoNIXwPcQm/vP2VbsUz3kiyZZ1qPlLTQ==",
-      "dev": true
+      "version": "1.28.0",
+      "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.28.0.tgz",
+      "integrity": "sha512-v2J/DmQi9+Nf6frGqzwZRvbiuTTrqH0yzoUF4Eybf8sONT4UpLZzJYnYzW96Zm9X1+4SJmijfnFBWCzHDAXYnQ==",
+      "dev": true,
+      "requires": {
+        "@types/estree": "*",
+        "@types/node": "*",
+        "acorn": "^7.1.0"
+      },
+      "dependencies": {
+        "acorn": {
+          "version": "7.1.0",
+          "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
+          "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==",
+          "dev": true
+        }
+      }
     },
     "rollup-plugin-commonjs": {
       "version": "8.4.1",
@@ -5929,13 +6985,51 @@
         "resolve": "^1.1.6"
       }
     },
+    "rollup-plugin-typescript2": {
+      "version": "0.25.3",
+      "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.25.3.tgz",
+      "integrity": "sha512-ADkSaidKBovJmf5VBnZBZe+WzaZwofuvYdzGAKTN/J4hN7QJCFYAq7IrH9caxlru6T5qhX41PNFS1S4HqhsGQg==",
+      "dev": true,
+      "requires": {
+        "find-cache-dir": "^3.0.0",
+        "fs-extra": "8.1.0",
+        "resolve": "1.12.0",
+        "rollup-pluginutils": "2.8.1",
+        "tslib": "1.10.0"
+      },
+      "dependencies": {
+        "fs-extra": {
+          "version": "8.1.0",
+          "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
+          "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "^4.2.0",
+            "jsonfile": "^4.0.0",
+            "universalify": "^0.1.0"
+          }
+        },
+        "jsonfile": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+          "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "^4.1.6"
+          }
+        }
+      }
+    },
     "rollup-plugin-uglify": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-2.0.1.tgz",
-      "integrity": "sha1-Z7N60e/a+9g69MNrQMGJ7khmyWk=",
+      "version": "6.0.4",
+      "resolved": "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.4.tgz",
+      "integrity": "sha512-ddgqkH02klveu34TF0JqygPwZnsbhHVI6t8+hGTcYHngPkQb5MIHI0XiztXIN/d6V9j+efwHAqEL7LspSxQXGw==",
       "dev": true,
       "requires": {
-        "uglify-js": "^3.0.9"
+        "@babel/code-frame": "^7.0.0",
+        "jest-worker": "^24.0.0",
+        "serialize-javascript": "^2.1.2",
+        "uglify-js": "^3.4.9"
       }
     },
     "rollup-pluginutils": {
@@ -5970,6 +7064,12 @@
         "is-promise": "^2.1.0"
       }
     },
+    "run-parallel": {
+      "version": "1.1.9",
+      "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz",
+      "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==",
+      "dev": true
+    },
     "rxjs": {
       "version": "6.5.3",
       "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
@@ -6044,6 +7144,12 @@
       "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
       "dev": true
     },
+    "serialize-javascript": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz",
+      "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==",
+      "dev": true
+    },
     "serve-handler": {
       "version": "6.1.1",
       "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.1.tgz",
@@ -6621,12 +7727,20 @@
       "dev": true
     },
     "supports-color": {
-      "version": "5.5.0",
-      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
-      "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+      "version": "7.1.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+      "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
       "dev": true,
       "requires": {
-        "has-flag": "^3.0.0"
+        "has-flag": "^4.0.0"
+      },
+      "dependencies": {
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true
+        }
       }
     },
     "symbol-tree": {
@@ -6721,6 +7835,12 @@
       "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
       "dev": true
     },
+    "timsort": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz",
+      "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
+      "dev": true
+    },
     "tmp": {
       "version": "0.0.33",
       "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@@ -6838,6 +7958,15 @@
       "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==",
       "dev": true
     },
+    "tsutils": {
+      "version": "3.17.1",
+      "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz",
+      "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==",
+      "dev": true,
+      "requires": {
+        "tslib": "^1.8.1"
+      }
+    },
     "tunnel-agent": {
       "version": "0.6.0",
       "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -6862,6 +7991,12 @@
         "prelude-ls": "~1.1.2"
       }
     },
+    "typescript": {
+      "version": "3.7.4",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz",
+      "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==",
+      "dev": true
+    },
     "uglify-js": {
       "version": "3.6.0",
       "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz",
@@ -6898,6 +8033,12 @@
         "set-value": "^2.0.1"
       }
     },
+    "universalify": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+      "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+      "dev": true
+    },
     "unset-value": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
@@ -6973,15 +8114,6 @@
       "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
       "dev": true
     },
-    "util": {
-      "version": "0.10.3",
-      "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
-      "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
-      "dev": true,
-      "requires": {
-        "inherits": "2.0.1"
-      }
-    },
     "util-deprecate": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@@ -7020,6 +8152,12 @@
         "spdx-expression-parse": "^3.0.0"
       }
     },
+    "validator": {
+      "version": "8.2.0",
+      "resolved": "https://registry.npmjs.org/validator/-/validator-8.2.0.tgz",
+      "integrity": "sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA==",
+      "dev": true
+    },
     "verror": {
       "version": "1.10.0",
       "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
@@ -7264,6 +8402,18 @@
       "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",
       "dev": true
     },
+    "z-schema": {
+      "version": "3.18.4",
+      "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-3.18.4.tgz",
+      "integrity": "sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw==",
+      "dev": true,
+      "requires": {
+        "commander": "^2.7.1",
+        "lodash.get": "^4.0.0",
+        "lodash.isequal": "^4.0.0",
+        "validator": "^8.0.0"
+      }
+    },
     "zrender": {
       "version": "4.2.0",
       "resolved": "https://registry.npmjs.org/zrender/-/zrender-4.2.0.tgz",
diff --git a/package.json b/package.json
index 6350fa8..10ccec3 100644
--- a/package.json
+++ b/package.json
@@ -13,11 +13,11 @@
     "url": "https://github.com/apache/incubator-echarts.git"
   },
   "scripts": {
-    "release": "node build/build.js --release",
+    "prepublish": "node build/build.js --prepublish",
     "build": "node build/build.js",
-    "watch": "node build/build.js -w",
+    "watch": "node build/build.js --watch",
+    "release": "node build/build.js --release",
     "help": "node build/build.js --help",
-    "prepublish": "node build/build.js --prepublish",
     "test:visual": "node test/runTest/server.js",
     "test:visual:report": "node test/runTest/genReport.js",
     "test": "node build/build.js --prepublish && jest --config test/ut/jest.config.js",
@@ -35,8 +35,11 @@
     "@babel/helper-simple-access": "7.0.0-beta.31",
     "@babel/template": "7.0.0-beta.31",
     "@babel/types": "7.0.0-beta.31",
-    "assert": "1.4.1",
+    "@microsoft/api-extractor": "7.7.2",
+    "@typescript-eslint/eslint-plugin": "^2.15.0",
+    "@typescript-eslint/parser": "^2.18.0",
     "canvas": "^2.6.0",
+    "chalk": "^3.0.0",
     "commander": "2.11.0",
     "coordtransform": "2.0.2",
     "escodegen": "1.8.0",
@@ -45,6 +48,7 @@
     "estraverse": "4.1.1",
     "fs-extra": "0.26.7",
     "glob": "7.0.0",
+    "globby": "11.0.0",
     "jest": "^24.9.0",
     "jest-canvas-mock": "^2.2.0",
     "jsdom": "^15.2.1",
@@ -52,14 +56,16 @@
     "open": "6.4.0",
     "pixelmatch": "5.0.2",
     "pngjs": "3.4.0",
-    "rollup": "0.50.0",
+    "rollup": "1.28.0",
     "rollup-plugin-commonjs": "8.4.1",
     "rollup-plugin-node-resolve": "3.0.0",
-    "rollup-plugin-uglify": "2.0.1",
+    "rollup-plugin-typescript2": "0.25.3",
+    "rollup-plugin-uglify": "6.0.4",
     "seedrandom": "3.0.3",
     "semver": "6.3.0",
     "serve-handler": "6.1.1",
     "slugify": "1.3.4",
-    "socket.io": "2.2.0"
+    "socket.io": "2.2.0",
+    "typescript": "3.7.4"
   }
 }
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..0140bdb
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,24 @@
+{
+    "compilerOptions": {
+        "target": "ES3",
+
+        "noImplicitAny": true,
+        "noImplicitThis": true,
+        "strictBindCallApply": true,
+        "removeComments": true,
+        "sourceMap": true,
+
+        // https://github.com/ezolenko/rollup-plugin-typescript2/issues/12#issuecomment-536173372
+        "moduleResolution": "Node",
+
+        "declaration": true,
+        "declarationMap": false,
+
+        "importHelpers": true
+    },
+    "include": [
+        "src/**/*.ts",
+        "echarts.*.ts",
+        "extension-src/**/*.ts"
+    ]
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 05/09: mark ts-nocheck temporarily to not modified files.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 6b991bee10b420d3ad32d5a254713cde07e8b86a
Author: 100pah <su...@gmail.com>
AuthorDate: Sat Feb 15 11:40:25 2020 +0800

    mark ts-nocheck temporarily to not modified files.
---
 src/action/createDataSelectAction.ts              | 2 ++
 src/action/geoRoam.ts                             | 2 ++
 src/action/roamHelper.ts                          | 2 ++
 src/chart/bar.ts                                  | 2 ++
 src/chart/bar/BarSeries.ts                        | 2 ++
 src/chart/bar/BarView.ts                          | 2 ++
 src/chart/bar/BaseBarSeries.ts                    | 2 ++
 src/chart/bar/PictorialBarSeries.ts               | 2 ++
 src/chart/bar/PictorialBarView.ts                 | 2 ++
 src/chart/bar/barItemStyle.ts                     | 2 ++
 src/chart/bar/helper.ts                           | 2 ++
 src/chart/boxplot/BoxplotSeries.ts                | 2 ++
 src/chart/boxplot/BoxplotView.ts                  | 2 ++
 src/chart/boxplot/boxplotLayout.ts                | 2 ++
 src/chart/boxplot/boxplotVisual.ts                | 1 +
 src/chart/candlestick/CandlestickSeries.ts        | 2 ++
 src/chart/candlestick/CandlestickView.ts          | 2 ++
 src/chart/candlestick/candlestickLayout.ts        | 2 ++
 src/chart/candlestick/candlestickVisual.ts        | 2 ++
 src/chart/candlestick/preprocessor.ts             | 2 ++
 src/chart/chord/ChordSeries.ts                    | 2 ++
 src/chart/chord/ChordView.ts                      | 2 ++
 src/chart/chord/Ribbon.ts                         | 2 ++
 src/chart/chord/chordCircularLayout.ts            | 2 ++
 src/chart/effectScatter.ts                        | 2 ++
 src/chart/effectScatter/EffectScatterSeries.ts    | 2 ++
 src/chart/effectScatter/EffectScatterView.ts      | 2 ++
 src/chart/funnel.ts                               | 2 ++
 src/chart/funnel/FunnelSeries.ts                  | 2 ++
 src/chart/funnel/FunnelView.ts                    | 2 ++
 src/chart/funnel/funnelLayout.ts                  | 2 ++
 src/chart/gauge/GaugeSeries.ts                    | 2 ++
 src/chart/gauge/GaugeView.ts                      | 2 ++
 src/chart/gauge/PointerPath.ts                    | 2 ++
 src/chart/graph.ts                                | 2 ++
 src/chart/graph/GraphSeries.ts                    | 2 ++
 src/chart/graph/GraphView.ts                      | 2 ++
 src/chart/graph/adjustEdge.ts                     | 2 ++
 src/chart/graph/categoryFilter.ts                 | 1 +
 src/chart/graph/categoryVisual.ts                 | 1 +
 src/chart/graph/circularLayout.ts                 | 2 ++
 src/chart/graph/circularLayoutHelper.ts           | 2 ++
 src/chart/graph/createView.ts                     | 2 ++
 src/chart/graph/edgeVisual.ts                     | 1 +
 src/chart/graph/forceHelper.ts                    | 2 ++
 src/chart/graph/forceLayout.ts                    | 2 ++
 src/chart/graph/graphAction.ts                    | 2 ++
 src/chart/graph/graphHelper.ts                    | 2 ++
 src/chart/graph/simpleLayout.ts                   | 2 ++
 src/chart/graph/simpleLayoutHelper.ts             | 2 ++
 src/chart/heatmap/HeatmapLayer.ts                 | 2 ++
 src/chart/heatmap/HeatmapSeries.ts                | 2 ++
 src/chart/heatmap/HeatmapView.ts                  | 2 ++
 src/chart/helper/EffectLine.ts                    | 2 ++
 src/chart/helper/EffectPolyline.ts                | 2 ++
 src/chart/helper/EffectSymbol.ts                  | 2 ++
 src/chart/helper/LargeLineDraw.ts                 | 2 ++
 src/chart/helper/LargeSymbolDraw.ts               | 2 ++
 src/chart/helper/Line.ts                          | 2 ++
 src/chart/helper/LineDraw.ts                      | 2 ++
 src/chart/helper/LinePath.ts                      | 2 ++
 src/chart/helper/Polyline.ts                      | 2 ++
 src/chart/helper/Symbol.ts                        | 2 ++
 src/chart/helper/SymbolDraw.ts                    | 2 ++
 src/chart/helper/createClipPathFromCoordSys.ts    | 3 +++
 src/chart/helper/createGraphFromNodeEdge.ts       | 2 ++
 src/chart/helper/createGraphFromNodeMatrix.ts     | 2 ++
 src/chart/helper/createListSimply.ts              | 1 +
 src/chart/helper/focusNodeAdjacencyAction.ts      | 2 ++
 src/chart/helper/labelHelper.ts                   | 2 ++
 src/chart/helper/treeHelper.ts                    | 2 ++
 src/chart/helper/whiskerBoxCommon.ts              | 1 +
 src/chart/line.ts                                 | 2 ++
 src/chart/line/LineSeries.ts                      | 2 ++
 src/chart/line/LineView.ts                        | 2 ++
 src/chart/line/helper.ts                          | 2 ++
 src/chart/line/lineAnimationDiff.ts               | 2 ++
 src/chart/line/poly.ts                            | 2 ++
 src/chart/lines/LinesSeries.ts                    | 2 ++
 src/chart/lines/LinesView.ts                      | 2 ++
 src/chart/lines/linesLayout.ts                    | 2 ++
 src/chart/lines/linesVisual.ts                    | 2 ++
 src/chart/map/MapSeries.ts                        | 2 ++
 src/chart/map/MapView.ts                          | 2 ++
 src/chart/map/backwardCompat.ts                   | 2 ++
 src/chart/map/mapDataStatistic.ts                 | 2 ++
 src/chart/map/mapSymbolLayout.ts                  | 2 ++
 src/chart/map/mapVisual.ts                        | 1 +
 src/chart/parallel/ParallelSeries.ts              | 2 ++
 src/chart/parallel/ParallelView.ts                | 2 ++
 src/chart/parallel/parallelVisual.ts              | 1 +
 src/chart/pictorialBar.ts                         | 2 ++
 src/chart/pie.ts                                  | 2 ++
 src/chart/pie/PieSeries.ts                        | 2 ++
 src/chart/pie/PieView.ts                          | 2 ++
 src/chart/pie/labelLayout.ts                      | 2 ++
 src/chart/pie/pieLayout.ts                        | 1 +
 src/chart/radar.ts                                | 1 +
 src/chart/radar/RadarSeries.ts                    | 2 ++
 src/chart/radar/RadarView.ts                      | 2 ++
 src/chart/radar/backwardCompat.ts                 | 2 ++
 src/chart/radar/radarLayout.ts                    | 2 ++
 src/chart/sankey/SankeySeries.ts                  | 2 ++
 src/chart/sankey/SankeyView.ts                    | 2 ++
 src/chart/sankey/sankeyAction.ts                  | 2 ++
 src/chart/sankey/sankeyLayout.ts                  | 2 ++
 src/chart/sankey/sankeyVisual.ts                  | 2 ++
 src/chart/scatter.ts                              | 2 ++
 src/chart/scatter/ScatterSeries.ts                | 2 ++
 src/chart/scatter/ScatterView.ts                  | 2 ++
 src/chart/sunburst/SunburstPiece.ts               | 2 ++
 src/chart/sunburst/SunburstSeries.ts              | 2 ++
 src/chart/sunburst/SunburstView.ts                | 2 ++
 src/chart/sunburst/sunburstAction.ts              | 2 ++
 src/chart/sunburst/sunburstLayout.ts              | 1 +
 src/chart/themeRiver.ts                           | 2 ++
 src/chart/themeRiver/ThemeRiverSeries.ts          | 2 ++
 src/chart/themeRiver/ThemeRiverView.ts            | 2 ++
 src/chart/themeRiver/themeRiverLayout.ts          | 2 ++
 src/chart/themeRiver/themeRiverVisual.ts          | 2 ++
 src/chart/tree.ts                                 | 2 ++
 src/chart/tree/TreeSeries.ts                      | 2 ++
 src/chart/tree/TreeView.ts                        | 2 ++
 src/chart/tree/layoutHelper.ts                    | 2 ++
 src/chart/tree/traversalHelper.ts                 | 1 +
 src/chart/tree/treeAction.ts                      | 2 ++
 src/chart/tree/treeLayout.ts                      | 2 ++
 src/chart/treemap.ts                              | 2 ++
 src/chart/treemap/Breadcrumb.ts                   | 2 ++
 src/chart/treemap/TreemapSeries.ts                | 2 ++
 src/chart/treemap/TreemapView.ts                  | 2 ++
 src/chart/treemap/helper.ts                       | 2 ++
 src/chart/treemap/treemapAction.ts                | 2 ++
 src/chart/treemap/treemapLayout.ts                | 2 ++
 src/chart/treemap/treemapVisual.ts                | 2 ++
 src/component/axis/AngleAxisView.ts               | 2 ++
 src/component/axis/AxisBuilder.ts                 | 2 ++
 src/component/axis/AxisView.ts                    | 2 ++
 src/component/axis/CartesianAxisView.ts           | 2 ++
 src/component/axis/ParallelAxisView.ts            | 2 ++
 src/component/axis/RadiusAxisView.ts              | 2 ++
 src/component/axis/SingleAxisView.ts              | 1 +
 src/component/axis/axisSplitHelper.ts             | 2 ++
 src/component/axis/parallelAxisAction.ts          | 2 ++
 src/component/axisPointer.ts                      | 2 ++
 src/component/axisPointer/AxisPointerView.ts      | 2 ++
 src/component/axisPointer/BaseAxisPointer.ts      | 2 ++
 src/component/axisPointer/CartesianAxisPointer.ts | 2 ++
 src/component/axisPointer/PolarAxisPointer.ts     | 2 ++
 src/component/axisPointer/SingleAxisPointer.ts    | 2 ++
 src/component/axisPointer/axisTrigger.ts          | 2 ++
 src/component/axisPointer/findPointFromSeries.ts  | 2 ++
 src/component/axisPointer/globalListener.ts       | 2 ++
 src/component/axisPointer/modelHelper.ts          | 2 ++
 src/component/axisPointer/viewHelper.ts           | 2 ++
 src/component/brush/BrushModel.ts                 | 2 ++
 src/component/brush/BrushView.ts                  | 2 ++
 src/component/brush/brushAction.ts                | 2 ++
 src/component/brush/preprocessor.ts               | 2 ++
 src/component/brush/selector.ts                   | 2 ++
 src/component/brush/visualEncoding.ts             | 2 ++
 src/component/calendar/CalendarView.ts            | 2 ++
 src/component/dataZoom/AxisProxy.ts               | 2 ++
 src/component/dataZoom/DataZoomModel.ts           | 2 ++
 src/component/dataZoom/DataZoomView.ts            | 2 ++
 src/component/dataZoom/InsideZoomModel.ts         | 2 ++
 src/component/dataZoom/InsideZoomView.ts          | 2 ++
 src/component/dataZoom/SelectZoomModel.ts         | 2 ++
 src/component/dataZoom/SliderZoomModel.ts         | 2 ++
 src/component/dataZoom/SliderZoomView.ts          | 2 ++
 src/component/dataZoom/dataZoomAction.ts          | 2 ++
 src/component/dataZoom/helper.ts                  | 2 ++
 src/component/dataZoom/history.ts                 | 2 ++
 src/component/dataZoom/roams.ts                   | 2 ++
 src/component/dataZoom/typeDefaulter.ts           | 2 ++
 src/component/geo.ts                              | 2 ++
 src/component/geo/GeoView.ts                      | 2 ++
 src/component/graphic.ts                          | 2 ++
 src/component/gridSimple.ts                       | 2 ++
 src/component/helper/BrushTargetManager.ts        | 2 ++
 src/component/helper/MapDraw.ts                   | 2 ++
 src/component/helper/brushHelper.ts               | 2 ++
 src/component/helper/cursorHelper.ts              | 1 +
 src/component/helper/interactionMutex.ts          | 2 ++
 src/component/helper/listComponent.ts             | 2 ++
 src/component/helper/roamHelper.ts                | 1 +
 src/component/helper/selectableMixin.ts           | 2 ++
 src/component/helper/sliderMove.ts                | 2 ++
 src/component/legend.ts                           | 1 +
 src/component/legend/LegendModel.ts               | 2 ++
 src/component/legend/LegendView.ts                | 2 ++
 src/component/legend/ScrollableLegendModel.ts     | 2 ++
 src/component/legend/ScrollableLegendView.ts      | 2 ++
 src/component/legend/legendAction.ts              | 2 ++
 src/component/legend/legendFilter.ts              | 2 ++
 src/component/legend/scrollableLegendAction.ts    | 2 ++
 src/component/marker/MarkAreaModel.ts             | 2 ++
 src/component/marker/MarkAreaView.ts              | 2 ++
 src/component/marker/MarkLineModel.ts             | 2 ++
 src/component/marker/MarkLineView.ts              | 2 ++
 src/component/marker/MarkPointModel.ts            | 2 ++
 src/component/marker/MarkPointView.ts             | 2 ++
 src/component/marker/MarkerView.ts                | 2 ++
 src/component/marker/markerHelper.ts              | 2 ++
 src/component/parallel.ts                         | 2 ++
 src/component/polar.ts                            | 2 ++
 src/component/radar/RadarView.ts                  | 2 ++
 src/component/singleAxis.ts                       | 2 ++
 src/component/timeline/SliderTimelineView.ts      | 2 ++
 src/component/timeline/TimelineAxis.ts            | 2 ++
 src/component/timeline/TimelineModel.ts           | 2 ++
 src/component/timeline/TimelineView.ts            | 2 ++
 src/component/timeline/preprocessor.ts            | 2 ++
 src/component/timeline/timelineAction.ts          | 2 ++
 src/component/timeline/typeDefaulter.ts           | 2 ++
 src/component/title.ts                            | 2 ++
 src/component/toolbox/ToolboxModel.ts             | 2 ++
 src/component/toolbox/ToolboxView.ts              | 2 ++
 src/component/toolbox/feature/Brush.ts            | 2 ++
 src/component/toolbox/feature/DataView.ts         | 2 ++
 src/component/toolbox/feature/DataZoom.ts         | 2 ++
 src/component/toolbox/feature/MagicType.ts        | 2 ++
 src/component/toolbox/feature/Restore.ts          | 2 ++
 src/component/toolbox/feature/SaveAsImage.ts      | 2 ++
 src/component/toolbox/featureManager.ts           | 2 ++
 src/component/tooltip.ts                          | 2 ++
 src/component/tooltip/TooltipContent.ts           | 2 ++
 src/component/tooltip/TooltipModel.ts             | 2 ++
 src/component/tooltip/TooltipRichContent.ts       | 2 ++
 src/component/tooltip/TooltipView.ts              | 2 ++
 src/component/visualMap/ContinuousModel.ts        | 2 ++
 src/component/visualMap/ContinuousView.ts         | 2 ++
 src/component/visualMap/PiecewiseModel.ts         | 2 ++
 src/component/visualMap/PiecewiseView.ts          | 2 ++
 src/component/visualMap/VisualMapModel.ts         | 2 ++
 src/component/visualMap/VisualMapView.ts          | 2 ++
 src/component/visualMap/helper.ts                 | 2 ++
 src/component/visualMap/preprocessor.ts           | 2 ++
 src/component/visualMap/typeDefaulter.ts          | 2 ++
 src/component/visualMap/visualEncoding.ts         | 2 ++
 src/component/visualMap/visualMapAction.ts        | 2 ++
 src/coord/Axis.ts                                 | 2 ++
 src/coord/axisDefault.ts                          | 2 ++
 src/coord/axisHelper.ts                           | 2 ++
 src/coord/axisModelCommonMixin.ts                 | 2 ++
 src/coord/axisModelCreator.ts                     | 2 ++
 src/coord/axisTickLabelBuilder.ts                 | 2 ++
 src/coord/calendar/Calendar.ts                    | 2 ++
 src/coord/calendar/CalendarModel.ts               | 2 ++
 src/coord/calendar/prepareCustom.ts               | 2 ++
 src/coord/cartesian/Axis2D.ts                     | 2 ++
 src/coord/cartesian/AxisModel.ts                  | 2 ++
 src/coord/cartesian/Cartesian.ts                  | 2 ++
 src/coord/cartesian/Cartesian2D.ts                | 2 ++
 src/coord/cartesian/Grid.ts                       | 2 ++
 src/coord/cartesian/GridModel.ts                  | 2 ++
 src/coord/cartesian/cartesianAxisHelper.ts        | 2 ++
 src/coord/cartesian/prepareCustom.ts              | 2 ++
 src/coord/geo/Geo.ts                              | 2 ++
 src/coord/geo/GeoModel.ts                         | 2 ++
 src/coord/geo/Region.ts                           | 2 ++
 src/coord/geo/fix/diaoyuIsland.ts                 | 2 ++
 src/coord/geo/fix/geoCoord.ts                     | 2 ++
 src/coord/geo/fix/nanhai.ts                       | 2 ++
 src/coord/geo/fix/textCoord.ts                    | 2 ++
 src/coord/geo/geoCreator.ts                       | 2 ++
 src/coord/geo/geoJSONLoader.ts                    | 2 ++
 src/coord/geo/geoSVGLoader.ts                     | 2 ++
 src/coord/geo/geoSourceManager.ts                 | 2 ++
 src/coord/geo/parseGeoJson.ts                     | 2 ++
 src/coord/geo/prepareCustom.ts                    | 2 ++
 src/coord/parallel/AxisModel.ts                   | 2 ++
 src/coord/parallel/Parallel.ts                    | 2 ++
 src/coord/parallel/ParallelAxis.ts                | 2 ++
 src/coord/parallel/ParallelModel.ts               | 2 ++
 src/coord/parallel/parallelCreator.ts             | 2 ++
 src/coord/parallel/parallelPreprocessor.ts        | 2 ++
 src/coord/polar/AngleAxis.ts                      | 2 ++
 src/coord/polar/AxisModel.ts                      | 2 ++
 src/coord/polar/Polar.ts                          | 2 ++
 src/coord/polar/PolarModel.ts                     | 2 ++
 src/coord/polar/RadiusAxis.ts                     | 2 ++
 src/coord/polar/polarCreator.ts                   | 2 ++
 src/coord/polar/prepareCustom.ts                  | 2 ++
 src/coord/radar/IndicatorAxis.ts                  | 2 ++
 src/coord/radar/Radar.ts                          | 2 ++
 src/coord/radar/RadarModel.ts                     | 2 ++
 src/coord/single/AxisModel.ts                     | 2 ++
 src/coord/single/Single.ts                        | 2 ++
 src/coord/single/SingleAxis.ts                    | 2 ++
 src/coord/single/prepareCustom.ts                 | 2 ++
 src/coord/single/singleAxisHelper.ts              | 2 ++
 src/coord/single/singleCreator.ts                 | 2 ++
 src/data/Graph.ts                                 | 2 ++
 src/data/Tree.ts                                  | 2 ++
 src/data/helper/createDimensions.ts               | 2 ++
 src/data/helper/dataStackHelper.ts                | 2 ++
 src/data/helper/linkList.ts                       | 2 ++
 src/helper.ts                                     | 2 ++
 src/layout/barGrid.ts                             | 2 ++
 src/layout/barPolar.ts                            | 2 ++
 src/layout/points.ts                              | 2 ++
 src/model/mixin/areaStyle.ts                      | 2 ++
 src/model/mixin/boxLayout.ts                      | 1 +
 src/model/mixin/itemStyle.ts                      | 2 ++
 src/model/mixin/lineStyle.ts                      | 2 ++
 src/model/mixin/makeStyleMapper.ts                | 2 ++
 src/model/mixin/textStyle.ts                      | 2 ++
 src/model/referHelper.ts                          | 2 ++
 src/preprocessor/backwardCompat.ts                | 2 ++
 src/preprocessor/helper/compatStyle.ts            | 2 ++
 src/processor/dataFilter.ts                       | 2 ++
 src/processor/dataStack.ts                        | 2 ++
 src/scale/Interval.ts                             | 2 ++
 src/scale/Log.ts                                  | 2 ++
 src/scale/Ordinal.ts                              | 2 ++
 src/scale/Scale.ts                                | 2 ++
 src/scale/Time.ts                                 | 2 ++
 src/scale/helper.ts                               | 2 ++
 src/theme/dark.ts                                 | 2 ++
 src/util/KDTree.ts                                | 2 ++
 src/util/animation.ts                             | 2 ++
 src/util/layout.ts                                | 2 ++
 src/util/number.ts                                | 2 ++
 src/util/quickSelect.ts                           | 2 ++
 src/util/shape/sausage.ts                         | 2 ++
 src/util/symbol.ts                                | 2 ++
 src/visual/VisualMapping.ts                       | 2 ++
 src/visual/aria.ts                                | 2 ++
 src/visual/seriesColor.ts                         | 2 ++
 src/visual/symbol.ts                              | 2 ++
 src/visual/visualDefault.ts                       | 2 ++
 src/visual/visualSolution.ts                      | 2 ++
 333 files changed, 650 insertions(+)

diff --git a/src/action/createDataSelectAction.ts b/src/action/createDataSelectAction.ts
index a628bcc..aef0d64 100644
--- a/src/action/createDataSelectAction.ts
+++ b/src/action/createDataSelectAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 
diff --git a/src/action/geoRoam.ts b/src/action/geoRoam.ts
index 8824610..f97aa84 100644
--- a/src/action/geoRoam.ts
+++ b/src/action/geoRoam.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import {updateCenterAndZoom} from './roamHelper';
diff --git a/src/action/roamHelper.ts b/src/action/roamHelper.ts
index 3577f27..52892e4 100644
--- a/src/action/roamHelper.ts
+++ b/src/action/roamHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @param {module:echarts/coord/View} view
  * @param {Object} payload
diff --git a/src/chart/bar.ts b/src/chart/bar.ts
index db4bbef..4d8d695 100644
--- a/src/chart/bar.ts
+++ b/src/chart/bar.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import {layout, largeLayout} from '../layout/barGrid';
diff --git a/src/chart/bar/BarSeries.ts b/src/chart/bar/BarSeries.ts
index 9535a8a..c4cd150 100644
--- a/src/chart/bar/BarSeries.ts
+++ b/src/chart/bar/BarSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import BaseBarSeries from './BaseBarSeries';
 
 export default BaseBarSeries.extend({
diff --git a/src/chart/bar/BarView.ts b/src/chart/bar/BarView.ts
index 18c5e2a..23a5d64 100644
--- a/src/chart/bar/BarView.ts
+++ b/src/chart/bar/BarView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/chart/bar/BaseBarSeries.ts b/src/chart/bar/BaseBarSeries.ts
index 184a2a3..9a2ce37 100644
--- a/src/chart/bar/BaseBarSeries.ts
+++ b/src/chart/bar/BaseBarSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import SeriesModel from '../../model/Series';
 import createListFromArray from '../helper/createListFromArray';
 
diff --git a/src/chart/bar/PictorialBarSeries.ts b/src/chart/bar/PictorialBarSeries.ts
index 342dd8e..61ff4cd 100644
--- a/src/chart/bar/PictorialBarSeries.ts
+++ b/src/chart/bar/PictorialBarSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import BaseBarSeries from './BaseBarSeries';
 
 var PictorialBarSeries = BaseBarSeries.extend({
diff --git a/src/chart/bar/PictorialBarView.ts b/src/chart/bar/PictorialBarView.ts
index 0ac9a31..080d939 100644
--- a/src/chart/bar/PictorialBarView.ts
+++ b/src/chart/bar/PictorialBarView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
diff --git a/src/chart/bar/barItemStyle.ts b/src/chart/bar/barItemStyle.ts
index 5dc5ff0..7bbd247 100644
--- a/src/chart/bar/barItemStyle.ts
+++ b/src/chart/bar/barItemStyle.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import makeStyleMapper from '../../model/mixin/makeStyleMapper';
 
 var getBarItemStyle = makeStyleMapper(
diff --git a/src/chart/bar/helper.ts b/src/chart/bar/helper.ts
index 0ade927..fec4bde 100644
--- a/src/chart/bar/helper.ts
+++ b/src/chart/bar/helper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as graphic from '../../util/graphic';
 import {getDefaultLabel} from '../helper/labelHelper';
 
diff --git a/src/chart/boxplot/BoxplotSeries.ts b/src/chart/boxplot/BoxplotSeries.ts
index 934c92a..e5aa960 100644
--- a/src/chart/boxplot/BoxplotSeries.ts
+++ b/src/chart/boxplot/BoxplotSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import SeriesModel from '../../model/Series';
 import {seriesModelMixin} from '../helper/whiskerBoxCommon';
diff --git a/src/chart/boxplot/BoxplotView.ts b/src/chart/boxplot/BoxplotView.ts
index ca30985..50ff929 100644
--- a/src/chart/boxplot/BoxplotView.ts
+++ b/src/chart/boxplot/BoxplotView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import ChartView from '../../view/Chart';
 import * as graphic from '../../util/graphic';
diff --git a/src/chart/boxplot/boxplotLayout.ts b/src/chart/boxplot/boxplotLayout.ts
index ce56bb9..6d66e1b 100644
--- a/src/chart/boxplot/boxplotLayout.ts
+++ b/src/chart/boxplot/boxplotLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import {parsePercent} from '../../util/number';
 
diff --git a/src/chart/boxplot/boxplotVisual.ts b/src/chart/boxplot/boxplotVisual.ts
index f4b8f69..ac6cc50 100644
--- a/src/chart/boxplot/boxplotVisual.ts
+++ b/src/chart/boxplot/boxplotVisual.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 var borderColorQuery = ['itemStyle', 'borderColor'];
 
diff --git a/src/chart/candlestick/CandlestickSeries.ts b/src/chart/candlestick/CandlestickSeries.ts
index 4276643..d9fe6e7 100644
--- a/src/chart/candlestick/CandlestickSeries.ts
+++ b/src/chart/candlestick/CandlestickSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import SeriesModel from '../../model/Series';
 import {seriesModelMixin} from '../helper/whiskerBoxCommon';
diff --git a/src/chart/candlestick/CandlestickView.ts b/src/chart/candlestick/CandlestickView.ts
index de5f19e..7c6292a 100644
--- a/src/chart/candlestick/CandlestickView.ts
+++ b/src/chart/candlestick/CandlestickView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import ChartView from '../../view/Chart';
 import * as graphic from '../../util/graphic';
diff --git a/src/chart/candlestick/candlestickLayout.ts b/src/chart/candlestick/candlestickLayout.ts
index 9cdd3d6..43a84f6 100644
--- a/src/chart/candlestick/candlestickLayout.ts
+++ b/src/chart/candlestick/candlestickLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /* global Float32Array */
 
 import {subPixelOptimize} from '../../util/graphic';
diff --git a/src/chart/candlestick/candlestickVisual.ts b/src/chart/candlestick/candlestickVisual.ts
index 44bfd17..eb33351 100644
--- a/src/chart/candlestick/candlestickVisual.ts
+++ b/src/chart/candlestick/candlestickVisual.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import createRenderPlanner from '../helper/createRenderPlanner';
 
 var positiveBorderColorQuery = ['itemStyle', 'borderColor'];
diff --git a/src/chart/candlestick/preprocessor.ts b/src/chart/candlestick/preprocessor.ts
index e2c2f0a..142270c 100644
--- a/src/chart/candlestick/preprocessor.ts
+++ b/src/chart/candlestick/preprocessor.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 export default function (option) {
diff --git a/src/chart/chord/ChordSeries.ts b/src/chart/chord/ChordSeries.ts
index 5d8111d..83f6d86 100644
--- a/src/chart/chord/ChordSeries.ts
+++ b/src/chart/chord/ChordSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import SeriesModel from '../../model/Series';
 import createGraphFromNodeEdge from '../helper/createGraphFromNodeEdge';
 import createGraphFromNodeMatrix from '../helper/createGraphFromNodeMatrix';
diff --git a/src/chart/chord/ChordView.ts b/src/chart/chord/ChordView.ts
index 15bcd19..24091cb 100644
--- a/src/chart/chord/ChordView.ts
+++ b/src/chart/chord/ChordView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import RibbonPath from './Ribbon';
 import * as graphic from '../../util/graphic';
diff --git a/src/chart/chord/Ribbon.ts b/src/chart/chord/Ribbon.ts
index 2d8bfb9..b167835 100644
--- a/src/chart/chord/Ribbon.ts
+++ b/src/chart/chord/Ribbon.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as graphic from '../../util/graphic';
 
 var sin = Math.sin;
diff --git a/src/chart/chord/chordCircularLayout.ts b/src/chart/chord/chordCircularLayout.ts
index af16e40..01c0054 100644
--- a/src/chart/chord/chordCircularLayout.ts
+++ b/src/chart/chord/chordCircularLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import {parsePercent} from '../../util/number';
 
diff --git a/src/chart/effectScatter.ts b/src/chart/effectScatter.ts
index 31391f1..5be4e3b 100644
--- a/src/chart/effectScatter.ts
+++ b/src/chart/effectScatter.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 
 import './effectScatter/EffectScatterSeries';
diff --git a/src/chart/effectScatter/EffectScatterSeries.ts b/src/chart/effectScatter/EffectScatterSeries.ts
index 4aae804..b2cf53c 100644
--- a/src/chart/effectScatter/EffectScatterSeries.ts
+++ b/src/chart/effectScatter/EffectScatterSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import createListFromArray from '../helper/createListFromArray';
 import SeriesModel from '../../model/Series';
 
diff --git a/src/chart/effectScatter/EffectScatterView.ts b/src/chart/effectScatter/EffectScatterView.ts
index 6812197..bdeccf8 100644
--- a/src/chart/effectScatter/EffectScatterView.ts
+++ b/src/chart/effectScatter/EffectScatterView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import SymbolDraw from '../helper/SymbolDraw';
 import EffectSymbol from '../helper/EffectSymbol';
diff --git a/src/chart/funnel.ts b/src/chart/funnel.ts
index 154b40b..0699684 100644
--- a/src/chart/funnel.ts
+++ b/src/chart/funnel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 
 import './funnel/FunnelSeries';
diff --git a/src/chart/funnel/FunnelSeries.ts b/src/chart/funnel/FunnelSeries.ts
index d57de1f..07710a0 100644
--- a/src/chart/funnel/FunnelSeries.ts
+++ b/src/chart/funnel/FunnelSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import createListSimply from '../helper/createListSimply';
diff --git a/src/chart/funnel/FunnelView.ts b/src/chart/funnel/FunnelView.ts
index bb9a078..80cae48 100644
--- a/src/chart/funnel/FunnelView.ts
+++ b/src/chart/funnel/FunnelView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as graphic from '../../util/graphic';
 import * as zrUtil from 'zrender/src/core/util';
 import ChartView from '../../view/Chart';
diff --git a/src/chart/funnel/funnelLayout.ts b/src/chart/funnel/funnelLayout.ts
index 9922a6b..89b0992 100644
--- a/src/chart/funnel/funnelLayout.ts
+++ b/src/chart/funnel/funnelLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as layout from '../../util/layout';
 import {parsePercent, linearMap} from '../../util/number';
 
diff --git a/src/chart/gauge/GaugeSeries.ts b/src/chart/gauge/GaugeSeries.ts
index 1b8f104..1638dc5 100644
--- a/src/chart/gauge/GaugeSeries.ts
+++ b/src/chart/gauge/GaugeSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import createListSimply from '../helper/createListSimply';
 import SeriesModel from '../../model/Series';
 
diff --git a/src/chart/gauge/GaugeView.ts b/src/chart/gauge/GaugeView.ts
index 0ccd6dd..aa520dc 100644
--- a/src/chart/gauge/GaugeView.ts
+++ b/src/chart/gauge/GaugeView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import PointerPath from './PointerPath';
 import * as graphic from '../../util/graphic';
 import ChartView from '../../view/Chart';
diff --git a/src/chart/gauge/PointerPath.ts b/src/chart/gauge/PointerPath.ts
index 6ac57e8..c541577 100644
--- a/src/chart/gauge/PointerPath.ts
+++ b/src/chart/gauge/PointerPath.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import Path from 'zrender/src/graphic/Path';
 
 export default Path.extend({
diff --git a/src/chart/graph.ts b/src/chart/graph.ts
index 6bcf09f..9a390e9 100644
--- a/src/chart/graph.ts
+++ b/src/chart/graph.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 
 import './graph/GraphSeries';
diff --git a/src/chart/graph/GraphSeries.ts b/src/chart/graph/GraphSeries.ts
index 47d9fd9..a0b5334 100644
--- a/src/chart/graph/GraphSeries.ts
+++ b/src/chart/graph/GraphSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import List from '../../data/List';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/chart/graph/GraphView.ts b/src/chart/graph/GraphView.ts
index 8ad9aef..da2e325 100644
--- a/src/chart/graph/GraphView.ts
+++ b/src/chart/graph/GraphView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import SymbolDraw from '../helper/SymbolDraw';
diff --git a/src/chart/graph/adjustEdge.ts b/src/chart/graph/adjustEdge.ts
index dc40767..8c0588d 100644
--- a/src/chart/graph/adjustEdge.ts
+++ b/src/chart/graph/adjustEdge.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as curveTool from 'zrender/src/core/curve';
 import * as vec2 from 'zrender/src/core/vector';
 import {getSymbolSize} from './graphHelper';
diff --git a/src/chart/graph/categoryFilter.ts b/src/chart/graph/categoryFilter.ts
index 829ee01..836a34d 100644
--- a/src/chart/graph/categoryFilter.ts
+++ b/src/chart/graph/categoryFilter.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 export default function (ecModel) {
     var legendModels = ecModel.findComponents({
diff --git a/src/chart/graph/categoryVisual.ts b/src/chart/graph/categoryVisual.ts
index 00c54f9..31bec52 100644
--- a/src/chart/graph/categoryVisual.ts
+++ b/src/chart/graph/categoryVisual.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 export default function (ecModel) {
 
diff --git a/src/chart/graph/circularLayout.ts b/src/chart/graph/circularLayout.ts
index 9637fbf..5434728 100644
--- a/src/chart/graph/circularLayout.ts
+++ b/src/chart/graph/circularLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {circularLayout} from './circularLayoutHelper';
 
 export default function (ecModel) {
diff --git a/src/chart/graph/circularLayoutHelper.ts b/src/chart/graph/circularLayoutHelper.ts
index 3552c62..8d72c96 100644
--- a/src/chart/graph/circularLayoutHelper.ts
+++ b/src/chart/graph/circularLayoutHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as vec2 from 'zrender/src/core/vector';
 import {getSymbolSize, getNodeGlobalScale} from './graphHelper';
 
diff --git a/src/chart/graph/createView.ts b/src/chart/graph/createView.ts
index fc65a03..a251a95 100644
--- a/src/chart/graph/createView.ts
+++ b/src/chart/graph/createView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // FIXME Where to create the simple view coordinate system
 import View from '../../coord/View';
 import {getLayoutRect} from '../../util/layout';
diff --git a/src/chart/graph/edgeVisual.ts b/src/chart/graph/edgeVisual.ts
index a148cbb..d2d430c 100644
--- a/src/chart/graph/edgeVisual.ts
+++ b/src/chart/graph/edgeVisual.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 function normalize(a) {
     if (!(a instanceof Array)) {
diff --git a/src/chart/graph/forceHelper.ts b/src/chart/graph/forceHelper.ts
index a50fa58..96d3b00 100644
--- a/src/chart/graph/forceHelper.ts
+++ b/src/chart/graph/forceHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /*
 * A third-party license is embeded for some of the code in this file:
 * Some formulas were originally copied from "d3.js" with some
diff --git a/src/chart/graph/forceLayout.ts b/src/chart/graph/forceLayout.ts
index e61555a..30edaa6 100644
--- a/src/chart/graph/forceLayout.ts
+++ b/src/chart/graph/forceLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {forceLayout} from './forceHelper';
 import {simpleLayout} from './simpleLayoutHelper';
 import {circularLayout} from './circularLayoutHelper';
diff --git a/src/chart/graph/graphAction.ts b/src/chart/graph/graphAction.ts
index 6f7bc13..5d2a129 100644
--- a/src/chart/graph/graphAction.ts
+++ b/src/chart/graph/graphAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import {updateCenterAndZoom} from '../../action/roamHelper';
 import '../helper/focusNodeAdjacencyAction';
diff --git a/src/chart/graph/graphHelper.ts b/src/chart/graph/graphHelper.ts
index fc87b9e..47ed84a 100644
--- a/src/chart/graph/graphHelper.ts
+++ b/src/chart/graph/graphHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 export function getNodeGlobalScale(seriesModel) {
     var coordSys = seriesModel.coordinateSystem;
     if (coordSys.type !== 'view') {
diff --git a/src/chart/graph/simpleLayout.ts b/src/chart/graph/simpleLayout.ts
index 1cc70bd..b596a38 100644
--- a/src/chart/graph/simpleLayout.ts
+++ b/src/chart/graph/simpleLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {each} from 'zrender/src/core/util';
 import {simpleLayout, simpleLayoutEdge} from './simpleLayoutHelper';
 
diff --git a/src/chart/graph/simpleLayoutHelper.ts b/src/chart/graph/simpleLayoutHelper.ts
index 83d026c..d56c665 100644
--- a/src/chart/graph/simpleLayoutHelper.ts
+++ b/src/chart/graph/simpleLayoutHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as vec2 from 'zrender/src/core/vector';
 
 export function simpleLayout(seriesModel) {
diff --git a/src/chart/heatmap/HeatmapLayer.ts b/src/chart/heatmap/HeatmapLayer.ts
index 41ab17b..b262575 100644
--- a/src/chart/heatmap/HeatmapLayer.ts
+++ b/src/chart/heatmap/HeatmapLayer.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /* global Uint8ClampedArray */
 
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/chart/heatmap/HeatmapSeries.ts b/src/chart/heatmap/HeatmapSeries.ts
index 35c80fb..6713f51 100644
--- a/src/chart/heatmap/HeatmapSeries.ts
+++ b/src/chart/heatmap/HeatmapSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import SeriesModel from '../../model/Series';
 import createListFromArray from '../helper/createListFromArray';
 import CoordinateSystem from '../../CoordinateSystem';
diff --git a/src/chart/heatmap/HeatmapView.ts b/src/chart/heatmap/HeatmapView.ts
index be99ac4..9cb5ec6 100644
--- a/src/chart/heatmap/HeatmapView.ts
+++ b/src/chart/heatmap/HeatmapView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as echarts from '../../echarts';
 import * as graphic from '../../util/graphic';
diff --git a/src/chart/helper/EffectLine.ts b/src/chart/helper/EffectLine.ts
index 7a6c19c..7c505ba 100644
--- a/src/chart/helper/EffectLine.ts
+++ b/src/chart/helper/EffectLine.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Provide effect for line
  * @module echarts/chart/helper/EffectLine
diff --git a/src/chart/helper/EffectPolyline.ts b/src/chart/helper/EffectPolyline.ts
index fcadfab..2e71676 100644
--- a/src/chart/helper/EffectPolyline.ts
+++ b/src/chart/helper/EffectPolyline.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Provide effect for line
  * @module echarts/chart/helper/EffectLine
diff --git a/src/chart/helper/EffectSymbol.ts b/src/chart/helper/EffectSymbol.ts
index 1f3a5e2..aa65341 100644
--- a/src/chart/helper/EffectSymbol.ts
+++ b/src/chart/helper/EffectSymbol.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Symbol with ripple effect
  * @module echarts/chart/helper/EffectSymbol
diff --git a/src/chart/helper/LargeLineDraw.ts b/src/chart/helper/LargeLineDraw.ts
index 94f3e95..ee31e37 100644
--- a/src/chart/helper/LargeLineDraw.ts
+++ b/src/chart/helper/LargeLineDraw.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // TODO Batch by color
 
 import * as graphic from '../../util/graphic';
diff --git a/src/chart/helper/LargeSymbolDraw.ts b/src/chart/helper/LargeSymbolDraw.ts
index 8db5332..9dfc0c2 100644
--- a/src/chart/helper/LargeSymbolDraw.ts
+++ b/src/chart/helper/LargeSymbolDraw.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /* global Float32Array */
 
 // TODO Batch by color
diff --git a/src/chart/helper/Line.ts b/src/chart/helper/Line.ts
index f2b2d8e..07a4bb3 100644
--- a/src/chart/helper/Line.ts
+++ b/src/chart/helper/Line.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @module echarts/chart/helper/Line
  */
diff --git a/src/chart/helper/LineDraw.ts b/src/chart/helper/LineDraw.ts
index 707957a..378badf 100644
--- a/src/chart/helper/LineDraw.ts
+++ b/src/chart/helper/LineDraw.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @module echarts/chart/helper/LineDraw
  */
diff --git a/src/chart/helper/LinePath.ts b/src/chart/helper/LinePath.ts
index 7256973..b1acce6 100644
--- a/src/chart/helper/LinePath.ts
+++ b/src/chart/helper/LinePath.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Line path for bezier and straight line draw
  */
diff --git a/src/chart/helper/Polyline.ts b/src/chart/helper/Polyline.ts
index eb897e4..82d89b2 100644
--- a/src/chart/helper/Polyline.ts
+++ b/src/chart/helper/Polyline.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @module echarts/chart/helper/Line
  */
diff --git a/src/chart/helper/Symbol.ts b/src/chart/helper/Symbol.ts
index a1a0a94..0929933 100644
--- a/src/chart/helper/Symbol.ts
+++ b/src/chart/helper/Symbol.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @module echarts/chart/helper/Symbol
  */
diff --git a/src/chart/helper/SymbolDraw.ts b/src/chart/helper/SymbolDraw.ts
index 6d87295..dff8124 100644
--- a/src/chart/helper/SymbolDraw.ts
+++ b/src/chart/helper/SymbolDraw.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @module echarts/chart/helper/SymbolDraw
  */
diff --git a/src/chart/helper/createClipPathFromCoordSys.ts b/src/chart/helper/createClipPathFromCoordSys.ts
index feabeb2..82121b0 100644
--- a/src/chart/helper/createClipPathFromCoordSys.ts
+++ b/src/chart/helper/createClipPathFromCoordSys.ts
@@ -16,6 +16,9 @@
 * specific language governing permissions and limitations
 * under the License.
 */
+
+// @ts-nocheck
+
 import * as graphic from '../../util/graphic';
 import {round} from '../../util/number';
 
diff --git a/src/chart/helper/createGraphFromNodeEdge.ts b/src/chart/helper/createGraphFromNodeEdge.ts
index e78087e..ce656cc 100644
--- a/src/chart/helper/createGraphFromNodeEdge.ts
+++ b/src/chart/helper/createGraphFromNodeEdge.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import List from '../../data/List';
 import Graph from '../../data/Graph';
diff --git a/src/chart/helper/createGraphFromNodeMatrix.ts b/src/chart/helper/createGraphFromNodeMatrix.ts
index 0ef96c6..43b24ac 100644
--- a/src/chart/helper/createGraphFromNodeMatrix.ts
+++ b/src/chart/helper/createGraphFromNodeMatrix.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import List from '../../data/List';
 import Graph from '../../data/Graph';
diff --git a/src/chart/helper/createListSimply.ts b/src/chart/helper/createListSimply.ts
index ce7ce05..c3f7be2 100644
--- a/src/chart/helper/createListSimply.ts
+++ b/src/chart/helper/createListSimply.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 import createDimensions from '../../data/helper/createDimensions';
 import List from '../../data/List';
diff --git a/src/chart/helper/focusNodeAdjacencyAction.ts b/src/chart/helper/focusNodeAdjacencyAction.ts
index 598950c..2694fe3 100644
--- a/src/chart/helper/focusNodeAdjacencyAction.ts
+++ b/src/chart/helper/focusNodeAdjacencyAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 
 /**
diff --git a/src/chart/helper/labelHelper.ts b/src/chart/helper/labelHelper.ts
index ef08c78..b121d60 100644
--- a/src/chart/helper/labelHelper.ts
+++ b/src/chart/helper/labelHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {retrieveRawValue} from '../../data/helper/dataProvider';
 
 /**
diff --git a/src/chart/helper/treeHelper.ts b/src/chart/helper/treeHelper.ts
index 0abc1c4..a92f447 100644
--- a/src/chart/helper/treeHelper.ts
+++ b/src/chart/helper/treeHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 export function retrieveTargetInfo(payload, validPayloadTypes, seriesModel) {
diff --git a/src/chart/helper/whiskerBoxCommon.ts b/src/chart/helper/whiskerBoxCommon.ts
index 7a9a42a..8997928 100644
--- a/src/chart/helper/whiskerBoxCommon.ts
+++ b/src/chart/helper/whiskerBoxCommon.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 import createListSimply from '../helper/createListSimply';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/chart/line.ts b/src/chart/line.ts
index c0c1e6d..a03e720 100644
--- a/src/chart/line.ts
+++ b/src/chart/line.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 
 import './line/LineSeries';
diff --git a/src/chart/line/LineSeries.ts b/src/chart/line/LineSeries.ts
index 8287364..70b2e55 100644
--- a/src/chart/line/LineSeries.ts
+++ b/src/chart/line/LineSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import createListFromArray from '../helper/createListFromArray';
 import SeriesModel from '../../model/Series';
diff --git a/src/chart/line/LineView.ts b/src/chart/line/LineView.ts
index 639cbf6..47ca269 100644
--- a/src/chart/line/LineView.ts
+++ b/src/chart/line/LineView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // FIXME step not support polar
 
 import {__DEV__} from '../../config';
diff --git a/src/chart/line/helper.ts b/src/chart/line/helper.ts
index 46f4966..7fb5216 100644
--- a/src/chart/line/helper.ts
+++ b/src/chart/line/helper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {isDimensionStacked} from '../../data/helper/dataStackHelper';
 import {map} from 'zrender/src/core/util';
 
diff --git a/src/chart/line/lineAnimationDiff.ts b/src/chart/line/lineAnimationDiff.ts
index 5e7d479..449ad29 100644
--- a/src/chart/line/lineAnimationDiff.ts
+++ b/src/chart/line/lineAnimationDiff.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {prepareDataCoordInfo, getStackedOnPoint} from './helper';
 
 // var arrayDiff = require('zrender/src/core/arrayDiff');
diff --git a/src/chart/line/poly.ts b/src/chart/line/poly.ts
index df50c24..02d0d79 100644
--- a/src/chart/line/poly.ts
+++ b/src/chart/line/poly.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // Poly path support NaN point
 
 import Path from 'zrender/src/graphic/Path';
diff --git a/src/chart/lines/LinesSeries.ts b/src/chart/lines/LinesSeries.ts
index 047f0b6..0801875 100644
--- a/src/chart/lines/LinesSeries.ts
+++ b/src/chart/lines/LinesSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /* global Uint32Array, Float64Array, Float32Array */
 
 import {__DEV__} from '../../config';
diff --git a/src/chart/lines/LinesView.ts b/src/chart/lines/LinesView.ts
index 42a249c..c9020c6 100644
--- a/src/chart/lines/LinesView.ts
+++ b/src/chart/lines/LinesView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as echarts from '../../echarts';
 import LineDraw from '../helper/LineDraw';
diff --git a/src/chart/lines/linesLayout.ts b/src/chart/lines/linesLayout.ts
index 12a8a64..a041a1b 100644
--- a/src/chart/lines/linesLayout.ts
+++ b/src/chart/lines/linesLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /* global Float32Array */
 
 import createRenderPlanner from '../helper/createRenderPlanner';
diff --git a/src/chart/lines/linesVisual.ts b/src/chart/lines/linesVisual.ts
index 4ec4051..ed2c379 100644
--- a/src/chart/lines/linesVisual.ts
+++ b/src/chart/lines/linesVisual.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 
 function normalize(a) {
     if (!(a instanceof Array)) {
diff --git a/src/chart/map/MapSeries.ts b/src/chart/map/MapSeries.ts
index 606928b..6bc864b 100644
--- a/src/chart/map/MapSeries.ts
+++ b/src/chart/map/MapSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import createListSimply from '../helper/createListSimply';
 import SeriesModel from '../../model/Series';
diff --git a/src/chart/map/MapView.ts b/src/chart/map/MapView.ts
index bcf9694..d95a6ed 100644
--- a/src/chart/map/MapView.ts
+++ b/src/chart/map/MapView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
diff --git a/src/chart/map/backwardCompat.ts b/src/chart/map/backwardCompat.ts
index f0844e8..d401323 100644
--- a/src/chart/map/backwardCompat.ts
+++ b/src/chart/map/backwardCompat.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 export default function (option) {
diff --git a/src/chart/map/mapDataStatistic.ts b/src/chart/map/mapDataStatistic.ts
index 438bbeb..4825c17 100644
--- a/src/chart/map/mapDataStatistic.ts
+++ b/src/chart/map/mapDataStatistic.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 // FIXME 公用?
diff --git a/src/chart/map/mapSymbolLayout.ts b/src/chart/map/mapSymbolLayout.ts
index 8e96800..93d28b8 100644
--- a/src/chart/map/mapSymbolLayout.ts
+++ b/src/chart/map/mapSymbolLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 export default function (ecModel) {
diff --git a/src/chart/map/mapVisual.ts b/src/chart/map/mapVisual.ts
index 27ef7ba..f841bf8 100644
--- a/src/chart/map/mapVisual.ts
+++ b/src/chart/map/mapVisual.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 export default function (ecModel) {
     ecModel.eachSeriesByType('map', function (seriesModel) {
diff --git a/src/chart/parallel/ParallelSeries.ts b/src/chart/parallel/ParallelSeries.ts
index da08ccc..d98aab0 100644
--- a/src/chart/parallel/ParallelSeries.ts
+++ b/src/chart/parallel/ParallelSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {each, createHashMap} from 'zrender/src/core/util';
 import SeriesModel from '../../model/Series';
 import createListFromArray from '../helper/createListFromArray';
diff --git a/src/chart/parallel/ParallelView.ts b/src/chart/parallel/ParallelView.ts
index 46a60e6..f0b8dc1 100644
--- a/src/chart/parallel/ParallelView.ts
+++ b/src/chart/parallel/ParallelView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as graphic from '../../util/graphic';
 import ChartView from '../../view/Chart';
 
diff --git a/src/chart/parallel/parallelVisual.ts b/src/chart/parallel/parallelVisual.ts
index ad2bdd5..25d82d1 100644
--- a/src/chart/parallel/parallelVisual.ts
+++ b/src/chart/parallel/parallelVisual.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 var opacityAccessPath = ['lineStyle', 'normal', 'opacity'];
 
diff --git a/src/chart/pictorialBar.ts b/src/chart/pictorialBar.ts
index 975e4d9..86dadf7 100644
--- a/src/chart/pictorialBar.ts
+++ b/src/chart/pictorialBar.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 
diff --git a/src/chart/pie.ts b/src/chart/pie.ts
index 35d3dea..33b0d2f 100644
--- a/src/chart/pie.ts
+++ b/src/chart/pie.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 
diff --git a/src/chart/pie/PieSeries.ts b/src/chart/pie/PieSeries.ts
index 935eacd..1a1697b 100644
--- a/src/chart/pie/PieSeries.ts
+++ b/src/chart/pie/PieSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import createListSimply from '../helper/createListSimply';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/chart/pie/PieView.ts b/src/chart/pie/PieView.ts
index dc9f635..68d1f92 100644
--- a/src/chart/pie/PieView.ts
+++ b/src/chart/pie/PieView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
 import ChartView from '../../view/Chart';
diff --git a/src/chart/pie/labelLayout.ts b/src/chart/pie/labelLayout.ts
index 7b16651..5a82abf 100644
--- a/src/chart/pie/labelLayout.ts
+++ b/src/chart/pie/labelLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // FIXME emphasis label position is not same with normal label position
 
 import * as textContain from 'zrender/src/contain/text';
diff --git a/src/chart/pie/pieLayout.ts b/src/chart/pie/pieLayout.ts
index b60382b..1d42b85 100644
--- a/src/chart/pie/pieLayout.ts
+++ b/src/chart/pie/pieLayout.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 import {parsePercent, linearMap} from '../../util/number';
 import * as layout from '../../util/layout';
diff --git a/src/chart/radar.ts b/src/chart/radar.ts
index cbc3ac4..39ce9be 100644
--- a/src/chart/radar.ts
+++ b/src/chart/radar.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 import * as echarts from '../echarts';
 
diff --git a/src/chart/radar/RadarSeries.ts b/src/chart/radar/RadarSeries.ts
index ba713d0..93ce3b8 100644
--- a/src/chart/radar/RadarSeries.ts
+++ b/src/chart/radar/RadarSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import SeriesModel from '../../model/Series';
 import createListSimply from '../helper/createListSimply';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/chart/radar/RadarView.ts b/src/chart/radar/RadarView.ts
index ac9c7d9..d523381 100644
--- a/src/chart/radar/RadarView.ts
+++ b/src/chart/radar/RadarView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as graphic from '../../util/graphic';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/chart/radar/backwardCompat.ts b/src/chart/radar/backwardCompat.ts
index 4cba89f..438486a 100644
--- a/src/chart/radar/backwardCompat.ts
+++ b/src/chart/radar/backwardCompat.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // Backward compat for radar chart in 2
 import * as zrUtil from 'zrender/src/core/util';
 
diff --git a/src/chart/radar/radarLayout.ts b/src/chart/radar/radarLayout.ts
index 0092f49..017e64a 100644
--- a/src/chart/radar/radarLayout.ts
+++ b/src/chart/radar/radarLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 export default function (ecModel) {
diff --git a/src/chart/sankey/SankeySeries.ts b/src/chart/sankey/SankeySeries.ts
index 39031b9..8f74bd1 100644
--- a/src/chart/sankey/SankeySeries.ts
+++ b/src/chart/sankey/SankeySeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import SeriesModel from '../../model/Series';
 import createGraphFromNodeEdge from '../helper/createGraphFromNodeEdge';
 import {encodeHTML} from '../../util/format';
diff --git a/src/chart/sankey/SankeyView.ts b/src/chart/sankey/SankeyView.ts
index 4af153c..3dcbeea 100644
--- a/src/chart/sankey/SankeyView.ts
+++ b/src/chart/sankey/SankeyView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as graphic from '../../util/graphic';
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/chart/sankey/sankeyAction.ts b/src/chart/sankey/sankeyAction.ts
index 144e79c..c512d7a 100644
--- a/src/chart/sankey/sankeyAction.ts
+++ b/src/chart/sankey/sankeyAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import '../helper/focusNodeAdjacencyAction';
 
diff --git a/src/chart/sankey/sankeyLayout.ts b/src/chart/sankey/sankeyLayout.ts
index 812d188..2fe08aa 100644
--- a/src/chart/sankey/sankeyLayout.ts
+++ b/src/chart/sankey/sankeyLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as layout from '../../util/layout';
 import * as zrUtil from 'zrender/src/core/util';
 import {groupData} from '../../util/model';
diff --git a/src/chart/sankey/sankeyVisual.ts b/src/chart/sankey/sankeyVisual.ts
index 668a5ee..84ea667 100644
--- a/src/chart/sankey/sankeyVisual.ts
+++ b/src/chart/sankey/sankeyVisual.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import VisualMapping from '../../visual/VisualMapping';
 import * as zrUtil from 'zrender/src/core/util';
 
diff --git a/src/chart/scatter.ts b/src/chart/scatter.ts
index 87bbd3a..d09da16 100644
--- a/src/chart/scatter.ts
+++ b/src/chart/scatter.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 // import * as zrUtil from 'zrender/src/core/util';
 
diff --git a/src/chart/scatter/ScatterSeries.ts b/src/chart/scatter/ScatterSeries.ts
index df1e0d1..81e018f 100644
--- a/src/chart/scatter/ScatterSeries.ts
+++ b/src/chart/scatter/ScatterSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import createListFromArray from '../helper/createListFromArray';
 import SeriesModel from '../../model/Series';
 
diff --git a/src/chart/scatter/ScatterView.ts b/src/chart/scatter/ScatterView.ts
index 6fc7b84..f93a33c 100644
--- a/src/chart/scatter/ScatterView.ts
+++ b/src/chart/scatter/ScatterView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import SymbolDraw from '../helper/SymbolDraw';
 import LargeSymbolDraw from '../helper/LargeSymbolDraw';
diff --git a/src/chart/sunburst/SunburstPiece.ts b/src/chart/sunburst/SunburstPiece.ts
index 79ca4c3..e2f0b0a 100644
--- a/src/chart/sunburst/SunburstPiece.ts
+++ b/src/chart/sunburst/SunburstPiece.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
 
diff --git a/src/chart/sunburst/SunburstSeries.ts b/src/chart/sunburst/SunburstSeries.ts
index e3b192e..82a8d69 100644
--- a/src/chart/sunburst/SunburstSeries.ts
+++ b/src/chart/sunburst/SunburstSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import SeriesModel from '../../model/Series';
 import Tree from '../../data/Tree';
diff --git a/src/chart/sunburst/SunburstView.ts b/src/chart/sunburst/SunburstView.ts
index 2d9d037..fc37018 100644
--- a/src/chart/sunburst/SunburstView.ts
+++ b/src/chart/sunburst/SunburstView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import ChartView from '../../view/Chart';
 import SunburstPiece from './SunburstPiece';
diff --git a/src/chart/sunburst/sunburstAction.ts b/src/chart/sunburst/sunburstAction.ts
index 4764143..9b4cb2f 100644
--- a/src/chart/sunburst/sunburstAction.ts
+++ b/src/chart/sunburst/sunburstAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @file Sunburst action
  */
diff --git a/src/chart/sunburst/sunburstLayout.ts b/src/chart/sunburst/sunburstLayout.ts
index ae39073..cdbe94f 100644
--- a/src/chart/sunburst/sunburstLayout.ts
+++ b/src/chart/sunburst/sunburstLayout.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 import { parsePercent } from '../../util/number';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/chart/themeRiver.ts b/src/chart/themeRiver.ts
index 26f136c..87cec62 100644
--- a/src/chart/themeRiver.ts
+++ b/src/chart/themeRiver.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 
 import '../component/singleAxis';
diff --git a/src/chart/themeRiver/ThemeRiverSeries.ts b/src/chart/themeRiver/ThemeRiverSeries.ts
index 2552a7a..a4561fc 100644
--- a/src/chart/themeRiver/ThemeRiverSeries.ts
+++ b/src/chart/themeRiver/ThemeRiverSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import SeriesModel from '../../model/Series';
 import createDimensions from '../../data/helper/createDimensions';
 import {getDimensionTypeByAxis} from '../../data/helper/dimensionHelper';
diff --git a/src/chart/themeRiver/ThemeRiverView.ts b/src/chart/themeRiver/ThemeRiverView.ts
index be835a8..d3a44be 100644
--- a/src/chart/themeRiver/ThemeRiverView.ts
+++ b/src/chart/themeRiver/ThemeRiverView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import {Polygon} from '../line/poly';
 import * as graphic from '../../util/graphic';
diff --git a/src/chart/themeRiver/themeRiverLayout.ts b/src/chart/themeRiver/themeRiverLayout.ts
index dd8ab6f..82c56c3 100644
--- a/src/chart/themeRiver/themeRiverLayout.ts
+++ b/src/chart/themeRiver/themeRiverLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as numberUtil from '../../util/number';
 
diff --git a/src/chart/themeRiver/themeRiverVisual.ts b/src/chart/themeRiver/themeRiverVisual.ts
index f5b5f4c..5f8c026 100644
--- a/src/chart/themeRiver/themeRiverVisual.ts
+++ b/src/chart/themeRiver/themeRiverVisual.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {createHashMap} from 'zrender/src/core/util';
 
 export default function (ecModel) {
diff --git a/src/chart/tree.ts b/src/chart/tree.ts
index e498d25..20ab129 100644
--- a/src/chart/tree.ts
+++ b/src/chart/tree.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 
 import './tree/TreeSeries';
diff --git a/src/chart/tree/TreeSeries.ts b/src/chart/tree/TreeSeries.ts
index 1b4d51f..ddd12e9 100644
--- a/src/chart/tree/TreeSeries.ts
+++ b/src/chart/tree/TreeSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import SeriesModel from '../../model/Series';
 import Tree from '../../data/Tree';
 import {encodeHTML} from '../../util/format';
diff --git a/src/chart/tree/TreeView.ts b/src/chart/tree/TreeView.ts
index 6662eac..2d1eaa1 100644
--- a/src/chart/tree/TreeView.ts
+++ b/src/chart/tree/TreeView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
 import SymbolClz from '../helper/Symbol';
diff --git a/src/chart/tree/layoutHelper.ts b/src/chart/tree/layoutHelper.ts
index 21e0b60..a01d488 100644
--- a/src/chart/tree/layoutHelper.ts
+++ b/src/chart/tree/layoutHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /*
 * A third-party license is embeded for some of the code in this file:
 * The tree layoutHelper implementation was originally copied from
diff --git a/src/chart/tree/traversalHelper.ts b/src/chart/tree/traversalHelper.ts
index b06ad69..61ba789 100644
--- a/src/chart/tree/traversalHelper.ts
+++ b/src/chart/tree/traversalHelper.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 /**
  * Traverse the tree from bottom to top and do something
diff --git a/src/chart/tree/treeAction.ts b/src/chart/tree/treeAction.ts
index e9dd42d..9b1e814 100644
--- a/src/chart/tree/treeAction.ts
+++ b/src/chart/tree/treeAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import {updateCenterAndZoom} from '../../action/roamHelper';
 
diff --git a/src/chart/tree/treeLayout.ts b/src/chart/tree/treeLayout.ts
index 0957d1c..4006c2f 100644
--- a/src/chart/tree/treeLayout.ts
+++ b/src/chart/tree/treeLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {
     eachAfter,
     eachBefore
diff --git a/src/chart/treemap.ts b/src/chart/treemap.ts
index 3414052..60bf7f0 100644
--- a/src/chart/treemap.ts
+++ b/src/chart/treemap.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 
 import './treemap/TreemapSeries';
diff --git a/src/chart/treemap/Breadcrumb.ts b/src/chart/treemap/Breadcrumb.ts
index 41e355a..cf779fd 100644
--- a/src/chart/treemap/Breadcrumb.ts
+++ b/src/chart/treemap/Breadcrumb.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as graphic from '../../util/graphic';
 import * as layout from '../../util/layout';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/chart/treemap/TreemapSeries.ts b/src/chart/treemap/TreemapSeries.ts
index be917ba..8a19af2 100644
--- a/src/chart/treemap/TreemapSeries.ts
+++ b/src/chart/treemap/TreemapSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import SeriesModel from '../../model/Series';
 import Tree from '../../data/Tree';
diff --git a/src/chart/treemap/TreemapView.ts b/src/chart/treemap/TreemapView.ts
index 51ee27a..9e0cd11 100644
--- a/src/chart/treemap/TreemapView.ts
+++ b/src/chart/treemap/TreemapView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
diff --git a/src/chart/treemap/helper.ts b/src/chart/treemap/helper.ts
index 541dae5..346a03f 100644
--- a/src/chart/treemap/helper.ts
+++ b/src/chart/treemap/helper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 export function retrieveTargetInfo(payload, seriesModel) {
diff --git a/src/chart/treemap/treemapAction.ts b/src/chart/treemap/treemapAction.ts
index c150520..4029dce 100644
--- a/src/chart/treemap/treemapAction.ts
+++ b/src/chart/treemap/treemapAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @file Treemap action
  */
diff --git a/src/chart/treemap/treemapLayout.ts b/src/chart/treemap/treemapLayout.ts
index c7da8e2..4ef69e6 100644
--- a/src/chart/treemap/treemapLayout.ts
+++ b/src/chart/treemap/treemapLayout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /*
 * A third-party license is embeded for some of the code in this file:
 * The treemap layout implementation was originally copied from
diff --git a/src/chart/treemap/treemapVisual.ts b/src/chart/treemap/treemapVisual.ts
index 560f510..f775f3d 100644
--- a/src/chart/treemap/treemapVisual.ts
+++ b/src/chart/treemap/treemapVisual.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import VisualMapping from '../../visual/VisualMapping';
 import * as zrColor from 'zrender/src/tool/color';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/component/axis/AngleAxisView.ts b/src/component/axis/AngleAxisView.ts
index 1675547..d2a483a 100644
--- a/src/component/axis/AngleAxisView.ts
+++ b/src/component/axis/AngleAxisView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
 import Model from '../../model/Model';
diff --git a/src/component/axis/AxisBuilder.ts b/src/component/axis/AxisBuilder.ts
index 149d17f..66acaa8 100644
--- a/src/component/axis/AxisBuilder.ts
+++ b/src/component/axis/AxisBuilder.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {retrieve, defaults, extend, each} from 'zrender/src/core/util';
 import * as formatUtil from '../../util/format';
 import * as graphic from '../../util/graphic';
diff --git a/src/component/axis/AxisView.ts b/src/component/axis/AxisView.ts
index a0fdce1..91a36c4 100644
--- a/src/component/axis/AxisView.ts
+++ b/src/component/axis/AxisView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as echarts from '../../echarts';
 import * as axisPointerModelHelper from '../axisPointer/modelHelper';
diff --git a/src/component/axis/CartesianAxisView.ts b/src/component/axis/CartesianAxisView.ts
index 25cb65a..29b8a1b 100644
--- a/src/component/axis/CartesianAxisView.ts
+++ b/src/component/axis/CartesianAxisView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
 import AxisBuilder from './AxisBuilder';
diff --git a/src/component/axis/ParallelAxisView.ts b/src/component/axis/ParallelAxisView.ts
index ccc3f6f..44a597b 100644
--- a/src/component/axis/ParallelAxisView.ts
+++ b/src/component/axis/ParallelAxisView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import AxisBuilder from './AxisBuilder';
diff --git a/src/component/axis/RadiusAxisView.ts b/src/component/axis/RadiusAxisView.ts
index e5e6575..7817b34 100644
--- a/src/component/axis/RadiusAxisView.ts
+++ b/src/component/axis/RadiusAxisView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
 import AxisBuilder from './AxisBuilder';
diff --git a/src/component/axis/SingleAxisView.ts b/src/component/axis/SingleAxisView.ts
index cec2c1f..db34cca 100644
--- a/src/component/axis/SingleAxisView.ts
+++ b/src/component/axis/SingleAxisView.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 import * as zrUtil from 'zrender/src/core/util';
 import AxisBuilder from './AxisBuilder';
diff --git a/src/component/axis/axisSplitHelper.ts b/src/component/axis/axisSplitHelper.ts
index 34ef562..555bcc0 100644
--- a/src/component/axis/axisSplitHelper.ts
+++ b/src/component/axis/axisSplitHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
 
diff --git a/src/component/axis/parallelAxisAction.ts b/src/component/axis/parallelAxisAction.ts
index 27408aa..45c7b55 100644
--- a/src/component/axis/parallelAxisAction.ts
+++ b/src/component/axis/parallelAxisAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 
 /**
diff --git a/src/component/axisPointer.ts b/src/component/axisPointer.ts
index 7877103..246068b 100644
--- a/src/component/axisPointer.ts
+++ b/src/component/axisPointer.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as axisPointerModelHelper from './axisPointer/modelHelper';
diff --git a/src/component/axisPointer/AxisPointerView.ts b/src/component/axisPointer/AxisPointerView.ts
index a57fd8c..c93f8d9 100644
--- a/src/component/axisPointer/AxisPointerView.ts
+++ b/src/component/axisPointer/AxisPointerView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as globalListener from './globalListener';
 
diff --git a/src/component/axisPointer/BaseAxisPointer.ts b/src/component/axisPointer/BaseAxisPointer.ts
index f97ee57..be5fd82 100644
--- a/src/component/axisPointer/BaseAxisPointer.ts
+++ b/src/component/axisPointer/BaseAxisPointer.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as clazzUtil from '../../util/clazz';
 import * as graphic from '../../util/graphic';
diff --git a/src/component/axisPointer/CartesianAxisPointer.ts b/src/component/axisPointer/CartesianAxisPointer.ts
index 111b67c..de25742 100644
--- a/src/component/axisPointer/CartesianAxisPointer.ts
+++ b/src/component/axisPointer/CartesianAxisPointer.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import BaseAxisPointer from './BaseAxisPointer';
 import * as viewHelper from './viewHelper';
 import * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper';
diff --git a/src/component/axisPointer/PolarAxisPointer.ts b/src/component/axisPointer/PolarAxisPointer.ts
index 33d9e7b..72d6f32 100644
--- a/src/component/axisPointer/PolarAxisPointer.ts
+++ b/src/component/axisPointer/PolarAxisPointer.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as formatUtil from '../../util/format';
 import BaseAxisPointer from './BaseAxisPointer';
 import * as graphic from '../../util/graphic';
diff --git a/src/component/axisPointer/SingleAxisPointer.ts b/src/component/axisPointer/SingleAxisPointer.ts
index 221bf11..06625a8 100644
--- a/src/component/axisPointer/SingleAxisPointer.ts
+++ b/src/component/axisPointer/SingleAxisPointer.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import BaseAxisPointer from './BaseAxisPointer';
 import * as viewHelper from './viewHelper';
 import * as singleAxisHelper from '../../coord/single/singleAxisHelper';
diff --git a/src/component/axisPointer/axisTrigger.ts b/src/component/axisPointer/axisTrigger.ts
index 5f51b76..8536235 100644
--- a/src/component/axisPointer/axisTrigger.ts
+++ b/src/component/axisPointer/axisTrigger.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import {makeInner} from '../../util/model';
 import * as modelHelper from './modelHelper';
diff --git a/src/component/axisPointer/findPointFromSeries.ts b/src/component/axisPointer/findPointFromSeries.ts
index 764c49d..b48824d 100644
--- a/src/component/axisPointer/findPointFromSeries.ts
+++ b/src/component/axisPointer/findPointFromSeries.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as modelUtil from '../../util/model';
 
diff --git a/src/component/axisPointer/globalListener.ts b/src/component/axisPointer/globalListener.ts
index 6cfd469..48cbfc6 100644
--- a/src/component/axisPointer/globalListener.ts
+++ b/src/component/axisPointer/globalListener.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import env from 'zrender/src/core/env';
 import {makeInner} from '../../util/model';
diff --git a/src/component/axisPointer/modelHelper.ts b/src/component/axisPointer/modelHelper.ts
index c9e193e..871480d 100644
--- a/src/component/axisPointer/modelHelper.ts
+++ b/src/component/axisPointer/modelHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import Model from '../../model/Model';
 
diff --git a/src/component/axisPointer/viewHelper.ts b/src/component/axisPointer/viewHelper.ts
index 74b5c7f..e2add8f 100644
--- a/src/component/axisPointer/viewHelper.ts
+++ b/src/component/axisPointer/viewHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
 import * as textContain from 'zrender/src/contain/text';
diff --git a/src/component/brush/BrushModel.ts b/src/component/brush/BrushModel.ts
index 85da245..5241fc9 100644
--- a/src/component/brush/BrushModel.ts
+++ b/src/component/brush/BrushModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/component/brush/BrushView.ts b/src/component/brush/BrushView.ts
index bd0f486..5b55c0f 100644
--- a/src/component/brush/BrushView.ts
+++ b/src/component/brush/BrushView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import BrushController from '../helper/BrushController';
diff --git a/src/component/brush/brushAction.ts b/src/component/brush/brushAction.ts
index f969104..2e86a50 100644
--- a/src/component/brush/brushAction.ts
+++ b/src/component/brush/brushAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 
 /**
diff --git a/src/component/brush/preprocessor.ts b/src/component/brush/preprocessor.ts
index 78c971c..3aac2f9 100644
--- a/src/component/brush/preprocessor.ts
+++ b/src/component/brush/preprocessor.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 var DEFAULT_TOOLBOX_BTNS = ['rect', 'polygon', 'keep', 'clear'];
diff --git a/src/component/brush/selector.ts b/src/component/brush/selector.ts
index a4a1d09..56f54e4 100644
--- a/src/component/brush/selector.ts
+++ b/src/component/brush/selector.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as polygonContain from 'zrender/src/contain/polygon';
 import BoundingRect from 'zrender/src/core/BoundingRect';
 import {linePolygonIntersect} from '../../util/graphic';
diff --git a/src/component/brush/visualEncoding.ts b/src/component/brush/visualEncoding.ts
index 5f8677d..d955948 100644
--- a/src/component/brush/visualEncoding.ts
+++ b/src/component/brush/visualEncoding.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import BoundingRect from 'zrender/src/core/BoundingRect';
diff --git a/src/component/calendar/CalendarView.ts b/src/component/calendar/CalendarView.ts
index 13ea942..699faea 100644
--- a/src/component/calendar/CalendarView.ts
+++ b/src/component/calendar/CalendarView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
diff --git a/src/component/dataZoom/AxisProxy.ts b/src/component/dataZoom/AxisProxy.ts
index 0a2256d..87dbaa0 100644
--- a/src/component/dataZoom/AxisProxy.ts
+++ b/src/component/dataZoom/AxisProxy.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as numberUtil from '../../util/number';
 import * as helper from './helper';
diff --git a/src/component/dataZoom/DataZoomModel.ts b/src/component/dataZoom/DataZoomModel.ts
index 97521d9..8414c50 100644
--- a/src/component/dataZoom/DataZoomModel.ts
+++ b/src/component/dataZoom/DataZoomModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/component/dataZoom/DataZoomView.ts b/src/component/dataZoom/DataZoomView.ts
index 1668805..cd9d99e 100644
--- a/src/component/dataZoom/DataZoomView.ts
+++ b/src/component/dataZoom/DataZoomView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import ComponentView from '../../view/Component';
 
 export default ComponentView.extend({
diff --git a/src/component/dataZoom/InsideZoomModel.ts b/src/component/dataZoom/InsideZoomModel.ts
index 2022fd9..cdaa18d 100644
--- a/src/component/dataZoom/InsideZoomModel.ts
+++ b/src/component/dataZoom/InsideZoomModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import DataZoomModel from './DataZoomModel';
 
 export default DataZoomModel.extend({
diff --git a/src/component/dataZoom/InsideZoomView.ts b/src/component/dataZoom/InsideZoomView.ts
index da0867b..951aea7 100644
--- a/src/component/dataZoom/InsideZoomView.ts
+++ b/src/component/dataZoom/InsideZoomView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import DataZoomView from './DataZoomView';
 import sliderMove from '../helper/sliderMove';
diff --git a/src/component/dataZoom/SelectZoomModel.ts b/src/component/dataZoom/SelectZoomModel.ts
index d71cb8a..c720cfb 100644
--- a/src/component/dataZoom/SelectZoomModel.ts
+++ b/src/component/dataZoom/SelectZoomModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import DataZoomModel from './DataZoomModel';
 
 export default DataZoomModel.extend({
diff --git a/src/component/dataZoom/SliderZoomModel.ts b/src/component/dataZoom/SliderZoomModel.ts
index 54d0f19..4a102a2 100644
--- a/src/component/dataZoom/SliderZoomModel.ts
+++ b/src/component/dataZoom/SliderZoomModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import DataZoomModel from './DataZoomModel';
 
 var SliderZoomModel = DataZoomModel.extend({
diff --git a/src/component/dataZoom/SliderZoomView.ts b/src/component/dataZoom/SliderZoomView.ts
index abfd922..356eb07 100644
--- a/src/component/dataZoom/SliderZoomView.ts
+++ b/src/component/dataZoom/SliderZoomView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as eventTool from 'zrender/src/core/event';
 import * as graphic from '../../util/graphic';
diff --git a/src/component/dataZoom/dataZoomAction.ts b/src/component/dataZoom/dataZoomAction.ts
index b227e11..52a4108 100644
--- a/src/component/dataZoom/dataZoomAction.ts
+++ b/src/component/dataZoom/dataZoomAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as helper from './helper';
diff --git a/src/component/dataZoom/helper.ts b/src/component/dataZoom/helper.ts
index 910f0f9..e6ac11a 100644
--- a/src/component/dataZoom/helper.ts
+++ b/src/component/dataZoom/helper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as formatUtil from '../../util/format';
 
diff --git a/src/component/dataZoom/history.ts b/src/component/dataZoom/history.ts
index f686bc4..3953b51 100644
--- a/src/component/dataZoom/history.ts
+++ b/src/component/dataZoom/history.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 var each = zrUtil.each;
diff --git a/src/component/dataZoom/roams.ts b/src/component/dataZoom/roams.ts
index ddcba96..b841973 100644
--- a/src/component/dataZoom/roams.ts
+++ b/src/component/dataZoom/roams.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // Only create one roam controller for each coordinate system.
 // one roam controller might be refered by two inside data zoom
 // components (for example, one for x and one for y). When user
diff --git a/src/component/dataZoom/typeDefaulter.ts b/src/component/dataZoom/typeDefaulter.ts
index e0f14f1..5a8925b 100644
--- a/src/component/dataZoom/typeDefaulter.ts
+++ b/src/component/dataZoom/typeDefaulter.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import Component from '../../model/Component';
 
 Component.registerSubTypeDefaulter('dataZoom', function () {
diff --git a/src/component/geo.ts b/src/component/geo.ts
index 0fcad46..d949f7e 100644
--- a/src/component/geo.ts
+++ b/src/component/geo.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 
diff --git a/src/component/geo/GeoView.ts b/src/component/geo/GeoView.ts
index a3759ed..f132e20 100644
--- a/src/component/geo/GeoView.ts
+++ b/src/component/geo/GeoView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import MapDraw from '../helper/MapDraw';
 import * as echarts from '../../echarts';
 
diff --git a/src/component/graphic.ts b/src/component/graphic.ts
index e689db1..d5f1c9d 100644
--- a/src/component/graphic.ts
+++ b/src/component/graphic.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../config';
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/component/gridSimple.ts b/src/component/gridSimple.ts
index 2c1194c..a19392f 100644
--- a/src/component/gridSimple.ts
+++ b/src/component/gridSimple.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../util/graphic';
diff --git a/src/component/helper/BrushTargetManager.ts b/src/component/helper/BrushTargetManager.ts
index 846b370..115d1e8 100644
--- a/src/component/helper/BrushTargetManager.ts
+++ b/src/component/helper/BrushTargetManager.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
diff --git a/src/component/helper/MapDraw.ts b/src/component/helper/MapDraw.ts
index 2965167..a418341 100644
--- a/src/component/helper/MapDraw.ts
+++ b/src/component/helper/MapDraw.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import RoamController from './RoamController';
 import * as roamHelper from '../../component/helper/roamHelper';
diff --git a/src/component/helper/brushHelper.ts b/src/component/helper/brushHelper.ts
index 7aff44c..8166855 100644
--- a/src/component/helper/brushHelper.ts
+++ b/src/component/helper/brushHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import BoundingRect from 'zrender/src/core/BoundingRect';
 import {onIrrelevantElement} from './cursorHelper';
 import * as graphicUtil from '../../util/graphic';
diff --git a/src/component/helper/cursorHelper.ts b/src/component/helper/cursorHelper.ts
index 1b394f5..4bde807 100644
--- a/src/component/helper/cursorHelper.ts
+++ b/src/component/helper/cursorHelper.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 var IRRELEVANT_EXCLUDES = {'axisPointer': 1, 'tooltip': 1, 'brush': 1};
 
diff --git a/src/component/helper/interactionMutex.ts b/src/component/helper/interactionMutex.ts
index 116d76a..ad89ecf 100644
--- a/src/component/helper/interactionMutex.ts
+++ b/src/component/helper/interactionMutex.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 
 var ATTR = '\0_ec_interaction_mutex';
diff --git a/src/component/helper/listComponent.ts b/src/component/helper/listComponent.ts
index 91098b1..d39aa19 100644
--- a/src/component/helper/listComponent.ts
+++ b/src/component/helper/listComponent.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {
     getLayoutRect,
     box as layoutBox,
diff --git a/src/component/helper/roamHelper.ts b/src/component/helper/roamHelper.ts
index 9313d2d..7af791e 100644
--- a/src/component/helper/roamHelper.ts
+++ b/src/component/helper/roamHelper.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 /**
  * For geo and graph.
diff --git a/src/component/helper/selectableMixin.ts b/src/component/helper/selectableMixin.ts
index f18ee1c..7f4db3d 100644
--- a/src/component/helper/selectableMixin.ts
+++ b/src/component/helper/selectableMixin.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Data selectable mixin for chart series.
  * To eanble data select, option of series must have `selectedMode`.
diff --git a/src/component/helper/sliderMove.ts b/src/component/helper/sliderMove.ts
index e72b105..e3ed8d5 100644
--- a/src/component/helper/sliderMove.ts
+++ b/src/component/helper/sliderMove.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Calculate slider move result.
  * Usage:
diff --git a/src/component/legend.ts b/src/component/legend.ts
index 47f52e3..f11bb5b 100644
--- a/src/component/legend.ts
+++ b/src/component/legend.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 // Do not contain scrollable legend, for sake of file size.
 
diff --git a/src/component/legend/LegendModel.ts b/src/component/legend/LegendModel.ts
index f49cb55..e0533d9 100644
--- a/src/component/legend/LegendModel.ts
+++ b/src/component/legend/LegendModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import Model from '../../model/Model';
diff --git a/src/component/legend/LegendView.ts b/src/component/legend/LegendView.ts
index e63bf78..3fec7fe 100644
--- a/src/component/legend/LegendView.ts
+++ b/src/component/legend/LegendView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/component/legend/ScrollableLegendModel.ts b/src/component/legend/ScrollableLegendModel.ts
index bf8e713..4d64af9 100644
--- a/src/component/legend/ScrollableLegendModel.ts
+++ b/src/component/legend/ScrollableLegendModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import LegendModel from './LegendModel';
 import {
     mergeLayoutParam,
diff --git a/src/component/legend/ScrollableLegendView.ts b/src/component/legend/ScrollableLegendView.ts
index 8962f6b..dc9471e 100644
--- a/src/component/legend/ScrollableLegendView.ts
+++ b/src/component/legend/ScrollableLegendView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Separate legend and scrollable legend to reduce package size.
  */
diff --git a/src/component/legend/legendAction.ts b/src/component/legend/legendAction.ts
index d95156f..ca0bd35 100644
--- a/src/component/legend/legendAction.ts
+++ b/src/component/legend/legendAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 
diff --git a/src/component/legend/legendFilter.ts b/src/component/legend/legendFilter.ts
index 031901e..ac13a55 100644
--- a/src/component/legend/legendFilter.ts
+++ b/src/component/legend/legendFilter.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 export default function (ecModel) {
 
     var legendModels = ecModel.findComponents({
diff --git a/src/component/legend/scrollableLegendAction.ts b/src/component/legend/scrollableLegendAction.ts
index b06ff6d..bf179fa 100644
--- a/src/component/legend/scrollableLegendAction.ts
+++ b/src/component/legend/scrollableLegendAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 
 /**
diff --git a/src/component/marker/MarkAreaModel.ts b/src/component/marker/MarkAreaModel.ts
index 331ff1e..bb82721 100644
--- a/src/component/marker/MarkAreaModel.ts
+++ b/src/component/marker/MarkAreaModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import MarkerModel from './MarkerModel';
 
 export default MarkerModel.extend({
diff --git a/src/component/marker/MarkAreaView.ts b/src/component/marker/MarkAreaView.ts
index ec1ae7b..fc32041 100644
--- a/src/component/marker/MarkAreaView.ts
+++ b/src/component/marker/MarkAreaView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // TODO Better on polar
 
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/component/marker/MarkLineModel.ts b/src/component/marker/MarkLineModel.ts
index 077e5b9..10d6aac 100644
--- a/src/component/marker/MarkLineModel.ts
+++ b/src/component/marker/MarkLineModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import MarkerModel from './MarkerModel';
 
 export default MarkerModel.extend({
diff --git a/src/component/marker/MarkLineView.ts b/src/component/marker/MarkLineView.ts
index eb75ee7..7f9f78b 100644
--- a/src/component/marker/MarkLineView.ts
+++ b/src/component/marker/MarkLineView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import List from '../../data/List';
 import * as numberUtil from '../../util/number';
diff --git a/src/component/marker/MarkPointModel.ts b/src/component/marker/MarkPointModel.ts
index 281e518..06bb4c1 100644
--- a/src/component/marker/MarkPointModel.ts
+++ b/src/component/marker/MarkPointModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import MarkerModel from './MarkerModel';
 
 export default MarkerModel.extend({
diff --git a/src/component/marker/MarkPointView.ts b/src/component/marker/MarkPointView.ts
index 2edd302..8646f50 100644
--- a/src/component/marker/MarkPointView.ts
+++ b/src/component/marker/MarkPointView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import SymbolDraw from '../../chart/helper/SymbolDraw';
 import * as numberUtil from '../../util/number';
diff --git a/src/component/marker/MarkerView.ts b/src/component/marker/MarkerView.ts
index 67e7418..1aaecf8 100644
--- a/src/component/marker/MarkerView.ts
+++ b/src/component/marker/MarkerView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 
diff --git a/src/component/marker/markerHelper.ts b/src/component/marker/markerHelper.ts
index c571b85..e57bb17 100644
--- a/src/component/marker/markerHelper.ts
+++ b/src/component/marker/markerHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as numberUtil from '../../util/number';
 import {isDimensionStacked} from '../../data/helper/dataStackHelper';
diff --git a/src/component/parallel.ts b/src/component/parallel.ts
index fffa8ae..cea1a7d 100644
--- a/src/component/parallel.ts
+++ b/src/component/parallel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as throttleUtil from '../util/throttle';
diff --git a/src/component/polar.ts b/src/component/polar.ts
index 398015c..d84672f 100644
--- a/src/component/polar.ts
+++ b/src/component/polar.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import barPolar from '../layout/barPolar';
diff --git a/src/component/radar/RadarView.ts b/src/component/radar/RadarView.ts
index 8f7475c..22fe86e 100644
--- a/src/component/radar/RadarView.ts
+++ b/src/component/radar/RadarView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/component/singleAxis.ts b/src/component/singleAxis.ts
index 0723b33..503351c 100644
--- a/src/component/singleAxis.ts
+++ b/src/component/singleAxis.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../echarts';
 
 import '../coord/single/singleCreator';
diff --git a/src/component/timeline/SliderTimelineView.ts b/src/component/timeline/SliderTimelineView.ts
index f88c9da..b616139 100644
--- a/src/component/timeline/SliderTimelineView.ts
+++ b/src/component/timeline/SliderTimelineView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import BoundingRect from 'zrender/src/core/BoundingRect';
 import * as matrix from 'zrender/src/core/matrix';
diff --git a/src/component/timeline/TimelineAxis.ts b/src/component/timeline/TimelineAxis.ts
index 0dc6f27..e6216a3 100644
--- a/src/component/timeline/TimelineAxis.ts
+++ b/src/component/timeline/TimelineAxis.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import Axis from '../../coord/Axis';
 
diff --git a/src/component/timeline/TimelineModel.ts b/src/component/timeline/TimelineModel.ts
index 9003667..de9a73c 100644
--- a/src/component/timeline/TimelineModel.ts
+++ b/src/component/timeline/TimelineModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import ComponentModel from '../../model/Component';
 import List from '../../data/List';
diff --git a/src/component/timeline/TimelineView.ts b/src/component/timeline/TimelineView.ts
index 18f9d14..a97737d 100644
--- a/src/component/timeline/TimelineView.ts
+++ b/src/component/timeline/TimelineView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import ComponentView from '../../view/Component';
 
 export default ComponentView.extend({
diff --git a/src/component/timeline/preprocessor.ts b/src/component/timeline/preprocessor.ts
index dc46ec7..abf1c70 100644
--- a/src/component/timeline/preprocessor.ts
+++ b/src/component/timeline/preprocessor.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 export default function (option) {
diff --git a/src/component/timeline/timelineAction.ts b/src/component/timeline/timelineAction.ts
index 86f1f28..5c3aa99 100644
--- a/src/component/timeline/timelineAction.ts
+++ b/src/component/timeline/timelineAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 
diff --git a/src/component/timeline/typeDefaulter.ts b/src/component/timeline/typeDefaulter.ts
index f353f4c..0fad23c 100644
--- a/src/component/timeline/typeDefaulter.ts
+++ b/src/component/timeline/typeDefaulter.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import Component from '../../model/Component';
 
 Component.registerSubTypeDefaulter('timeline', function () {
diff --git a/src/component/title.ts b/src/component/title.ts
index 5dc5fff..329c3c8 100644
--- a/src/component/title.ts
+++ b/src/component/title.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as echarts from '../echarts';
 import * as graphic from '../util/graphic';
diff --git a/src/component/toolbox/ToolboxModel.ts b/src/component/toolbox/ToolboxModel.ts
index f647409..7b15220 100644
--- a/src/component/toolbox/ToolboxModel.ts
+++ b/src/component/toolbox/ToolboxModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as featureManager from './featureManager';
diff --git a/src/component/toolbox/ToolboxView.ts b/src/component/toolbox/ToolboxView.ts
index 25b079e..86d69fa 100644
--- a/src/component/toolbox/ToolboxView.ts
+++ b/src/component/toolbox/ToolboxView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as textContain from 'zrender/src/contain/text';
diff --git a/src/component/toolbox/feature/Brush.ts b/src/component/toolbox/feature/Brush.ts
index 16b2a49..3ba43a5 100644
--- a/src/component/toolbox/feature/Brush.ts
+++ b/src/component/toolbox/feature/Brush.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as featureManager from '../featureManager';
 import lang from '../../../lang';
diff --git a/src/component/toolbox/feature/DataView.ts b/src/component/toolbox/feature/DataView.ts
index a3206f8..e9ef708 100644
--- a/src/component/toolbox/feature/DataView.ts
+++ b/src/component/toolbox/feature/DataView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as eventTool from 'zrender/src/core/event';
diff --git a/src/component/toolbox/feature/DataZoom.ts b/src/component/toolbox/feature/DataZoom.ts
index 2ef98f8..b1f0741 100644
--- a/src/component/toolbox/feature/DataZoom.ts
+++ b/src/component/toolbox/feature/DataZoom.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import BrushController from '../../helper/BrushController';
diff --git a/src/component/toolbox/feature/MagicType.ts b/src/component/toolbox/feature/MagicType.ts
index 326db37..ee552e1 100644
--- a/src/component/toolbox/feature/MagicType.ts
+++ b/src/component/toolbox/feature/MagicType.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import lang from '../../../lang';
diff --git a/src/component/toolbox/feature/Restore.ts b/src/component/toolbox/feature/Restore.ts
index 6ab305f..ac5f217 100644
--- a/src/component/toolbox/feature/Restore.ts
+++ b/src/component/toolbox/feature/Restore.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../../echarts';
 import * as history from '../../dataZoom/history';
 import lang from '../../../lang';
diff --git a/src/component/toolbox/feature/SaveAsImage.ts b/src/component/toolbox/feature/SaveAsImage.ts
index d81a06d..d876a12 100644
--- a/src/component/toolbox/feature/SaveAsImage.ts
+++ b/src/component/toolbox/feature/SaveAsImage.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /* global Uint8Array */
 
 import env from 'zrender/src/core/env';
diff --git a/src/component/toolbox/featureManager.ts b/src/component/toolbox/featureManager.ts
index e21005a..dc1e19d 100644
--- a/src/component/toolbox/featureManager.ts
+++ b/src/component/toolbox/featureManager.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 
 var features = {};
 
diff --git a/src/component/tooltip.ts b/src/component/tooltip.ts
index 31176e8..ef88016 100644
--- a/src/component/tooltip.ts
+++ b/src/component/tooltip.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // FIXME Better way to pack data in graphic element
 
 import * as echarts from '../echarts';
diff --git a/src/component/tooltip/TooltipContent.ts b/src/component/tooltip/TooltipContent.ts
index 6cdbc3f..2b94d4e 100644
--- a/src/component/tooltip/TooltipContent.ts
+++ b/src/component/tooltip/TooltipContent.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as zrColor from 'zrender/src/tool/color';
 import * as eventUtil from 'zrender/src/core/event';
diff --git a/src/component/tooltip/TooltipModel.ts b/src/component/tooltip/TooltipModel.ts
index 0b8c77e..0e18f79 100644
--- a/src/component/tooltip/TooltipModel.ts
+++ b/src/component/tooltip/TooltipModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 
 export default echarts.extendComponentModel({
diff --git a/src/component/tooltip/TooltipRichContent.ts b/src/component/tooltip/TooltipRichContent.ts
index f6830ff..48b33ef 100644
--- a/src/component/tooltip/TooltipRichContent.ts
+++ b/src/component/tooltip/TooltipRichContent.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 // import Group from 'zrender/src/container/Group';
 import Text from 'zrender/src/graphic/Text';
diff --git a/src/component/tooltip/TooltipView.ts b/src/component/tooltip/TooltipView.ts
index 8fa9981..366b843 100644
--- a/src/component/tooltip/TooltipView.ts
+++ b/src/component/tooltip/TooltipView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import env from 'zrender/src/core/env';
diff --git a/src/component/visualMap/ContinuousModel.ts b/src/component/visualMap/ContinuousModel.ts
index 840101c..6e91c6a 100644
--- a/src/component/visualMap/ContinuousModel.ts
+++ b/src/component/visualMap/ContinuousModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import VisualMapModel from './VisualMapModel';
 import * as numberUtil from '../../util/number';
diff --git a/src/component/visualMap/ContinuousView.ts b/src/component/visualMap/ContinuousView.ts
index a765203..f2bdc71 100644
--- a/src/component/visualMap/ContinuousView.ts
+++ b/src/component/visualMap/ContinuousView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import LinearGradient from 'zrender/src/graphic/LinearGradient';
 import * as eventTool from 'zrender/src/core/event';
diff --git a/src/component/visualMap/PiecewiseModel.ts b/src/component/visualMap/PiecewiseModel.ts
index df03ed0..744ea70 100644
--- a/src/component/visualMap/PiecewiseModel.ts
+++ b/src/component/visualMap/PiecewiseModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as zrUtil from 'zrender/src/core/util';
 import VisualMapModel from './VisualMapModel';
diff --git a/src/component/visualMap/PiecewiseView.ts b/src/component/visualMap/PiecewiseView.ts
index eceb66f..de31858 100644
--- a/src/component/visualMap/PiecewiseView.ts
+++ b/src/component/visualMap/PiecewiseView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import VisualMapView from './VisualMapView';
 import * as graphic from '../../util/graphic';
diff --git a/src/component/visualMap/VisualMapModel.ts b/src/component/visualMap/VisualMapModel.ts
index a40973e..262b22c 100644
--- a/src/component/visualMap/VisualMapModel.ts
+++ b/src/component/visualMap/VisualMapModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import env from 'zrender/src/core/env';
diff --git a/src/component/visualMap/VisualMapView.ts b/src/component/visualMap/VisualMapView.ts
index 2c3e5c8..17273df 100644
--- a/src/component/visualMap/VisualMapView.ts
+++ b/src/component/visualMap/VisualMapView.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
diff --git a/src/component/visualMap/helper.ts b/src/component/visualMap/helper.ts
index 4f35a11..8c50dca 100644
--- a/src/component/visualMap/helper.ts
+++ b/src/component/visualMap/helper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import {getLayoutRect} from '../../util/layout';
 
diff --git a/src/component/visualMap/preprocessor.ts b/src/component/visualMap/preprocessor.ts
index 5975e13..9992ce1 100644
--- a/src/component/visualMap/preprocessor.ts
+++ b/src/component/visualMap/preprocessor.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 var each = zrUtil.each;
diff --git a/src/component/visualMap/typeDefaulter.ts b/src/component/visualMap/typeDefaulter.ts
index e2e689f..e3b9993 100644
--- a/src/component/visualMap/typeDefaulter.ts
+++ b/src/component/visualMap/typeDefaulter.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import Component from '../../model/Component';
 
 Component.registerSubTypeDefaulter('visualMap', function (option) {
diff --git a/src/component/visualMap/visualEncoding.ts b/src/component/visualMap/visualEncoding.ts
index 02a9e4e..df2377d 100644
--- a/src/component/visualMap/visualEncoding.ts
+++ b/src/component/visualMap/visualEncoding.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import * as visualSolution from '../../visual/visualSolution';
diff --git a/src/component/visualMap/visualMapAction.ts b/src/component/visualMap/visualMapAction.ts
index 7e42d49..9cb2e88 100644
--- a/src/component/visualMap/visualMapAction.ts
+++ b/src/component/visualMap/visualMapAction.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 
 var actionInfo = {
diff --git a/src/coord/Axis.ts b/src/coord/Axis.ts
index e1efc45..7cf0c0c 100644
--- a/src/coord/Axis.ts
+++ b/src/coord/Axis.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {each, map} from 'zrender/src/core/util';
 import {linearMap, getPixelPrecision, round} from '../util/number';
 import {
diff --git a/src/coord/axisDefault.ts b/src/coord/axisDefault.ts
index 90a00a0..48e48bc 100644
--- a/src/coord/axisDefault.ts
+++ b/src/coord/axisDefault.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 var defaultOption = {
diff --git a/src/coord/axisHelper.ts b/src/coord/axisHelper.ts
index a0e2a13..071bdde 100644
--- a/src/coord/axisHelper.ts
+++ b/src/coord/axisHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../config';
 import * as zrUtil from 'zrender/src/core/util';
 import OrdinalScale from '../scale/Ordinal';
diff --git a/src/coord/axisModelCommonMixin.ts b/src/coord/axisModelCommonMixin.ts
index 8b22438..be8d31b 100644
--- a/src/coord/axisModelCommonMixin.ts
+++ b/src/coord/axisModelCommonMixin.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 // import * as axisHelper from './axisHelper';
 
diff --git a/src/coord/axisModelCreator.ts b/src/coord/axisModelCreator.ts
index bd9116a..eb58bd8 100644
--- a/src/coord/axisModelCreator.ts
+++ b/src/coord/axisModelCreator.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import axisDefault from './axisDefault';
 import ComponentModel from '../model/Component';
diff --git a/src/coord/axisTickLabelBuilder.ts b/src/coord/axisTickLabelBuilder.ts
index f6ca367..139c676 100644
--- a/src/coord/axisTickLabelBuilder.ts
+++ b/src/coord/axisTickLabelBuilder.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as textContain from 'zrender/src/contain/text';
 import {makeInner} from '../util/model';
diff --git a/src/coord/calendar/Calendar.ts b/src/coord/calendar/Calendar.ts
index 923841b..9ae0c16 100644
--- a/src/coord/calendar/Calendar.ts
+++ b/src/coord/calendar/Calendar.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as layout from '../../util/layout';
 import * as numberUtil from '../../util/number';
diff --git a/src/coord/calendar/CalendarModel.ts b/src/coord/calendar/CalendarModel.ts
index 496a456..d30946b 100644
--- a/src/coord/calendar/CalendarModel.ts
+++ b/src/coord/calendar/CalendarModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import ComponentModel from '../../model/Component';
 import {
diff --git a/src/coord/calendar/prepareCustom.ts b/src/coord/calendar/prepareCustom.ts
index 2e83571..56f9574 100644
--- a/src/coord/calendar/prepareCustom.ts
+++ b/src/coord/calendar/prepareCustom.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 export default function (coordSys) {
     var rect = coordSys.getRect();
     var rangeInfo = coordSys.getRangeInfo();
diff --git a/src/coord/cartesian/Axis2D.ts b/src/coord/cartesian/Axis2D.ts
index 9ac47ce..5853810 100644
--- a/src/coord/cartesian/Axis2D.ts
+++ b/src/coord/cartesian/Axis2D.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import Axis from '../Axis';
 
diff --git a/src/coord/cartesian/AxisModel.ts b/src/coord/cartesian/AxisModel.ts
index 2f12602..ca694f8 100644
--- a/src/coord/cartesian/AxisModel.ts
+++ b/src/coord/cartesian/AxisModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import ComponentModel from '../../model/Component';
 import axisModelCreator from '../axisModelCreator';
diff --git a/src/coord/cartesian/Cartesian.ts b/src/coord/cartesian/Cartesian.ts
index 37b30e8..e0af14d 100644
--- a/src/coord/cartesian/Cartesian.ts
+++ b/src/coord/cartesian/Cartesian.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Cartesian coordinate system
  * @module  echarts/coord/Cartesian
diff --git a/src/coord/cartesian/Cartesian2D.ts b/src/coord/cartesian/Cartesian2D.ts
index a162d2e..7287e23 100644
--- a/src/coord/cartesian/Cartesian2D.ts
+++ b/src/coord/cartesian/Cartesian2D.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 
 import * as zrUtil from 'zrender/src/core/util';
 import BoundingRect from 'zrender/src/core/BoundingRect';
diff --git a/src/coord/cartesian/Grid.ts b/src/coord/cartesian/Grid.ts
index 082e327..268ffec 100644
--- a/src/coord/cartesian/Grid.ts
+++ b/src/coord/cartesian/Grid.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Grid is a region which contains at most 4 cartesian systems
  *
diff --git a/src/coord/cartesian/GridModel.ts b/src/coord/cartesian/GridModel.ts
index 7a50e18..51e503c 100644
--- a/src/coord/cartesian/GridModel.ts
+++ b/src/coord/cartesian/GridModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // Grid 是在有直角坐标系的时候必须要存在的
 // 所以这里也要被 Cartesian2D 依赖
 
diff --git a/src/coord/cartesian/cartesianAxisHelper.ts b/src/coord/cartesian/cartesianAxisHelper.ts
index 85d4870..6ea3d06 100644
--- a/src/coord/cartesian/cartesianAxisHelper.ts
+++ b/src/coord/cartesian/cartesianAxisHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 /**
diff --git a/src/coord/cartesian/prepareCustom.ts b/src/coord/cartesian/prepareCustom.ts
index 9b0a8e4..9dc2d45 100644
--- a/src/coord/cartesian/prepareCustom.ts
+++ b/src/coord/cartesian/prepareCustom.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 function dataToCoordSize(dataSize, dataItem) {
diff --git a/src/coord/geo/Geo.ts b/src/coord/geo/Geo.ts
index 6a87274..6cf370f 100644
--- a/src/coord/geo/Geo.ts
+++ b/src/coord/geo/Geo.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import BoundingRect from 'zrender/src/core/BoundingRect';
 import View from '../View';
diff --git a/src/coord/geo/GeoModel.ts b/src/coord/geo/GeoModel.ts
index 528b48a..341c422 100644
--- a/src/coord/geo/GeoModel.ts
+++ b/src/coord/geo/GeoModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as modelUtil from '../../util/model';
 import ComponentModel from '../../model/Component';
diff --git a/src/coord/geo/Region.ts b/src/coord/geo/Region.ts
index 997f395..8b545d3 100644
--- a/src/coord/geo/Region.ts
+++ b/src/coord/geo/Region.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @module echarts/coord/geo/Region
  */
diff --git a/src/coord/geo/fix/diaoyuIsland.ts b/src/coord/geo/fix/diaoyuIsland.ts
index 87b3f57..756a6fe 100644
--- a/src/coord/geo/fix/diaoyuIsland.ts
+++ b/src/coord/geo/fix/diaoyuIsland.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // Fix for 钓鱼岛
 
 // var Region = require('../Region');
diff --git a/src/coord/geo/fix/geoCoord.ts b/src/coord/geo/fix/geoCoord.ts
index b6e7080..f2ff5f8 100644
--- a/src/coord/geo/fix/geoCoord.ts
+++ b/src/coord/geo/fix/geoCoord.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 var geoCoordMap = {
     'Russia': [100, 60],
     'United States': [-99, 38],
diff --git a/src/coord/geo/fix/nanhai.ts b/src/coord/geo/fix/nanhai.ts
index bdcfe18..4bdfc74 100644
--- a/src/coord/geo/fix/nanhai.ts
+++ b/src/coord/geo/fix/nanhai.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // Fix for 南海诸岛
 
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/coord/geo/fix/textCoord.ts b/src/coord/geo/fix/textCoord.ts
index fa339f6..e1eaa9e 100644
--- a/src/coord/geo/fix/textCoord.ts
+++ b/src/coord/geo/fix/textCoord.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 var coordsOffsetMap = {
     '南海诸岛': [32, 80],
     // 全国
diff --git a/src/coord/geo/geoCreator.ts b/src/coord/geo/geoCreator.ts
index 73b3346..aac7428 100644
--- a/src/coord/geo/geoCreator.ts
+++ b/src/coord/geo/geoCreator.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/coord/geo/geoJSONLoader.ts b/src/coord/geo/geoJSONLoader.ts
index 381c1f9..3ec80f7 100644
--- a/src/coord/geo/geoJSONLoader.ts
+++ b/src/coord/geo/geoJSONLoader.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {each} from 'zrender/src/core/util';
 import parseGeoJson from './parseGeoJson';
 import {makeInner} from '../../util/model';
diff --git a/src/coord/geo/geoSVGLoader.ts b/src/coord/geo/geoSVGLoader.ts
index 98eab03..f735f8a 100644
--- a/src/coord/geo/geoSVGLoader.ts
+++ b/src/coord/geo/geoSVGLoader.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {parseSVG, makeViewBoxTransform} from 'zrender/src/tool/parseSVG';
 import Group from 'zrender/src/container/Group';
 import Rect from 'zrender/src/graphic/shape/Rect';
diff --git a/src/coord/geo/geoSourceManager.ts b/src/coord/geo/geoSourceManager.ts
index 0de59c1..07554ac 100644
--- a/src/coord/geo/geoSourceManager.ts
+++ b/src/coord/geo/geoSourceManager.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import {each, createHashMap} from 'zrender/src/core/util';
 import mapDataStorage from './mapDataStorage';
diff --git a/src/coord/geo/parseGeoJson.ts b/src/coord/geo/parseGeoJson.ts
index 3f91a27..7bb5aef 100644
--- a/src/coord/geo/parseGeoJson.ts
+++ b/src/coord/geo/parseGeoJson.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Parse and decode geo json
  * @module echarts/coord/geo/parseGeoJson
diff --git a/src/coord/geo/prepareCustom.ts b/src/coord/geo/prepareCustom.ts
index 1cccc2b..8d329a8 100644
--- a/src/coord/geo/prepareCustom.ts
+++ b/src/coord/geo/prepareCustom.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 function dataToCoordSize(dataSize, dataItem) {
diff --git a/src/coord/parallel/AxisModel.ts b/src/coord/parallel/AxisModel.ts
index 55e4ae9..657ffc2 100644
--- a/src/coord/parallel/AxisModel.ts
+++ b/src/coord/parallel/AxisModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import ComponentModel from '../../model/Component';
 import makeStyleMapper from '../../model/mixin/makeStyleMapper';
diff --git a/src/coord/parallel/Parallel.ts b/src/coord/parallel/Parallel.ts
index b74d13b..0959806 100644
--- a/src/coord/parallel/Parallel.ts
+++ b/src/coord/parallel/Parallel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Parallel Coordinates
  * <https://en.wikipedia.org/wiki/Parallel_coordinates>
diff --git a/src/coord/parallel/ParallelAxis.ts b/src/coord/parallel/ParallelAxis.ts
index c37ab96..b159cac 100644
--- a/src/coord/parallel/ParallelAxis.ts
+++ b/src/coord/parallel/ParallelAxis.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import Axis from '../Axis';
 
diff --git a/src/coord/parallel/ParallelModel.ts b/src/coord/parallel/ParallelModel.ts
index 8e608ee..63ef628 100644
--- a/src/coord/parallel/ParallelModel.ts
+++ b/src/coord/parallel/ParallelModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import Component from '../../model/Component';
 
diff --git a/src/coord/parallel/parallelCreator.ts b/src/coord/parallel/parallelCreator.ts
index bdedd03..3d853e5 100644
--- a/src/coord/parallel/parallelCreator.ts
+++ b/src/coord/parallel/parallelCreator.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Parallel coordinate system creater.
  */
diff --git a/src/coord/parallel/parallelPreprocessor.ts b/src/coord/parallel/parallelPreprocessor.ts
index ff68d69..50cc870 100644
--- a/src/coord/parallel/parallelPreprocessor.ts
+++ b/src/coord/parallel/parallelPreprocessor.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as modelUtil from '../../util/model';
 
diff --git a/src/coord/polar/AngleAxis.ts b/src/coord/polar/AngleAxis.ts
index 1dae806..69d025b 100644
--- a/src/coord/polar/AngleAxis.ts
+++ b/src/coord/polar/AngleAxis.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as textContain from 'zrender/src/contain/text';
 import Axis from '../Axis';
diff --git a/src/coord/polar/AxisModel.ts b/src/coord/polar/AxisModel.ts
index 61b7d58..cc4aa6e 100644
--- a/src/coord/polar/AxisModel.ts
+++ b/src/coord/polar/AxisModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import ComponentModel from '../../model/Component';
 import axisModelCreator from '../axisModelCreator';
diff --git a/src/coord/polar/Polar.ts b/src/coord/polar/Polar.ts
index 5e21ac7..ebf1024 100644
--- a/src/coord/polar/Polar.ts
+++ b/src/coord/polar/Polar.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @module echarts/coord/polar/Polar
  */
diff --git a/src/coord/polar/PolarModel.ts b/src/coord/polar/PolarModel.ts
index 8bcfd5d..aded158 100644
--- a/src/coord/polar/PolarModel.ts
+++ b/src/coord/polar/PolarModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import './AxisModel';
 
diff --git a/src/coord/polar/RadiusAxis.ts b/src/coord/polar/RadiusAxis.ts
index 3f15e71..2068a7a 100644
--- a/src/coord/polar/RadiusAxis.ts
+++ b/src/coord/polar/RadiusAxis.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import Axis from '../Axis';
 
diff --git a/src/coord/polar/polarCreator.ts b/src/coord/polar/polarCreator.ts
index 156f97f..012972d 100644
--- a/src/coord/polar/polarCreator.ts
+++ b/src/coord/polar/polarCreator.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // TODO Axis scale
 
 import {__DEV__} from '../../config';
diff --git a/src/coord/polar/prepareCustom.ts b/src/coord/polar/prepareCustom.ts
index e3382fe..16d02b4 100644
--- a/src/coord/polar/prepareCustom.ts
+++ b/src/coord/polar/prepareCustom.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 function dataToCoordSize(dataSize, dataItem) {
diff --git a/src/coord/radar/IndicatorAxis.ts b/src/coord/radar/IndicatorAxis.ts
index 8648186..e1b3fc0 100644
--- a/src/coord/radar/IndicatorAxis.ts
+++ b/src/coord/radar/IndicatorAxis.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import Axis from '../Axis';
 
diff --git a/src/coord/radar/Radar.ts b/src/coord/radar/Radar.ts
index aebc896..624dfd6 100644
--- a/src/coord/radar/Radar.ts
+++ b/src/coord/radar/Radar.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // TODO clockwise
 
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/coord/radar/RadarModel.ts b/src/coord/radar/RadarModel.ts
index c7e7196..60fb13d 100644
--- a/src/coord/radar/RadarModel.ts
+++ b/src/coord/radar/RadarModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import axisDefault from '../axisDefault';
diff --git a/src/coord/single/AxisModel.ts b/src/coord/single/AxisModel.ts
index c11cb57..8de72e9 100644
--- a/src/coord/single/AxisModel.ts
+++ b/src/coord/single/AxisModel.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import ComponentModel from '../../model/Component';
 import axisModelCreator from '../axisModelCreator';
diff --git a/src/coord/single/Single.ts b/src/coord/single/Single.ts
index de11a6f..4df9773 100644
--- a/src/coord/single/Single.ts
+++ b/src/coord/single/Single.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Single coordinates system.
  */
diff --git a/src/coord/single/SingleAxis.ts b/src/coord/single/SingleAxis.ts
index 9ba9563..9ea24b2 100644
--- a/src/coord/single/SingleAxis.ts
+++ b/src/coord/single/SingleAxis.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import Axis from '../Axis';
 
diff --git a/src/coord/single/prepareCustom.ts b/src/coord/single/prepareCustom.ts
index a3ab002..602d153 100644
--- a/src/coord/single/prepareCustom.ts
+++ b/src/coord/single/prepareCustom.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 function dataToCoordSize(dataSize, dataItem) {
diff --git a/src/coord/single/singleAxisHelper.ts b/src/coord/single/singleAxisHelper.ts
index fa44fda..af2fba5 100644
--- a/src/coord/single/singleAxisHelper.ts
+++ b/src/coord/single/singleAxisHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 /**
diff --git a/src/coord/single/singleCreator.ts b/src/coord/single/singleCreator.ts
index 8b4547d..d7f8546 100644
--- a/src/coord/single/singleCreator.ts
+++ b/src/coord/single/singleCreator.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Single coordinate system creator.
  */
diff --git a/src/data/Graph.ts b/src/data/Graph.ts
index 17b10b7..b963d1b 100644
--- a/src/data/Graph.ts
+++ b/src/data/Graph.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../config';
 import * as zrUtil from 'zrender/src/core/util';
 import {enableClassCheck} from '../util/clazz';
diff --git a/src/data/Tree.ts b/src/data/Tree.ts
index 85b41a2..61f24cb 100644
--- a/src/data/Tree.ts
+++ b/src/data/Tree.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Tree data structure
  *
diff --git a/src/data/helper/createDimensions.ts b/src/data/helper/createDimensions.ts
index ec52fd5..e159c77 100644
--- a/src/data/helper/createDimensions.ts
+++ b/src/data/helper/createDimensions.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Substitute `completeDimensions`.
  * `completeDimensions` is to be deprecated.
diff --git a/src/data/helper/dataStackHelper.ts b/src/data/helper/dataStackHelper.ts
index d0c9145..c3c45fc 100644
--- a/src/data/helper/dataStackHelper.ts
+++ b/src/data/helper/dataStackHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {each, isString} from 'zrender/src/core/util';
 
 /**
diff --git a/src/data/helper/linkList.ts b/src/data/helper/linkList.ts
index a5a2385..250933e 100644
--- a/src/data/helper/linkList.ts
+++ b/src/data/helper/linkList.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Link lists and struct (graph or tree)
  */
diff --git a/src/helper.ts b/src/helper.ts
index 43c55f6..9f2d369 100644
--- a/src/helper.ts
+++ b/src/helper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import createListFromArray from './chart/helper/createListFromArray';
 // import createGraphFromNodeEdge from './chart/helper/createGraphFromNodeEdge';
diff --git a/src/layout/barGrid.ts b/src/layout/barGrid.ts
index e7947eb..e17ba6c 100644
--- a/src/layout/barGrid.ts
+++ b/src/layout/barGrid.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /* global Float32Array */
 
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/layout/barPolar.ts b/src/layout/barPolar.ts
index 2aebd93..6d5701e 100644
--- a/src/layout/barPolar.ts
+++ b/src/layout/barPolar.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import {parsePercent} from '../util/number';
 import {isDimensionStacked} from '../data/helper/dataStackHelper';
diff --git a/src/layout/points.ts b/src/layout/points.ts
index ef85e7a..aa3b1fc 100644
--- a/src/layout/points.ts
+++ b/src/layout/points.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /* global Float32Array */
 
 import {map} from 'zrender/src/core/util';
diff --git a/src/model/mixin/areaStyle.ts b/src/model/mixin/areaStyle.ts
index 5665e6a..40caadf 100644
--- a/src/model/mixin/areaStyle.ts
+++ b/src/model/mixin/areaStyle.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import makeStyleMapper from './makeStyleMapper';
 
 var getAreaStyle = makeStyleMapper(
diff --git a/src/model/mixin/boxLayout.ts b/src/model/mixin/boxLayout.ts
index 6338f44..f012468 100644
--- a/src/model/mixin/boxLayout.ts
+++ b/src/model/mixin/boxLayout.ts
@@ -17,6 +17,7 @@
 * under the License.
 */
 
+// @ts-nocheck
 
 export default {
     getBoxLayoutParams: function () {
diff --git a/src/model/mixin/itemStyle.ts b/src/model/mixin/itemStyle.ts
index 0fd1285..8875635 100644
--- a/src/model/mixin/itemStyle.ts
+++ b/src/model/mixin/itemStyle.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import makeStyleMapper from './makeStyleMapper';
 
 var getItemStyle = makeStyleMapper(
diff --git a/src/model/mixin/lineStyle.ts b/src/model/mixin/lineStyle.ts
index 99b3f7c..1925d57 100644
--- a/src/model/mixin/lineStyle.ts
+++ b/src/model/mixin/lineStyle.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import makeStyleMapper from './makeStyleMapper';
 
 var getLineStyle = makeStyleMapper(
diff --git a/src/model/mixin/makeStyleMapper.ts b/src/model/mixin/makeStyleMapper.ts
index b4fdcfe..319cd38 100644
--- a/src/model/mixin/makeStyleMapper.ts
+++ b/src/model/mixin/makeStyleMapper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // TODO Parse shadow style
 // TODO Only shallow path support
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/model/mixin/textStyle.ts b/src/model/mixin/textStyle.ts
index 67ddb45..f0e021e 100644
--- a/src/model/mixin/textStyle.ts
+++ b/src/model/mixin/textStyle.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as textContain from 'zrender/src/contain/text';
 import * as graphicUtil from '../../util/graphic';
 
diff --git a/src/model/referHelper.ts b/src/model/referHelper.ts
index ec9dc8f..bf83bbd 100644
--- a/src/model/referHelper.ts
+++ b/src/model/referHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Helper for model references.
  * There are many manners to refer axis/coordSys.
diff --git a/src/preprocessor/backwardCompat.ts b/src/preprocessor/backwardCompat.ts
index 50f09e8..88ef5c5 100644
--- a/src/preprocessor/backwardCompat.ts
+++ b/src/preprocessor/backwardCompat.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // Compatitable with 2.0
 
 import {each, isArray, isObject} from 'zrender/src/core/util';
diff --git a/src/preprocessor/helper/compatStyle.ts b/src/preprocessor/helper/compatStyle.ts
index c338d66..f36c7f8 100644
--- a/src/preprocessor/helper/compatStyle.ts
+++ b/src/preprocessor/helper/compatStyle.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as modelUtil from '../../util/model';
 
diff --git a/src/processor/dataFilter.ts b/src/processor/dataFilter.ts
index 60bbbd7..7ef78bf 100644
--- a/src/processor/dataFilter.ts
+++ b/src/processor/dataFilter.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 export default function (seriesType) {
     return {
         seriesType: seriesType,
diff --git a/src/processor/dataStack.ts b/src/processor/dataStack.ts
index 360dd21..76d5e47 100644
--- a/src/processor/dataStack.ts
+++ b/src/processor/dataStack.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {createHashMap, each} from 'zrender/src/core/util';
 
 // (1) [Caution]: the logic is correct based on the premises:
diff --git a/src/scale/Interval.ts b/src/scale/Interval.ts
index afe54e0..1fd3fbc 100644
--- a/src/scale/Interval.ts
+++ b/src/scale/Interval.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Interval scale
  * @module echarts/scale/Interval
diff --git a/src/scale/Log.ts b/src/scale/Log.ts
index 30ed833..9f28d3c 100644
--- a/src/scale/Log.ts
+++ b/src/scale/Log.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Log scale
  * @module echarts/scale/Log
diff --git a/src/scale/Ordinal.ts b/src/scale/Ordinal.ts
index ef1246c..4eae3db 100644
--- a/src/scale/Ordinal.ts
+++ b/src/scale/Ordinal.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Linear continuous scale
  * @module echarts/coord/scale/Ordinal
diff --git a/src/scale/Scale.ts b/src/scale/Scale.ts
index bd1e9c8..5203002 100644
--- a/src/scale/Scale.ts
+++ b/src/scale/Scale.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * // Scale class management
  * @module echarts/scale/Scale
diff --git a/src/scale/Time.ts b/src/scale/Time.ts
index 7ce120d..11aaa52 100644
--- a/src/scale/Time.ts
+++ b/src/scale/Time.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /*
 * A third-party license is embeded for some of the code in this file:
 * The "scaleLevels" was originally copied from "d3.js" with some
diff --git a/src/scale/helper.ts b/src/scale/helper.ts
index beaf80b..bd8be72 100644
--- a/src/scale/helper.ts
+++ b/src/scale/helper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * For testable.
  */
diff --git a/src/theme/dark.ts b/src/theme/dark.ts
index f3fa025..d97a787 100644
--- a/src/theme/dark.ts
+++ b/src/theme/dark.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 var contrastColor = '#eee';
 var axisCommon = function () {
     return {
diff --git a/src/util/KDTree.ts b/src/util/KDTree.ts
index 8f5f8ee..12defbd 100644
--- a/src/util/KDTree.ts
+++ b/src/util/KDTree.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import quickSelect from './quickSelect';
 
 function Node(axis, data) {
diff --git a/src/util/animation.ts b/src/util/animation.ts
index 367de52..522b61c 100644
--- a/src/util/animation.ts
+++ b/src/util/animation.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 
 /**
diff --git a/src/util/layout.ts b/src/util/layout.ts
index cab9acf..b585eba 100644
--- a/src/util/layout.ts
+++ b/src/util/layout.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // Layout helpers for each component positioning
 
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/util/number.ts b/src/util/number.ts
index cf84e9a..3a16456 100644
--- a/src/util/number.ts
+++ b/src/util/number.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /*
 * A third-party license is embeded for some of the code in this file:
 * The method "quantile" was copied from "d3.js".
diff --git a/src/util/quickSelect.ts b/src/util/quickSelect.ts
index 0e11d6f..cfaf0f4 100644
--- a/src/util/quickSelect.ts
+++ b/src/util/quickSelect.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Quick select n-th element in an array.
  *
diff --git a/src/util/shape/sausage.ts b/src/util/shape/sausage.ts
index 48983c8..d2512fb 100644
--- a/src/util/shape/sausage.ts
+++ b/src/util/shape/sausage.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {extendShape} from '../graphic';
 
 /**
diff --git a/src/util/symbol.ts b/src/util/symbol.ts
index 602ebfb..371bb07 100644
--- a/src/util/symbol.ts
+++ b/src/util/symbol.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 // Symbol factory
 
 import * as zrUtil from 'zrender/src/core/util';
diff --git a/src/visual/VisualMapping.ts b/src/visual/VisualMapping.ts
index e0bd0f1..0ceb986 100644
--- a/src/visual/VisualMapping.ts
+++ b/src/visual/VisualMapping.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import * as zrColor from 'zrender/src/tool/color';
 import {linearMap} from '../util/number';
diff --git a/src/visual/aria.ts b/src/visual/aria.ts
index abd655c..d1c9eeb 100644
--- a/src/visual/aria.ts
+++ b/src/visual/aria.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import lang from '../lang';
 import { retrieveRawValue } from '../data/helper/dataProvider';
diff --git a/src/visual/seriesColor.ts b/src/visual/seriesColor.ts
index be23206..d95ad67 100644
--- a/src/visual/seriesColor.ts
+++ b/src/visual/seriesColor.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import Gradient from 'zrender/src/graphic/Gradient';
 import {isFunction} from 'zrender/src/core/util';
 
diff --git a/src/visual/symbol.ts b/src/visual/symbol.ts
index 8cd7e06..04af7fd 100644
--- a/src/visual/symbol.ts
+++ b/src/visual/symbol.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {isFunction} from 'zrender/src/core/util';
 
 export default function (seriesType, defaultSymbolType, legendSymbol) {
diff --git a/src/visual/visualDefault.ts b/src/visual/visualDefault.ts
index 457b9ea..a3067e4 100644
--- a/src/visual/visualDefault.ts
+++ b/src/visual/visualDefault.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @file Visual mapping.
  */
diff --git a/src/visual/visualSolution.ts b/src/visual/visualSolution.ts
index 46bc3b6..66341af 100644
--- a/src/visual/visualSolution.ts
+++ b/src/visual/visualSolution.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @file Visual solution, for consistent option specification.
  */


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 03/09: remove npm product from git.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit c21d828cc5a08e4dc39ddc77a8aa839f571da516
Author: 100pah <su...@gmail.com>
AuthorDate: Sat Feb 15 11:26:33 2020 +0800

    remove npm product from git.
---
 index.common.js |  73 ------------------------------
 index.js        | 135 --------------------------------------------------------
 index.simple.js |  38 ----------------
 3 files changed, 246 deletions(-)

diff --git a/index.common.js b/index.common.js
deleted file mode 100644
index 28b776d..0000000
--- a/index.common.js
+++ /dev/null
@@ -1,73 +0,0 @@
-
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-var _echarts = require("./lib/echarts");
-
-(function () {
-  for (var key in _echarts) {
-    if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
-    exports[key] = _echarts[key];
-  }
-})();
-
-var _export = require("./lib/export");
-
-(function () {
-  for (var key in _export) {
-    if (_export == null || !_export.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
-    exports[key] = _export[key];
-  }
-})();
-
-require("./lib/component/dataset");
-
-require("./lib/chart/line");
-
-require("./lib/chart/bar");
-
-require("./lib/chart/pie");
-
-require("./lib/chart/scatter");
-
-require("./lib/component/graphic");
-
-require("./lib/component/tooltip");
-
-require("./lib/component/axisPointer");
-
-require("./lib/component/legendScroll");
-
-require("./lib/component/grid");
-
-require("./lib/component/title");
-
-require("./lib/component/markPoint");
-
-require("./lib/component/markLine");
-
-require("./lib/component/markArea");
-
-require("./lib/component/dataZoom");
-
-require("./lib/component/toolbox");
-
-require("zrender/lib/vml/vml");
-
-require("zrender/lib/svg/svg");
\ No newline at end of file
diff --git a/index.js b/index.js
deleted file mode 100644
index 842d8cd..0000000
--- a/index.js
+++ /dev/null
@@ -1,135 +0,0 @@
-
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-var _echarts = require("./lib/echarts");
-
-(function () {
-  for (var key in _echarts) {
-    if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
-    exports[key] = _echarts[key];
-  }
-})();
-
-var _export = require("./lib/export");
-
-(function () {
-  for (var key in _export) {
-    if (_export == null || !_export.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
-    exports[key] = _export[key];
-  }
-})();
-
-require("./lib/component/dataset");
-
-require("./lib/chart/line");
-
-require("./lib/chart/bar");
-
-require("./lib/chart/pie");
-
-require("./lib/chart/scatter");
-
-require("./lib/chart/radar");
-
-require("./lib/chart/map");
-
-require("./lib/chart/tree");
-
-require("./lib/chart/treemap");
-
-require("./lib/chart/graph");
-
-require("./lib/chart/gauge");
-
-require("./lib/chart/funnel");
-
-require("./lib/chart/parallel");
-
-require("./lib/chart/sankey");
-
-require("./lib/chart/boxplot");
-
-require("./lib/chart/candlestick");
-
-require("./lib/chart/effectScatter");
-
-require("./lib/chart/lines");
-
-require("./lib/chart/heatmap");
-
-require("./lib/chart/pictorialBar");
-
-require("./lib/chart/themeRiver");
-
-require("./lib/chart/sunburst");
-
-require("./lib/chart/custom");
-
-require("./lib/component/grid");
-
-require("./lib/component/polar");
-
-require("./lib/component/geo");
-
-require("./lib/component/singleAxis");
-
-require("./lib/component/parallel");
-
-require("./lib/component/calendar");
-
-require("./lib/component/graphic");
-
-require("./lib/component/toolbox");
-
-require("./lib/component/tooltip");
-
-require("./lib/component/axisPointer");
-
-require("./lib/component/brush");
-
-require("./lib/component/title");
-
-require("./lib/component/timeline");
-
-require("./lib/component/markPoint");
-
-require("./lib/component/markLine");
-
-require("./lib/component/markArea");
-
-require("./lib/component/legendScroll");
-
-require("./lib/component/legend");
-
-require("./lib/component/dataZoom");
-
-require("./lib/component/dataZoomInside");
-
-require("./lib/component/dataZoomSlider");
-
-require("./lib/component/visualMap");
-
-require("./lib/component/visualMapContinuous");
-
-require("./lib/component/visualMapPiecewise");
-
-require("zrender/lib/vml/vml");
-
-require("zrender/lib/svg/svg");
\ No newline at end of file
diff --git a/index.simple.js b/index.simple.js
deleted file mode 100644
index d43dbc3..0000000
--- a/index.simple.js
+++ /dev/null
@@ -1,38 +0,0 @@
-
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-var _echarts = require("./lib/echarts");
-
-(function () {
-  for (var key in _echarts) {
-    if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
-    exports[key] = _echarts[key];
-  }
-})();
-
-require("./lib/component/dataset");
-
-require("./lib/chart/line");
-
-require("./lib/chart/bar");
-
-require("./lib/chart/pie");
-
-require("./lib/component/gridSimple");
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 07/09: tweak build and eslint

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 36cfe7773de5b6225debbedb9d174b938bd470a1
Author: 100pah <su...@gmail.com>
AuthorDate: Mon Feb 17 01:32:48 2020 +0800

    tweak build and eslint
---
 build/build.js     | 13 ++++++-------
 src/.eslintrc.yaml |  6 ++----
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/build/build.js b/build/build.js
index 1be3afd..12f3f82 100755
--- a/build/build.js
+++ b/build/build.js
@@ -392,7 +392,7 @@ var ensureZRenderCode = (function () {
             && fs.lstatSync(nodeModulesZr).isDirectory()
         ) {
             console.log(chalk.blue(`rm -rf dir: ${nodeModulesZr}`));
-            // ensure save.
+            // ensure save for rm -rf.
             assert(nodeModulesZr.includes('node_modules') && nodeModulesZr.includes('zrender'));
             fsExtra.removeSync(nodeModulesZr);
         }
@@ -436,9 +436,10 @@ var ensureZRenderCode = (function () {
 
         clear: function () {
             // Calling guard
-            assert(stats === 'prepared');
+            if (stats === 'cleared') {
+                return;
+            }
             stats = 'cleared';
-
             doClear();
         }
     }
@@ -450,11 +451,7 @@ async function main() {
         await run();
     }
     catch (err) {
-
-        ensureZRenderCode.clear();
-
         console.log(chalk.red('BUILD ERROR!'));
-
         // rollup parse error.
         if (err) {
             if (err.loc) {
@@ -472,6 +469,8 @@ async function main() {
             err.plugin != null && console.warn(chalk.red(`plugin: ${err.plugin}`));
         }
         // console.log(err);
+
+        ensureZRenderCode.clear();
     }
 }
 
diff --git a/src/.eslintrc.yaml b/src/.eslintrc.yaml
index 76be321..136f443 100644
--- a/src/.eslintrc.yaml
+++ b/src/.eslintrc.yaml
@@ -1,7 +1,5 @@
-parserOptions:
-    # If using ES Module, ecmaVersion have to be set as `2015`.
-    ecmaVersion: 2015
-    sourceType: "module"
+parser: "@typescript-eslint/parser"
+plugins: ["@typescript-eslint"]
 env:
     browser: true
     node: true


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 06/09: Migrate to TS -- Part I (some of the basic class and utils) Note: lots of the common type are put in `src/util/types.ts`.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 3229e88e2310d673d52c49c14b8605c85f0860b1
Author: 100pah <su...@gmail.com>
AuthorDate: Mon Feb 17 01:31:44 2020 +0800

    Migrate to TS -- Part I (some of the basic class and utils)
    Note: lots of the common type are put in `src/util/types.ts`.
---
 index.d.ts                                    |    1 +
 src/CoordinateSystem.ts                       |   43 +-
 src/ExtensionAPI.ts                           |   50 +-
 src/chart/custom.ts                           |    8 +-
 src/chart/graph/GraphSeries.ts                |    2 +-
 src/chart/helper/createListFromArray.ts       |    6 +-
 src/chart/helper/createRenderPlanner.ts       |   10 +-
 src/component/dataZoom/dataZoomProcessor.ts   |    5 +-
 src/component/dataset.ts                      |    4 +-
 src/component/helper/BrushController.ts       |    4 +-
 src/component/helper/RoamController.ts        |    4 +-
 src/component/marker/MarkerModel.ts           |    6 +-
 src/component/timeline/SliderTimelineModel.ts |    6 +-
 src/config.ts                                 |    4 +-
 src/coord/CoordinateSystem.ts                 |   86 +
 src/coord/ICoordinateSystem                   |   85 -
 src/coord/View.ts                             |    4 +-
 src/coord/geo/mapDataStorage.ts               |   87 +-
 src/data/DataDiffer.ts                        |  138 +-
 src/data/DataDimensionInfo.ts                 |   70 +-
 src/data/List.ts                              | 3430 +++++++++++++------------
 src/data/OrdinalMeta.ts                       |  178 +-
 src/data/Source.ts                            |  106 +-
 src/data/helper/completeDimensions.ts         |    6 +-
 src/data/helper/dataProvider.ts               |  493 ++--
 src/data/helper/dimensionHelper.ts            |   55 +-
 src/data/helper/sourceHelper.ts               |    8 +-
 src/data/helper/sourceType.ts                 |   30 -
 src/echarts.ts                                | 3352 ++++++++++++------------
 src/export.ts                                 |    4 +-
 src/loading/default.ts                        |   16 +-
 src/model/Component.ts                        |  222 +-
 src/model/Global.ts                           |  563 ++--
 src/model/Model.ts                            |  183 +-
 src/model/OptionManager.ts                    |  212 +-
 src/model/Series.ts                           |  307 +--
 src/model/mixin/colorPalette.ts               |   33 +-
 src/model/mixin/dataFormat.ts                 |  114 +-
 src/processor/dataSample.ts                   |    5 +-
 src/stream/Scheduler.ts                       |  915 ++++---
 src/stream/task.ts                            |  507 ++--
 src/util/ECEventProcessor.ts                  |  152 ++
 src/util/clazz.ts                             |  265 +-
 src/util/component.ts                         |  122 +-
 src/util/format.ts                            |   56 +-
 src/util/graphic.ts                           |    4 +-
 src/util/model.ts                             |  189 +-
 src/util/throttle.ts                          |    4 +-
 src/util/types.ts                             |  446 ++++
 src/view/Chart.ts                             |  241 +-
 src/view/Component.ts                         |   93 +-
 src/visual/LegendVisualProvider.ts            |   47 +-
 src/visual/dataColor.ts                       |    5 +-
 53 files changed, 7125 insertions(+), 5861 deletions(-)

diff --git a/index.d.ts b/index.d.ts
new file mode 100644
index 0000000..aa892ea
--- /dev/null
+++ b/index.d.ts
@@ -0,0 +1 @@
+export * from './echarts.all';
\ No newline at end of file
diff --git a/src/CoordinateSystem.ts b/src/CoordinateSystem.ts
index cec2173..6d75c47 100644
--- a/src/CoordinateSystem.ts
+++ b/src/CoordinateSystem.ts
@@ -18,45 +18,44 @@
 */
 
 import * as zrUtil from 'zrender/src/core/util';
+import GlobalModel from './model/Global';
+import ExtensionAPI from './ExtensionAPI';
+import { CoordinateSystemCreator, CoordinateSystem } from './coord/CoordinateSystem';
 
-var coordinateSystemCreators = {};
+var coordinateSystemCreators: {[type: string]: CoordinateSystemCreator} = {};
 
-function CoordinateSystemManager() {
+class CoordinateSystemManager {
 
-    this._coordinateSystems = [];
-}
-
-CoordinateSystemManager.prototype = {
-
-    constructor: CoordinateSystemManager,
+    private _coordinateSystems: CoordinateSystem[] = [];
 
-    create: function (ecModel, api) {
-        var coordinateSystems = [];
+    create(ecModel: GlobalModel, api: ExtensionAPI): void {
+        var coordinateSystems: CoordinateSystem[] = [];
         zrUtil.each(coordinateSystemCreators, function (creater, type) {
             var list = creater.create(ecModel, api);
             coordinateSystems = coordinateSystems.concat(list || []);
         });
 
         this._coordinateSystems = coordinateSystems;
-    },
+    }
 
-    update: function (ecModel, api) {
+    update(ecModel: GlobalModel, api: ExtensionAPI): void {
         zrUtil.each(this._coordinateSystems, function (coordSys) {
             coordSys.update && coordSys.update(ecModel, api);
         });
-    },
+    }
 
-    getCoordinateSystems: function () {
+    getCoordinateSystems(): CoordinateSystem[] {
         return this._coordinateSystems.slice();
     }
-};
 
-CoordinateSystemManager.register = function (type, coordinateSystemCreator) {
-    coordinateSystemCreators[type] = coordinateSystemCreator;
-};
+    static register = function (type: string, creator: CoordinateSystemCreator): void {
+        coordinateSystemCreators[type] = creator;
+    }
+
+    static get = function (type: string): CoordinateSystemCreator {
+        return coordinateSystemCreators[type];
+    }
 
-CoordinateSystemManager.get = function (type) {
-    return coordinateSystemCreators[type];
-};
+}
 
-export default CoordinateSystemManager;
\ No newline at end of file
+export default CoordinateSystemManager;
diff --git a/src/ExtensionAPI.ts b/src/ExtensionAPI.ts
index 80b552e..41fcd5f 100644
--- a/src/ExtensionAPI.ts
+++ b/src/ExtensionAPI.ts
@@ -18,18 +18,44 @@
 */
 
 import * as zrUtil from 'zrender/src/core/util';
+import {EChartsType} from './echarts';
+import {CoordinateSystem} from './coord/CoordinateSystem';
+import Element from 'zrender/src/Element';
+import ComponentModel from './model/Component';
 
-var echartsAPIList = [
-    'getDom', 'getZr', 'getWidth', 'getHeight', 'getDevicePixelRatio', 'dispatchAction', 'isDisposed',
-    'on', 'off', 'getDataURL', 'getConnectedDataURL', 'getModel', 'getOption',
-    'getViewOfComponentModel', 'getViewOfSeriesModel'
-];
-// And `getCoordinateSystems` and `getComponentByElement` will be injected in echarts.js
-
-function ExtensionAPI(chartInstance) {
-    zrUtil.each(echartsAPIList, function (name) {
-        this[name] = zrUtil.bind(chartInstance[name], chartInstance);
-    }, this);
+var availableMethods = {
+    getDom: 1,
+    getZr: 1,
+    getWidth: 1,
+    getHeight: 1,
+    getDevicePixelRatio: 1,
+    dispatchAction: 1,
+    isDisposed: 1,
+    on: 1,
+    off: 1,
+    getDataURL: 1,
+    getConnectedDataURL: 1,
+    getModel: 1,
+    getOption: 1,
+    getViewOfComponentModel: 1,
+    getViewOfSeriesModel: 1
+};
+
+interface ExtensionAPI extends Pick<EChartsType, keyof typeof availableMethods> {}
+
+abstract class ExtensionAPI {
+
+    constructor(ecInstance: EChartsType) {
+        zrUtil.each(availableMethods, function (v, name: string) {
+            (this as any)[name] = zrUtil.bind((ecInstance as any)[name], ecInstance);
+        }, this);
+    }
+
+    // Implemented in echarts.js
+    abstract getCoordinateSystems(): CoordinateSystem[];
+
+    // Implemented in echarts.js
+    abstract getComponentByElement(el: Element): ComponentModel;
 }
 
-export default ExtensionAPI;
\ No newline at end of file
+export default ExtensionAPI;
diff --git a/src/chart/custom.ts b/src/chart/custom.ts
index c1dd8be..726d2ac 100644
--- a/src/chart/custom.ts
+++ b/src/chart/custom.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../config';
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphicUtil from '../util/graphic';
@@ -28,6 +30,8 @@ import SeriesModel from '../model/Series';
 import Model from '../model/Model';
 import ChartView from '../view/Chart';
 import {createClipPath} from './helper/createClipPathFromCoordSys';
+import {EventQueryItem, ECEvent} from '../util/types';
+import Element from 'zrender/src/Element';
 
 import prepareCartesian2d from '../coord/cartesian/prepareCustom';
 import prepareGeo from '../coord/geo/prepareCustom';
@@ -208,7 +212,9 @@ ChartView.extend({
     /**
      * @override
      */
-    filterForExposedEvent: function (eventType, query, targetEl, packedEvent) {
+    filterForExposedEvent: function (
+        eventType: string, query: EventQueryItem, targetEl: Element, packedEvent: ECEvent
+    ): boolean {
         var elementName = query.element;
         if (elementName == null || targetEl.name === elementName) {
             return true;
diff --git a/src/chart/graph/GraphSeries.ts b/src/chart/graph/GraphSeries.ts
index a0b5334..4cd1339 100644
--- a/src/chart/graph/GraphSeries.ts
+++ b/src/chart/graph/GraphSeries.ts
@@ -59,7 +59,7 @@ var GraphSeries = echarts.extendSeriesModel({
 
     mergeDefaultAndTheme: function (option) {
         GraphSeries.superApply(this, 'mergeDefaultAndTheme', arguments);
-        defaultEmphasis(option, ['edgeLabel'], ['show']);
+        defaultEmphasis(option, 'edgeLabel', ['show']);
     },
 
     getInitialData: function (option, ecModel) {
diff --git a/src/chart/helper/createListFromArray.ts b/src/chart/helper/createListFromArray.ts
index 2b6cadc..690d973 100644
--- a/src/chart/helper/createListFromArray.ts
+++ b/src/chart/helper/createListFromArray.ts
@@ -17,10 +17,11 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import List from '../../data/List';
 import createDimensions from '../../data/helper/createDimensions';
-import {SOURCE_FORMAT_ORIGINAL} from '../../data/helper/sourceType';
 import {getDimensionTypeByAxis} from '../../data/helper/dimensionHelper';
 import {getDataItemValue} from '../../util/model';
 import CoordinateSystem from '../../CoordinateSystem';
@@ -28,6 +29,7 @@ import {getCoordSysInfoBySeries} from '../../model/referHelper';
 import Source from '../../data/Source';
 import {enableDataStack} from '../../data/helper/dataStackHelper';
 import {makeSeriesEncodeForAxisCoordSys} from '../../data/helper/sourceHelper';
+import { SOURCE_FORMAT_ORIGINAL } from '../../util/types';
 
 /**
  * @param {module:echarts/data/Source|Array} source Or raw data.
@@ -120,7 +122,7 @@ function createListFromArray(source, seriesModel, opt) {
     return list;
 }
 
-function isNeedCompleteOrdinalData(source) {
+function isNeedCompleteOrdinalData(source: Source) {
     if (source.sourceFormat === SOURCE_FORMAT_ORIGINAL) {
         var sampleItem = firstDataNotNull(source.data || []);
         return sampleItem != null
diff --git a/src/chart/helper/createRenderPlanner.ts b/src/chart/helper/createRenderPlanner.ts
index 0fc5041..ed7bc87 100644
--- a/src/chart/helper/createRenderPlanner.ts
+++ b/src/chart/helper/createRenderPlanner.ts
@@ -17,7 +17,11 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {makeInner} from '../../util/model';
+import SeriesModel from '../../model/Series';
+import { StageHandlerPlanReturn, StageHandlerPlan } from '../../util/types';
 
 /**
  * @return {string} If large mode changed, return string 'reset';
@@ -25,7 +29,7 @@ import {makeInner} from '../../util/model';
 export default function () {
     var inner = makeInner();
 
-    return function (seriesModel) {
+    return function (seriesModel: SeriesModel): StageHandlerPlanReturn {
         var fields = inner(seriesModel);
         var pipelineContext = seriesModel.pipelineContext;
 
@@ -38,6 +42,8 @@ export default function () {
         var large = fields.large = pipelineContext && pipelineContext.large;
         var progressive = fields.progressiveRender = pipelineContext && pipelineContext.progressiveRender;
 
-        return !!((originalLarge ^ large) || (originalProgressive ^ progressive)) && 'reset';
+        return (
+            !!((originalLarge ^ large as any) || (originalProgressive ^ progressive as any)) && 'reset'
+        ) as StageHandlerPlanReturn;
     };
 }
diff --git a/src/component/dataZoom/dataZoomProcessor.ts b/src/component/dataZoom/dataZoomProcessor.ts
index cfd1406..c58e8b9 100644
--- a/src/component/dataZoom/dataZoomProcessor.ts
+++ b/src/component/dataZoom/dataZoomProcessor.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as echarts from '../../echarts';
 import {createHashMap, each} from 'zrender/src/core/util';
 
@@ -40,7 +42,8 @@ echarts.registerProcessor({
         return seriesModelMap;
     },
 
-    modifyOutputEnd: true,
+    // FIXME:TS never used, so comment it
+    // modifyOutputEnd: true,
 
     // Consider appendData, where filter should be performed. Because data process is
     // in block mode currently, it is not need to worry about that the overallProgress
diff --git a/src/component/dataset.ts b/src/component/dataset.ts
index 18f2022..dbae472 100644
--- a/src/component/dataset.ts
+++ b/src/component/dataset.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * This module is imported by echarts directly.
  *
@@ -29,7 +31,7 @@
 import ComponentModel from '../model/Component';
 import ComponentView from '../view/Component';
 import {detectSourceFormat} from '../data/helper/sourceHelper';
-import {SERIES_LAYOUT_BY_COLUMN} from '../data/helper/sourceType';
+import { SERIES_LAYOUT_BY_COLUMN } from '../util/types';
 
 ComponentModel.extend({
 
diff --git a/src/component/helper/BrushController.ts b/src/component/helper/BrushController.ts
index c8fb8cd..92d5c47 100644
--- a/src/component/helper/BrushController.ts
+++ b/src/component/helper/BrushController.ts
@@ -17,9 +17,11 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as zrUtil from 'zrender/src/core/util';
-import Eventful from 'zrender/src/mixin/Eventful';
+import Eventful from 'zrender/src/core/Eventful';
 import * as graphic from '../../util/graphic';
 import * as interactionMutex from './interactionMutex';
 import DataDiffer from '../../data/DataDiffer';
diff --git a/src/component/helper/RoamController.ts b/src/component/helper/RoamController.ts
index 2124837..1b1f00d 100644
--- a/src/component/helper/RoamController.ts
+++ b/src/component/helper/RoamController.ts
@@ -17,8 +17,10 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
-import Eventful from 'zrender/src/mixin/Eventful';
+import Eventful from 'zrender/src/core/Eventful';
 import * as eventTool from 'zrender/src/core/event';
 import * as interactionMutex from './interactionMutex';
 
diff --git a/src/component/marker/MarkerModel.ts b/src/component/marker/MarkerModel.ts
index 8c3a314..d7269bc 100644
--- a/src/component/marker/MarkerModel.ts
+++ b/src/component/marker/MarkerModel.ts
@@ -17,13 +17,15 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import env from 'zrender/src/core/env';
 import * as modelUtil from '../../util/model';
 import * as formatUtil from '../../util/format';
-import dataFormatMixin from '../../model/mixin/dataFormat';
+import DataFormatMixin from '../../model/mixin/dataFormat';
 
 var addCommas = formatUtil.addCommas;
 var encodeHTML = formatUtil.encodeHTML;
@@ -152,6 +154,6 @@ var MarkerModel = echarts.extendComponentModel({
     }
 });
 
-zrUtil.mixin(MarkerModel, dataFormatMixin);
+zrUtil.mixin(MarkerModel, DataFormatMixin.prototype);
 
 export default MarkerModel;
\ No newline at end of file
diff --git a/src/component/timeline/SliderTimelineModel.ts b/src/component/timeline/SliderTimelineModel.ts
index a70bab3..517ad43 100644
--- a/src/component/timeline/SliderTimelineModel.ts
+++ b/src/component/timeline/SliderTimelineModel.ts
@@ -17,9 +17,11 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import * as zrUtil from 'zrender/src/core/util';
 import TimelineModel from './TimelineModel';
-import dataFormatMixin from '../../model/mixin/dataFormat';
+import DataFormatMixin from '../../model/mixin/dataFormat';
 
 var SliderTimelineModel = TimelineModel.extend({
 
@@ -117,6 +119,6 @@ var SliderTimelineModel = TimelineModel.extend({
 
 });
 
-zrUtil.mixin(SliderTimelineModel, dataFormatMixin);
+zrUtil.mixin(SliderTimelineModel, DataFormatMixin.prototype);
 
 export default SliderTimelineModel;
\ No newline at end of file
diff --git a/src/config.ts b/src/config.ts
index 06283ed..430f86e 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -27,11 +27,11 @@ var dev;
 
 // In browser
 if (typeof window !== 'undefined') {
-    dev = window.__DEV__;
+    dev = (window as any).__DEV__;
 }
 // In node
 else if (typeof global !== 'undefined') {
-    dev = global.__DEV__;
+    dev = (global as any).__DEV__;
 }
 
 if (typeof dev === 'undefined') {
diff --git a/src/coord/CoordinateSystem.ts b/src/coord/CoordinateSystem.ts
new file mode 100644
index 0000000..6b98390
--- /dev/null
+++ b/src/coord/CoordinateSystem.ts
@@ -0,0 +1,86 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+// @ts-nocheck
+
+import Model from '../model/Model';
+import GlobalModel from '../model/Global';
+import {ModelFinder} from '../util/model';
+import ExtensionAPI from '../ExtensionAPI';
+import { DimensionDefinitionLoose } from '../util/types';
+
+export interface CoordinateSystemCreator {
+
+    create: (ecModel: GlobalModel, api: ExtensionAPI) => CoordinateSystem;
+
+    // FIXME current dimensions must be string[].
+    // check and unify the definition.
+    dimensions: string[];
+
+    // dimensionsInfo like [{name: ..., type: ...}, 'xxx', ...]
+    getDimensionsInfo?: () => DimensionDefinitionLoose[];
+
+}
+
+export interface CoordinateSystem {
+
+    // FIXME current dimensions must be string[].
+    // check and unify the definition.
+    dimensions: string[];
+
+    model: Model;
+
+    update: (ecModel: GlobalModel, api: ExtensionAPI) => void;
+
+    // @return {module:echarts/coord/Axis}
+    getAxis: (dim: string) => any; // FIXME:TS temp any
+
+    // @return {Array.<module:echarts/coord/Axis>}
+    getAxes?: () => [] // FIXME:TS temp any
+
+    axisPointerEnabled?: () => boolean;
+
+    // @param {*|Array.<*>} data
+    // @param {*} Defined by the coordinate system itself
+    // @param {Array.<*>} out
+    // @return {Array.<number>} point Point in global pixel coordinate system.
+    dataToPoint: (...args) => number[];
+
+    // @param {Array.<number>} point Point in global pixel coordinate system.
+    // @param {*} Defined by the coordinate system itself
+    // @param {Array.<*>} out
+    // @return {*|Array.<*>} data
+    pointToData: (...args) => any;
+
+    // @param point Point in global pixel coordinate system.
+    containPoint: (point: number[]) => boolean;
+
+    // This methods is also responsible for determine whether this
+    // coodinate system is applicable to the given `finder`.
+    // Each coordinate system will be tried, util one returns none
+    // null/undefined value.
+    convertToPixel: (ecModel: any, finder: ModelFinder, value: any) => number | number[];
+
+    // This methods is also responsible for determine whether this
+    // coodinate system is applicable to the given `finder`.
+    // Each coordinate system will be tried, util one returns none
+    // null/undefined value.
+    convertFromPixel: (ecModel: any, finder: ModelFinder, pixelValue: number | number[]) => any;
+
+}
\ No newline at end of file
diff --git a/src/coord/ICoordinateSystem b/src/coord/ICoordinateSystem
deleted file mode 100644
index 592c85d..0000000
--- a/src/coord/ICoordinateSystem
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-/**
- * Coordinate System Interface:
- *
- *
- * Class members:
- *
- *  + dimensions {Array.<strign>}: mandatory
- *
- *
- * Instance members:
- *
- *  + dimensions {Array.<strign>}: mandatory
- *
- *  + model {module:echarts/model/Model}: mandatory
- *
- *  + create: mandatory
- *     @param {module:echarts/model/Global} ecModel
- *     @param {module:echarts/ExtensionAPI} api
- *     @return {Object} coordinate system instance
- *
- *  + update: mandatory
- *     @param {module:echarts/model/Global} ecModel
- *     @param {module:echarts/ExtensionAPI} api
- *
- *  + getAxis {Function}: mandatory
- *      @param {string} dim
- *      @return {module:echarts/coord/Axis}
- *
- *  + getAxes: {Function}: optional
- *      @return {Array.<module:echarts/coord/Axis>}
- *
- *  + axisPointerEnabled {boolean}
- *
- *  + dataToPoint {Function}: mandatory
- *      @param {*|Array.<*>} data
- *      @param {*} Defined by the coordinate system itself
- *      @param {Array.<*>} out
- *      @return {Array.<number>} point Point in global pixel coordinate system.
- *
- *  + pointToData {Function}: mandatory
- *      @param {Array.<number>} point Point in global pixel coordinate system.
- *      @param {*} Defined by the coordinate system itself
- *      @param {Array.<*>} out
- *      @return {*|Array.<*>} data
- *
- *  + containPoint {Function}: mandatory
- *      @param {Array.<number>} point Point in global pixel coordinate system.
- *      @return {boolean}
- *
- *  + getDimensionsInfo {Function}: optional
- *      @return {Array.<string|Object>} dimensionsInfo
- *              Like [{name: ..., type: ...}, 'xxx', ...]
- *
- *  + convertToPixel:
- *  + convertFromPixel:
- *        These two methods is also responsible for determine whether this
- *        coodinate system is applicable to the given `finder`.
- *        Each coordinate system will be tried, util one returns none
- *        null/undefined value.
- *        @param {module:echarts/model/Global} ecModel
- *        @param {Object} finder
- *        @param {Array|number} value
- *        @return {Array|number} convert result.
- *
- *
- */
diff --git a/src/coord/View.ts b/src/coord/View.ts
index 4043107..be65472 100644
--- a/src/coord/View.ts
+++ b/src/coord/View.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * Simple view coordinate system
  * Mapping given x, y to transformd view x, y
@@ -26,7 +28,7 @@ import * as zrUtil from 'zrender/src/core/util';
 import * as vector from 'zrender/src/core/vector';
 import * as matrix from 'zrender/src/core/matrix';
 import BoundingRect from 'zrender/src/core/BoundingRect';
-import Transformable from 'zrender/src/mixin/Transformable';
+import Transformable from 'zrender/src/core/Transformable';
 
 var v2ApplyTransform = vector.applyTransform;
 
diff --git a/src/coord/geo/mapDataStorage.ts b/src/coord/geo/mapDataStorage.ts
index 8f6de57..54be749 100644
--- a/src/coord/geo/mapDataStorage.ts
+++ b/src/coord/geo/mapDataStorage.ts
@@ -17,39 +17,94 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import {createHashMap, isString, isArray, each, assert} from 'zrender/src/core/util';
 import {parseXML} from 'zrender/src/tool/parseSVG';
 
-
-var storage = createHashMap();
-
 // For minimize the code size of common echarts package,
 // do not put too much logic in this module.
 
+export type GeoMapSVGSource = 'string' | Document;
+export type GeoMapGeoJSONSource = 'string' | object;
+export type GeoSpecialAreas = object;
+
+interface GeoMapGeoJSONDefinition {
+    geoJSON?: GeoMapGeoJSONSource;
+    geoJson?: GeoMapGeoJSONSource;
+    specialAreas?: GeoSpecialAreas;
+}
+interface GeoMapSVGDefinition {
+    svg?: GeoMapSVGSource;
+    specialAreas?: GeoSpecialAreas;
+}
+export type GeoMapDefinition = GeoMapGeoJSONDefinition | GeoMapSVGDefinition;
+
+interface GeoMapRecord {
+    type: 'geoJSON' | 'svg';
+    source: GeoMapGeoJSONSource | GeoMapSVGSource;
+    specialAreas: GeoSpecialAreas;
+    geoJSON: object;
+    svgXML: Node
+}
+
+
+var storage = createHashMap<GeoMapRecord[]>();
+
+
 export default {
 
-    // The format of record: see `echarts.registerMap`.
-    // Compatible with previous `echarts.registerMap`.
-    registerMap: function (mapName, rawGeoJson, rawSpecialAreas) {
+    /**
+     * Compatible with previous `echarts.registerMap`.
+     * @usage
+     * ```js
+     * $.get('USA.json', function (geoJson) {
+     *     echarts.registerMap('USA', geoJson);
+     *     // Or
+     *     echarts.registerMap('USA', {
+     *         geoJson: geoJson,
+     *         specialAreas: {}
+     *     })
+     * });
+     *
+     * $.get('airport.svg', function (svg) {
+     *     echarts.registerMap('airport', {
+     *         svg: svg
+     *     }
+     * });
+     *
+     * echarts.registerMap('eu', [
+     *     {svg: eu-topographic.svg},
+     *     {geoJSON: eu.json}
+     * ])
+     * ```
+     */
+    registerMap: function (
+        mapName: string,
+        rawGeoJson: GeoMapDefinition | GeoMapDefinition[] | GeoMapGeoJSONSource,
+        rawSpecialAreas?: GeoSpecialAreas
+    ): GeoMapRecord[] {
 
         var records;
 
         if (isArray(rawGeoJson)) {
             records = rawGeoJson;
         }
-        else if (rawGeoJson.svg) {
+        else if ((rawGeoJson as GeoMapSVGDefinition).svg) {
             records = [{
                 type: 'svg',
-                source: rawGeoJson.svg,
-                specialAreas: rawGeoJson.specialAreas
+                source: (rawGeoJson as GeoMapSVGDefinition).svg,
+                specialAreas: (rawGeoJson as GeoMapSVGDefinition).specialAreas
             }];
         }
         else {
             // Backward compatibility.
-            if (rawGeoJson.geoJson && !rawGeoJson.features) {
-                rawSpecialAreas = rawGeoJson.specialAreas;
-                rawGeoJson = rawGeoJson.geoJson;
+            var geoSource = (rawGeoJson as GeoMapGeoJSONDefinition).geoJson
+                || (rawGeoJson as GeoMapGeoJSONDefinition).geoJSON;
+            if (geoSource && !(rawGeoJson as any).features) {
+                rawSpecialAreas = (rawGeoJson as GeoMapGeoJSONDefinition).specialAreas;
+                rawGeoJson = geoSource;
             }
             records = [{
                 type: 'geoJSON',
@@ -74,7 +129,7 @@ export default {
         return storage.set(mapName, records);
     },
 
-    retrieveMap: function (mapName) {
+    retrieveMap: function (mapName: string): GeoMapRecord[] {
         return storage.get(mapName);
     }
 
@@ -82,7 +137,7 @@ export default {
 
 var parsers = {
 
-    geoJSON: function (record) {
+    geoJSON: function (record: GeoMapRecord): void {
         var source = record.source;
         record.geoJSON = !isString(source)
             ? source
@@ -97,8 +152,8 @@ var parsers = {
     // if we do it here, the clone of zrender elements has to be
     // required. So we do it once for each geo instance, util real
     // performance issues call for optimizing it.
-    svg: function (record) {
-        record.svgXML = parseXML(record.source);
+    svg: function (record: GeoMapRecord): void {
+        record.svgXML = parseXML(record.source as GeoMapSVGSource);
     }
 
 };
diff --git a/src/data/DataDiffer.ts b/src/data/DataDiffer.ts
index 27e66d8..76c75dc 100644
--- a/src/data/DataDiffer.ts
+++ b/src/data/DataDiffer.ts
@@ -17,68 +17,88 @@
 * under the License.
 */
 
+import {ArrayLike} from 'zrender/src/core/types';
 
-function defaultKeyGetter(item) {
+// return key.
+export type DiffKeyGetter = (this: DataDiffer, value: any, index: number) => string;
+export type DiffCallbackAdd = (newIndex: number) => void
+export type DiffCallbackUpdate = (newIndex: number, oldIndex: number) => void
+export type DiffCallbackRemove = (oldIndex: number) => void
+
+type DataIndexMap = {[key: string]: number | number[]};
+
+function defaultKeyGetter<T>(item: T): T {
     return item;
 }
 
-/**
- * @param {Array} oldArr
- * @param {Array} newArr
- * @param {Function} oldKeyGetter
- * @param {Function} newKeyGetter
- * @param {Object} [context] Can be visited by this.context in callback.
- */
-function DataDiffer(oldArr, newArr, oldKeyGetter, newKeyGetter, context) {
-    this._old = oldArr;
-    this._new = newArr;
-
-    this._oldKeyGetter = oldKeyGetter || defaultKeyGetter;
-    this._newKeyGetter = newKeyGetter || defaultKeyGetter;
-
-    this.context = context;
-}
+class DataDiffer {
+
+    private _old: ArrayLike<any>;
+    private _new: ArrayLike<any>;
+    private _oldKeyGetter: DiffKeyGetter;
+    private _newKeyGetter: DiffKeyGetter;
+    private _add: DiffCallbackAdd;
+    private _update: DiffCallbackUpdate;
+    private _remove: DiffCallbackRemove;
 
-DataDiffer.prototype = {
+    readonly context: any;
 
-    constructor: DataDiffer,
+    /**
+     * @param context Can be visited by this.context in callback.
+     */
+    constructor(
+        oldArr: ArrayLike<any>,
+        newArr: ArrayLike<any>,
+        oldKeyGetter: DiffKeyGetter,
+        newKeyGetter: DiffKeyGetter,
+        context?: any
+    ) {
+        this._old = oldArr;
+        this._new = newArr;
+
+        this._oldKeyGetter = oldKeyGetter || defaultKeyGetter;
+        this._newKeyGetter = newKeyGetter || defaultKeyGetter;
+
+        // Visible in callback via `this.context`;
+        this.context = context;
+    }
 
     /**
      * Callback function when add a data
      */
-    add: function (func) {
+    add(func: DiffCallbackAdd): DataDiffer {
         this._add = func;
         return this;
-    },
+    }
 
     /**
      * Callback function when update a data
      */
-    update: function (func) {
+    update(func: DiffCallbackUpdate): DataDiffer {
         this._update = func;
         return this;
-    },
+    }
 
     /**
      * Callback function when remove a data
      */
-    remove: function (func) {
+    remove(func: DiffCallbackRemove): DataDiffer {
         this._remove = func;
         return this;
-    },
+    }
 
-    execute: function () {
+    execute(): void {
         var oldArr = this._old;
         var newArr = this._new;
 
-        var oldDataIndexMap = {};
-        var newDataIndexMap = {};
-        var oldDataKeyArr = [];
-        var newDataKeyArr = [];
+        var oldDataIndexMap: DataIndexMap = {};
+        var newDataIndexMap: DataIndexMap = {};
+        var oldDataKeyArr: string[] = [];
+        var newDataKeyArr: string[] = [];
         var i;
 
-        initIndexMap(oldArr, oldDataIndexMap, oldDataKeyArr, '_oldKeyGetter', this);
-        initIndexMap(newArr, newDataIndexMap, newDataKeyArr, '_newKeyGetter', this);
+        this._initIndexMap(oldArr, oldDataIndexMap, oldDataKeyArr, '_oldKeyGetter');
+        this._initIndexMap(newArr, newDataIndexMap, newDataKeyArr, '_newKeyGetter');
 
         for (i = 0; i < oldArr.length; i++) {
             var key = oldDataKeyArr[i];
@@ -88,22 +108,22 @@ DataDiffer.prototype = {
             if (idx != null) {
                 // Consider there is duplicate key (for example, use dataItem.name as key).
                 // We should make sure every item in newArr and oldArr can be visited.
-                var len = idx.length;
+                var len = (idx as number[]).length;
                 if (len) {
                     len === 1 && (newDataIndexMap[key] = null);
-                    idx = idx.shift();
+                    idx = (idx as number[]).shift();
                 }
                 else {
                     newDataIndexMap[key] = null;
                 }
-                this._update && this._update(idx, i);
+                this._update && this._update(idx as number, i);
             }
             else {
                 this._remove && this._remove(i);
             }
         }
 
-        for (var i = 0; i < newDataKeyArr.length; i++) {
+        for (i = 0; i < newDataKeyArr.length; i++) {
             var key = newDataKeyArr[i];
             if (newDataIndexMap.hasOwnProperty(key)) {
                 var idx = newDataIndexMap[key];
@@ -111,35 +131,41 @@ DataDiffer.prototype = {
                     continue;
                 }
                 // idx can never be empty array here. see 'set null' logic above.
-                if (!idx.length) {
-                    this._add && this._add(idx);
+                if (!(idx as number[]).length) {
+                    this._add && this._add(idx as number);
                 }
                 else {
-                    for (var j = 0, len = idx.length; j < len; j++) {
-                        this._add && this._add(idx[j]);
+                    for (var j = 0, len = (idx as number[]).length; j < len; j++) {
+                        this._add && this._add((idx as number[])[j]);
                     }
                 }
             }
         }
     }
-};
-
-function initIndexMap(arr, map, keyArr, keyGetterName, dataDiffer) {
-    for (var i = 0; i < arr.length; i++) {
-        // Add prefix to avoid conflict with Object.prototype.
-        var key = '_ec_' + dataDiffer[keyGetterName](arr[i], i);
-        var existence = map[key];
-        if (existence == null) {
-            keyArr.push(key);
-            map[key] = i;
-        }
-        else {
-            if (!existence.length) {
-                map[key] = existence = [existence];
+
+    private _initIndexMap(
+        arr: ArrayLike<any>,
+        map: DataIndexMap,
+        keyArr: string[],
+        keyGetterName: '_oldKeyGetter' | '_newKeyGetter'
+    ): void {
+        for (var i = 0; i < arr.length; i++) {
+            // Add prefix to avoid conflict with Object.prototype.
+            var key = '_ec_' + this[keyGetterName](arr[i], i);
+            var existence = map[key];
+            if (existence == null) {
+                keyArr.push(key);
+                map[key] = i;
+            }
+            else {
+                if (!(existence as number[]).length) {
+                    map[key] = existence = [existence as number];
+                }
+                (existence as number[]).push(i);
             }
-            existence.push(i);
         }
     }
+
 }
 
-export default DataDiffer;
\ No newline at end of file
+export default DataDiffer;
diff --git a/src/data/DataDimensionInfo.ts b/src/data/DataDimensionInfo.ts
index 3bda37d..f27a5b4 100644
--- a/src/data/DataDimensionInfo.ts
+++ b/src/data/DataDimensionInfo.ts
@@ -18,30 +18,33 @@
 */
 
 import * as zrUtil from 'zrender/src/core/util';
+import OrdinalMeta from './OrdinalMeta';
+import { DataVisualDimensions, DimensionType } from '../util/types';
 
-/**
- * @class
- * @param {Object|DataDimensionInfo} [opt] All of the fields will be shallow copied.
- */
-function DataDimensionInfo(opt) {
-    if (opt != null) {
-        zrUtil.extend(this, opt);
-    }
+class DataDimensionInfo {
+
+    /**
+     * Dimension type. The enumerable values are the key of
+     * `dataCtors` of `data/List`.
+     * Optional.
+     */
+    type: DimensionType;
 
     /**
      * Dimension name.
      * Mandatory.
-     * @type {string}
      */
-    // this.name;
-
+    name: string;
     /**
      * The origin name in dimsDef, see source helper.
      * If displayName given, the tooltip will displayed vertically.
      * Optional.
-     * @type {string}
      */
-    // this.displayName;
+    displayName: string;
+
+    // FIXME: check whether it is still used.
+    // See Series.ts#formatArrayValue
+    tooltip?: boolean
 
     /**
      * Which coordSys dimension this dimension mapped to.
@@ -50,31 +53,20 @@ function DataDimensionInfo(opt) {
      * or an generated "extra coord name" if does not mapped to any "coordSysDim"
      * (That is determined by whether `isExtraCoord` is `true`).
      * Mandatory.
-     * @type {string}
      */
-    // this.coordDim;
+    coordDim: string;
 
     /**
      * The index of this dimension in `series.encode[coordDim]`.
      * Mandatory.
-     * @type {number}
      */
-    // this.coordDimIndex;
-
-    /**
-     * Dimension type. The enumerable values are the key of
-     * `dataCtors` of `data/List`.
-     * Optional.
-     * @type {string}
-     */
-    // this.type;
+    coordDimIndex: number;
 
     /**
      * This index of this dimension info in `data/List#_dimensionInfos`.
      * Mandatory after added to `data/List`.
-     * @type {number}
      */
-    // this.index;
+    index: number;
 
     /**
      * The format of `otherDims` is:
@@ -108,28 +100,34 @@ function DataDimensionInfo(opt) {
      * ```
      *
      * This prop should never be `null`/`undefined` after initialized.
-     * @type {Object}
      */
-    this.otherDims = {};
+    otherDims: DataVisualDimensions = {};
 
     /**
      * Be `true` if this dimension is not mapped to any "coordSysDim" that the
      * "coordSys" required.
      * Mandatory.
-     * @type {boolean}
      */
-    // this.isExtraCoord;
+    isExtraCoord: boolean;
+
+    defaultTooltip: boolean;
+
+    ordinalMeta: OrdinalMeta;
 
     /**
-     * @type {module:data/OrdinalMeta}
+     * Whether to create inverted indices.
      */
-    // this.ordinalMeta;
+    createInvertedIndices: boolean;
 
     /**
-     * Whether to create inverted indices.
-     * @type {boolean}
+     * @param opt All of the fields will be shallow copied.
      */
-    // this.createInvertedIndices;
+    constructor(opt: object | DataDimensionInfo) {
+        if (opt != null) {
+            zrUtil.extend(this, opt);
+        }
+    }
+
 };
 
 export default DataDimensionInfo;
diff --git a/src/data/List.ts b/src/data/List.ts
index 7ec46e6..f9d7ac1 100644
--- a/src/data/List.ts
+++ b/src/data/List.ts
@@ -28,10 +28,19 @@ import {__DEV__} from '../config';
 import * as zrUtil from 'zrender/src/core/util';
 import Model from '../model/Model';
 import DataDiffer from './DataDiffer';
-import Source from './Source';
-import {defaultDimValueGetters, DefaultDataProvider} from './helper/dataProvider';
-import {summarizeDimensions} from './helper/dimensionHelper';
+import Source, { SourceConstructor } from './Source';
+import {DefaultDataProvider, DataProvider} from './helper/dataProvider';
+import {summarizeDimensions, DimensionSummary, DimensionUserOuput} from './helper/dimensionHelper';
 import DataDimensionInfo from './DataDimensionInfo';
+import {ArrayLike, Dictionary, FunctionPropertyNames} from 'zrender/src/core/types';
+import Element from 'zrender/src/Element';
+import {
+    DimensionIndex, DimensionName, ECElement, DimensionLoose, OptionDataItem,
+    ParsedDataValue, ParsedDataNumeric, OrdinalRawValueIndex
+} from '../util/types';
+import {parseDate} from '../util/number';
+import {isDataItemOption} from '../util/model';
+
 
 var isObject = zrUtil.isObject;
 
@@ -53,22 +62,54 @@ var dataCtors = {
     'time': Array
 };
 
+export type ListDimensionType = keyof typeof dataCtors;
+
 // Caution: MUST not use `new CtorUint32Array(arr, 0, len)`, because the Ctor of array is
 // different from the Ctor of typed array.
 var CtorUint32Array = typeof Uint32Array === UNDEFINED ? Array : Uint32Array;
 var CtorInt32Array = typeof Int32Array === UNDEFINED ? Array : Int32Array;
 var CtorUint16Array = typeof Uint16Array === UNDEFINED ? Array : Uint16Array;
 
-function getIndicesCtor(list) {
-    // The possible max value in this._indicies is always this._rawCount despite of filtering.
-    return list._rawCount > 65535 ? CtorUint32Array : CtorUint16Array;
-}
+type DataTypedArray = Uint32Array | Int32Array | Uint16Array | Float64Array;
+type DataTypedArrayConstructor = typeof Uint32Array | typeof Int32Array | typeof Uint16Array | typeof Float64Array;
+type DataArrayLikeConstructor = typeof Array | DataTypedArrayConstructor;
+
+
+
+type DimValueGetter = (
+    this: List,
+    dataItem: any,
+    dimName: DimensionName,
+    dataIndex: number,
+    dimIndex: DimensionIndex
+) => ParsedDataValue;
+
+type DataValueChunk = ArrayLike<ParsedDataValue>;
+type DataStorage = {[dimName: string]: DataValueChunk[]};
+type NameRepeatCount = {[name: string]: number};
+
+
+type ItrParamDims = DimensionLoose | Array<DimensionLoose>;
+// If Ctx not specified, use List as Ctx
+type CtxOrList<Ctx> = unknown extends Ctx ? List : Ctx;
+type EachCb0<Ctx> = (this: CtxOrList<Ctx>, idx: number) => void;
+type EachCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedDataValue, idx: number) => void;
+type EachCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedDataValue, y: ParsedDataValue, idx: number) => void;
+type EachCb<Ctx> = (this: CtxOrList<Ctx>, ...args: any) => void;
+type FilterCb0<Ctx> = (this: CtxOrList<Ctx>, idx: number) => boolean;
+type FilterCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedDataValue, idx: number) => boolean;
+type FilterCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedDataValue, y: ParsedDataValue, idx: number) => boolean;
+type FilterCb<Ctx> = (this: CtxOrList<Ctx>, ...args: any) => boolean;
+type MapArrayCb0<Ctx> = (this: CtxOrList<Ctx>, idx: number) => any;
+type MapArrayCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedDataValue, idx: number) => any;
+type MapArrayCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedDataValue, y: ParsedDataValue, idx: number) => any;
+type MapArrayCb<Ctx> = (this: CtxOrList<Ctx>, ...args: any) => any;
+type MapCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedDataValue, idx: number) => ParsedDataValue | ParsedDataValue[];
+type MapCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedDataValue, y: ParsedDataValue, idx: number) =>
+    ParsedDataValue | ParsedDataValue[];
+type MapCb<Ctx> = (this: CtxOrList<Ctx>, ...args: any) => ParsedDataValue | ParsedDataValue[];
+
 
-function cloneChunk(originalChunk) {
-    var Ctor = originalChunk.constructor;
-    // Only shallow clone is enough when Array.
-    return Ctor === Array ? originalChunk.slice() : new Ctor(originalChunk);
-}
 
 var TRANSFERABLE_PROPERTIES = [
     'hasItemOption', '_nameList', '_idList', '_invertedIndicesMap',
@@ -79,1960 +120,2005 @@ var CLONE_PROPERTIES = [
     '_extent', '_approximateExtent', '_rawExtent'
 ];
 
-function transferProperties(target, source) {
-    zrUtil.each(TRANSFERABLE_PROPERTIES.concat(source.__wrappedMethods || []), function (propName) {
-        if (source.hasOwnProperty(propName)) {
-            target[propName] = source[propName];
-        }
-    });
 
-    target.__wrappedMethods = source.__wrappedMethods;
 
-    zrUtil.each(CLONE_PROPERTIES, function (propName) {
-        target[propName] = zrUtil.clone(source[propName]);
-    });
+class List {
 
-    target._calculationInfo = zrUtil.extend(source._calculationInfo);
-}
+    readonly type = 'list';
 
+    readonly dimensions: string[];
 
+    // Infomation of each data dimension, like data type.
+    private _dimensionInfos: {[dimName: string]: DataDimensionInfo};
 
+    readonly hostModel: Model;
 
+    readonly dataType: string;
 
-/**
- * @constructor
- * @alias module:echarts/data/List
- *
- * @param {Array.<string|Object|module:data/DataDimensionInfo>} dimensions
- *      For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...].
- *      Dimensions should be concrete names like x, y, z, lng, lat, angle, radius
- * @param {module:echarts/model/Model} hostModel
- */
-var List = function (dimensions, hostModel) {
+    // Indices stores the indices of data subset after filtered.
+    // This data subset will be used in chart.
+    private _indices: ArrayLike<any>;
 
-    dimensions = dimensions || ['x', 'y'];
+    private _count: number = 0;
+    private _rawCount: number = 0;
+    private _storage: DataStorage = {};
+    private _nameList: string[] = [];
+    private _idList: string[] = [];
 
-    var dimensionInfos = {};
-    var dimensionNames = [];
-    var invertedIndicesMap = {};
+    // Models of data option is stored sparse for optimizing memory cost
+    // Never used yet (not used yet).
+    // private _optionModels: Model[] = [];
 
-    for (var i = 0; i < dimensions.length; i++) {
-        // Use the original dimensions[i], where other flag props may exists.
-        var dimensionInfo = dimensions[i];
+    // Global visual properties after visual coding
+    private _visual: Dictionary<any> = {};
 
-        if (zrUtil.isString(dimensionInfo)) {
-            dimensionInfo = new DataDimensionInfo({name: dimensionInfo});
-        }
-        else if (!(dimensionInfo instanceof DataDimensionInfo)) {
-            dimensionInfo = new DataDimensionInfo(dimensionInfo);
-        }
+    // Globel layout properties.
+    private _layout: Dictionary<any> = {};
 
-        var dimensionName = dimensionInfo.name;
-        dimensionInfo.type = dimensionInfo.type || 'float';
-        if (!dimensionInfo.coordDim) {
-            dimensionInfo.coordDim = dimensionName;
-            dimensionInfo.coordDimIndex = 0;
-        }
+    // Item visual properties after visual coding
+    private _itemVisuals: Dictionary<any>[] = [];
 
-        dimensionInfo.otherDims = dimensionInfo.otherDims || {};
-        dimensionNames.push(dimensionName);
-        dimensionInfos[dimensionName] = dimensionInfo;
+    // Key: visual type, Value: boolean
+    // @readonly
+    hasItemVisual: Dictionary<boolean> = {};
 
-        dimensionInfo.index = i;
+    // Item layout properties after layout
+    private _itemLayouts: any[] = [];
 
-        if (dimensionInfo.createInvertedIndices) {
-            invertedIndicesMap[dimensionName] = [];
-        }
-    }
+    // Graphic elemnents
+    private _graphicEls: Element[] = [];
 
-    /**
-     * @readOnly
-     * @type {Array.<string>}
-     */
-    this.dimensions = dimensionNames;
+    // Max size of each chunk.
+    private _chunkSize: number = 1e5;
 
-    /**
-     * Infomation of each data dimension, like data type.
-     * @type {Object}
-     */
-    this._dimensionInfos = dimensionInfos;
+    private _chunkCount: number = 0;
 
-    /**
-     * @type {module:echarts/model/Model}
-     */
-    this.hostModel = hostModel;
+    private _rawData: DataProvider;
 
-    /**
-     * @type {module:echarts/model/Model}
-     */
-    this.dataType;
+    // Raw extent will not be cloned, but only transfered.
+    // It will not be calculated util needed.
+    private _rawExtent: {[dimName: string]: [number, number]} = {};
 
-    /**
-     * Indices stores the indices of data subset after filtered.
-     * This data subset will be used in chart.
-     * @type {Array.<number>}
-     * @readOnly
-     */
-    this._indices = null;
+    private _extent: {[dimName: string]: [number, number]} = {};
 
-    this._count = 0;
-    this._rawCount = 0;
+    // key: dim, value: extent
+    private _approximateExtent: {[dimName: string]: [number, number]} = {};
 
-    /**
-     * Data storage
-     * @type {Object.<key, Array.<TypedArray|Array>>}
-     * @private
-     */
-    this._storage = {};
+    private _dimensionsSummary: DimensionSummary;
 
-    /**
-     * @type {Array.<string>}
-     */
-    this._nameList = [];
-    /**
-     * @type {Array.<string>}
-     */
-    this._idList = [];
+    private _invertedIndicesMap: {[dimName: string]: ArrayLike<number>};
 
-    /**
-     * Models of data option is stored sparse for optimizing memory cost
-     * @type {Array.<module:echarts/model/Model>}
-     * @private
-     */
-    this._optionModels = [];
+    private _calculationInfo: {[key: string]: any} = {};
 
-    /**
-     * Global visual properties after visual coding
-     * @type {Object}
-     * @private
-     */
-    this._visual = {};
+    // User output info of this data.
+    // DO NOT use it in other places!
+    // When preparing user params for user callbacks, we have
+    // to clone these inner data structures to prevent users
+    // from modifying them to effect built-in logic. And for
+    // performance consideration we make this `userOutput` to
+    // avoid clone them too many times.
+    readonly userOutput: DimensionUserOuput;
 
-    /**
-     * Globel layout properties.
-     * @type {Object}
-     * @private
-     */
-    this._layout = {};
+    // If each data item has it's own option
+    hasItemOption: boolean = true;
 
-    /**
-     * Item visual properties after visual coding
-     * @type {Array.<Object>}
-     * @private
-     */
-    this._itemVisuals = [];
+    // @readonly
+    defaultDimValueGetter: DimValueGetter;
+    private _dimValueGetter: DimValueGetter;
+    private _dimValueGetterArrayRows: DimValueGetter;
 
-    /**
-     * Key: visual type, Value: boolean
-     * @type {Object}
-     * @readOnly
-     */
-    this.hasItemVisual = {};
+    private _nameRepeatCount: NameRepeatCount;
+    private _nameDimIdx: number;
+    private _idDimIdx: number;
 
-    /**
-     * Item layout properties after layout
-     * @type {Array.<Object>}
-     * @private
-     */
-    this._itemLayouts = [];
+    private __wrappedMethods: string[];
 
-    /**
-     * Graphic elemnents
-     * @type {Array.<module:zrender/Element>}
-     * @private
-     */
-    this._graphicEls = [];
+    // Methods that create a new list based on this list should be listed here.
+    // Notice that those method should `RETURN` the new list.
+    TRANSFERABLE_METHODS = ['cloneShallow', 'downSample', 'map'];
+    // Methods that change indices of this list should be listed here.
+    CHANGABLE_METHODS = ['filterSelf', 'selectRange'];
 
-    /**
-     * Max size of each chunk.
-     * @type {number}
-     * @private
-     */
-    this._chunkSize = 1e5;
 
     /**
-     * @type {number}
-     * @private
+     * @param dimensions
+     *        For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...].
+     *        Dimensions should be concrete names like x, y, z, lng, lat, angle, radius
      */
-    this._chunkCount = 0;
+    constructor(dimensions: Array<string | object | DataDimensionInfo>, hostModel: Model) {
+        dimensions = dimensions || ['x', 'y'];
+
+        var dimensionInfos: Dictionary<DataDimensionInfo> = {};
+        var dimensionNames = [];
+        var invertedIndicesMap: Dictionary<number[]> = {};
+
+        for (var i = 0; i < dimensions.length; i++) {
+            // Use the original dimensions[i], where other flag props may exists.
+            var dimInfoInput = dimensions[i];
+
+            var dimensionInfo: DataDimensionInfo =
+                zrUtil.isString(dimInfoInput)
+                ? new DataDimensionInfo({name: dimInfoInput})
+                : !(dimInfoInput instanceof DataDimensionInfo)
+                ? new DataDimensionInfo(dimInfoInput)
+                : dimInfoInput;
+
+            var dimensionName = dimensionInfo.name;
+            dimensionInfo.type = dimensionInfo.type || 'float';
+            if (!dimensionInfo.coordDim) {
+                dimensionInfo.coordDim = dimensionName;
+                dimensionInfo.coordDimIndex = 0;
+            }
 
-    /**
-     * @type {Array.<Array|Object>}
-     * @private
-     */
-    this._rawData;
+            dimensionInfo.otherDims = dimensionInfo.otherDims || {};
+            dimensionNames.push(dimensionName);
+            dimensionInfos[dimensionName] = dimensionInfo;
 
-    /**
-     * Raw extent will not be cloned, but only transfered.
-     * It will not be calculated util needed.
-     * key: dim,
-     * value: {end: number, extent: Array.<number>}
-     * @type {Object}
-     * @private
-     */
-    this._rawExtent = {};
+            dimensionInfo.index = i;
 
-    /**
-     * @type {Object}
-     * @private
-     */
-    this._extent = {};
+            if (dimensionInfo.createInvertedIndices) {
+                invertedIndicesMap[dimensionName] = [];
+            }
+        }
 
-    /**
-     * key: dim
-     * value: extent
-     * @type {Object}
-     * @private
-     */
-    this._approximateExtent = {};
+        this.dimensions = dimensionNames;
+        this._dimensionInfos = dimensionInfos;
+        this.hostModel = hostModel;
+
+        // Cache summary info for fast visit. See "dimensionHelper".
+        this._dimensionsSummary = summarizeDimensions(this);
+
+        this._invertedIndicesMap = invertedIndicesMap;
+
+        this.userOutput = this._dimensionsSummary.userOutput;
+    }
 
     /**
-     * Cache summary info for fast visit. See "dimensionHelper".
-     * @type {Object}
-     * @private
+     * The meanings of the input parameter `dim`:
+     *
+     * + If dim is a number (e.g., `1`), it means the index of the dimension.
+     *   For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'.
+     * + If dim is a number-like string (e.g., `"1"`):
+     *     + If there is the same concrete dim name defined in `this.dimensions`, it means that concrete name.
+     *     + If not, it will be converted to a number, which means the index of the dimension.
+     *        (why? because of the backward compatbility. We have been tolerating number-like string in
+     *        dimension setting, although now it seems that it is not a good idea.)
+     *     For example, `visualMap[i].dimension: "1"` is the same meaning as `visualMap[i].dimension: 1`,
+     *     if no dimension name is defined as `"1"`.
+     * + If dim is a not-number-like string, it means the concrete dim name.
+     *   For example, it can be be default name `"x"`, `"y"`, `"z"`, `"lng"`, `"lat"`, `"angle"`, `"radius"`,
+     *   or customized in `dimensions` property of option like `"age"`.
+     *
+     * Get dimension name
+     * @param dim See above.
+     * @return Concrete dim name.
      */
-    this._dimensionsSummary = summarizeDimensions(this);
+    getDimension(dim: DimensionLoose): DimensionName {
+        if (typeof dim === 'number'
+            // If being a number-like string but not being defined a dimension name.
+            || (!isNaN(dim as any) && !this._dimensionInfos.hasOwnProperty(dim))
+        ) {
+            dim = this.dimensions[dim as DimensionIndex];
+        }
+        return dim as DimensionName;
+    }
 
     /**
-     * @type {Object.<Array|TypedArray>}
-     * @private
+     * Get type and calculation info of particular dimension
+     * @param dim
+     *        Dimension can be concrete names like x, y, z, lng, lat, angle, radius
+     *        Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'
      */
-    this._invertedIndicesMap = invertedIndicesMap;
+    getDimensionInfo(dim: DimensionLoose): DataDimensionInfo {
+        // Do not clone, because there may be categories in dimInfo.
+        return this._dimensionInfos[this.getDimension(dim)];
+    }
 
     /**
-     * @type {Object}
-     * @private
+     * concrete dimension name list on coord.
      */
-    this._calculationInfo = {};
+    getDimensionsOnCoord(): DimensionName[] {
+        return this._dimensionsSummary.dataDimsOnCoord.slice();
+    }
 
     /**
-     * User output info of this data.
-     * DO NOT use it in other places!
-     *
-     * When preparing user params for user callbacks, we have
-     * to clone these inner data structures to prevent users
-     * from modifying them to effect built-in logic. And for
-     * performance consideration we make this `userOutput` to
-     * avoid clone them too many times.
-     *
-     * @type {Object}
-     * @readOnly
+     * @param coordDim
+     * @param idx A coordDim may map to more than one data dim.
+     *        If idx is `true`, return a array of all mapped dims.
+     *        If idx is not specified, return the first dim not extra.
+     * @return concrete data dim.
+     *        If idx is number, and not found, return null/undefined.
+     *        If idx is `true`, and not found, return empty array (always return array).
      */
-    this.userOutput = this._dimensionsSummary.userOutput;
-};
-
-var listProto = List.prototype;
-
-listProto.type = 'list';
-
-/**
- * If each data item has it's own option
- * @type {boolean}
- */
-listProto.hasItemOption = true;
+    mapDimension<Idx extends (number | true)>(
+        coordDim: DimensionName,
+        idx?: Idx
+    ): (true extends Idx ? DimensionName[] : DimensionName) {
+        var dimensionsSummary = this._dimensionsSummary;
+
+        if (idx == null) {
+            return dimensionsSummary.encodeFirstDimNotExtra[coordDim] as any;
+        }
 
-/**
- * The meanings of the input parameter `dim`:
- *
- * + If dim is a number (e.g., `1`), it means the index of the dimension.
- *   For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'.
- * + If dim is a number-like string (e.g., `"1"`):
- *     + If there is the same concrete dim name defined in `this.dimensions`, it means that concrete name.
- *     + If not, it will be converted to a number, which means the index of the dimension.
- *        (why? because of the backward compatbility. We have been tolerating number-like string in
- *        dimension setting, although now it seems that it is not a good idea.)
- *     For example, `visualMap[i].dimension: "1"` is the same meaning as `visualMap[i].dimension: 1`,
- *     if no dimension name is defined as `"1"`.
- * + If dim is a not-number-like string, it means the concrete dim name.
- *   For example, it can be be default name `"x"`, `"y"`, `"z"`, `"lng"`, `"lat"`, `"angle"`, `"radius"`,
- *   or customized in `dimensions` property of option like `"age"`.
- *
- * Get dimension name
- * @param {string|number} dim See above.
- * @return {string} Concrete dim name.
- */
-listProto.getDimension = function (dim) {
-    if (typeof dim === 'number'
-        // If being a number-like string but not being defined a dimension name.
-        || (!isNaN(dim) && !this._dimensionInfos.hasOwnProperty(dim))
-    ) {
-        dim = this.dimensions[dim];
+        var dims = dimensionsSummary.encode[coordDim];
+        return idx === true
+            // always return array if idx is `true`
+            ? (dims || []).slice()
+            : (dims ? dims[idx as number] as any : null);
     }
-    return dim;
-};
 
-/**
- * Get type and calculation info of particular dimension
- * @param {string|number} dim
- *        Dimension can be concrete names like x, y, z, lng, lat, angle, radius
- *        Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'
- */
-listProto.getDimensionInfo = function (dim) {
-    // Do not clone, because there may be categories in dimInfo.
-    return this._dimensionInfos[this.getDimension(dim)];
-};
+    /**
+     * Initialize from data
+     * @param data source or data or data provider.
+     * @param nameLIst The name of a datum is used on data diff and
+     *        defualt label/tooltip.
+     *        A name can be specified in encode.itemName,
+     *        or dataItem.name (only for series option data),
+     *        or provided in nameList from outside.
+     */
+    initData(
+        data: any,
+        nameList?: string[],
+        dimValueGetter?: DimValueGetter
+    ): void {
+
+        var notProvider = (Source as SourceConstructor).isInstance(data)
+            || zrUtil.isArrayLike(data);
+        if (notProvider) {
+            data = new DefaultDataProvider(data, this.dimensions.length);
+        }
 
-/**
- * @return {Array.<string>} concrete dimension name list on coord.
- */
-listProto.getDimensionsOnCoord = function () {
-    return this._dimensionsSummary.dataDimsOnCoord.slice();
-};
+        if (__DEV__) {
+            if (!notProvider
+                && (typeof data.getItem !== 'function' || typeof data.count !== 'function')
+            ) {
+                throw new Error('Inavlid data provider.');
+            }
+        }
 
-/**
- * @param {string} coordDim
- * @param {number} [idx] A coordDim may map to more than one data dim.
- *        If idx is `true`, return a array of all mapped dims.
- *        If idx is not specified, return the first dim not extra.
- * @return {string|Array.<string>} concrete data dim.
- *        If idx is number, and not found, return null/undefined.
- *        If idx is `true`, and not found, return empty array (always return array).
- */
-listProto.mapDimension = function (coordDim, idx) {
-    var dimensionsSummary = this._dimensionsSummary;
+        this._rawData = data;
 
-    if (idx == null) {
-        return dimensionsSummary.encodeFirstDimNotExtra[coordDim];
-    }
+        // Clear
+        this._storage = {};
+        this._indices = null;
 
-    var dims = dimensionsSummary.encode[coordDim];
-    return idx === true
-        // always return array if idx is `true`
-        ? (dims || []).slice()
-        : (dims && dims[idx]);
-};
+        this._nameList = nameList || [];
 
-/**
- * Initialize from data
- * @param {Array.<Object|number|Array>} data source or data or data provider.
- * @param {Array.<string>} [nameLIst] The name of a datum is used on data diff and
- *        defualt label/tooltip.
- *        A name can be specified in encode.itemName,
- *        or dataItem.name (only for series option data),
- *        or provided in nameList from outside.
- * @param {Function} [dimValueGetter] (dataItem, dimName, dataIndex, dimIndex) => number
- */
-listProto.initData = function (data, nameList, dimValueGetter) {
+        this._idList = [];
 
-    var notProvider = Source.isInstance(data) || zrUtil.isArrayLike(data);
-    if (notProvider) {
-        data = new DefaultDataProvider(data, this.dimensions.length);
-    }
+        this._nameRepeatCount = {};
 
-    if (__DEV__) {
-        if (!notProvider && (typeof data.getItem !== 'function' || typeof data.count !== 'function')) {
-            throw new Error('Inavlid data provider.');
+        if (!dimValueGetter) {
+            this.hasItemOption = false;
         }
-    }
-
-    this._rawData = data;
 
-    // Clear
-    this._storage = {};
-    this._indices = null;
+        this.defaultDimValueGetter = defaultDimValueGetters[
+            this._rawData.getSource().sourceFormat
+        ];
+        // Default dim value getter
+        this._dimValueGetter = dimValueGetter = dimValueGetter
+            || this.defaultDimValueGetter;
+        this._dimValueGetterArrayRows = defaultDimValueGetters.arrayRows;
 
-    this._nameList = nameList || [];
+        // Reset raw extent.
+        this._rawExtent = {};
 
-    this._idList = [];
+        this._initDataFromProvider(0, data.count());
 
-    this._nameRepeatCount = {};
+        // If data has no item option.
+        if (data.pure) {
+            this.hasItemOption = false;
+        }
+    }
 
-    if (!dimValueGetter) {
-        this.hasItemOption = false;
+    getProvider(): DataProvider {
+        return this._rawData;
     }
 
     /**
-     * @readOnly
+     * Caution: Can be only called on raw data (before `this._indices` created).
      */
-    this.defaultDimValueGetter = defaultDimValueGetters[
-        this._rawData.getSource().sourceFormat
-    ];
-    // Default dim value getter
-    this._dimValueGetter = dimValueGetter = dimValueGetter
-        || this.defaultDimValueGetter;
-    this._dimValueGetterArrayRows = defaultDimValueGetters.arrayRows;
-
-    // Reset raw extent.
-    this._rawExtent = {};
-
-    this._initDataFromProvider(0, data.count());
-
-    // If data has no item option.
-    if (data.pure) {
-        this.hasItemOption = false;
-    }
-};
-
-listProto.getProvider = function () {
-    return this._rawData;
-};
-
-/**
- * Caution: Can be only called on raw data (before `this._indices` created).
- */
-listProto.appendData = function (data) {
-    if (__DEV__) {
-        zrUtil.assert(!this._indices, 'appendData can only be called on raw data.');
-    }
+    appendData(data: ArrayLike<any>): void {
+        if (__DEV__) {
+            zrUtil.assert(!this._indices, 'appendData can only be called on raw data.');
+        }
 
-    var rawData = this._rawData;
-    var start = this.count();
-    rawData.appendData(data);
-    var end = rawData.count();
-    if (!rawData.persistent) {
-        end += start;
+        var rawData = this._rawData;
+        var start = this.count();
+        rawData.appendData(data);
+        var end = rawData.count();
+        if (!rawData.persistent) {
+            end += start;
+        }
+        this._initDataFromProvider(start, end);
     }
-    this._initDataFromProvider(start, end);
-};
 
-/**
- * Caution: Can be only called on raw data (before `this._indices` created).
- * This method does not modify `rawData` (`dataProvider`), but only
- * add values to storage.
- *
- * The final count will be increased by `Math.max(values.length, names.length)`.
- *
- * @param {Array.<Array.<*>>} values That is the SourceType: 'arrayRows', like
- *        [
- *            [12, 33, 44],
- *            [NaN, 43, 1],
- *            ['-', 'asdf', 0]
- *        ]
- *        Each item is exaclty cooresponding to a dimension.
- * @param {Array.<string>} [names]
- */
-listProto.appendValues = function (values, names) {
-    var chunkSize = this._chunkSize;
-    var storage = this._storage;
-    var dimensions = this.dimensions;
-    var dimLen = dimensions.length;
-    var rawExtent = this._rawExtent;
-
-    var start = this.count();
-    var end = start + Math.max(values.length, names ? names.length : 0);
-    var originalChunkCount = this._chunkCount;
-
-    for (var i = 0; i < dimLen; i++) {
-        var dim = dimensions[i];
-        if (!rawExtent[dim]) {
-            rawExtent[dim] = getInitialExtent();
-        }
-        if (!storage[dim]) {
-            storage[dim] = [];
+    /**
+     * Caution: Can be only called on raw data (before `this._indices` created).
+     * This method does not modify `rawData` (`dataProvider`), but only
+     * add values to storage.
+     *
+     * The final count will be increased by `Math.max(values.length, names.length)`.
+     *
+     * @param values That is the SourceType: 'arrayRows', like
+     *        [
+     *            [12, 33, 44],
+     *            [NaN, 43, 1],
+     *            ['-', 'asdf', 0]
+     *        ]
+     *        Each item is exaclty cooresponding to a dimension.
+     */
+    appendValues(values: any[][], names?: string[]): void {
+        var chunkSize = this._chunkSize;
+        var storage = this._storage;
+        var dimensions = this.dimensions;
+        var dimLen = dimensions.length;
+        var rawExtent = this._rawExtent;
+
+        var start = this.count();
+        var end = start + Math.max(values.length, names ? names.length : 0);
+        var originalChunkCount = this._chunkCount;
+
+        for (var i = 0; i < dimLen; i++) {
+            var dim = dimensions[i];
+            if (!rawExtent[dim]) {
+                rawExtent[dim] = getInitialExtent();
+            }
+            if (!storage[dim]) {
+                storage[dim] = [];
+            }
+            prepareChunks(storage, this._dimensionInfos[dim], chunkSize, originalChunkCount, end);
+            this._chunkCount = storage[dim].length;
         }
-        prepareChunks(storage, this._dimensionInfos[dim], chunkSize, originalChunkCount, end);
-        this._chunkCount = storage[dim].length;
-    }
 
-    var emptyDataItem = new Array(dimLen);
-    for (var idx = start; idx < end; idx++) {
-        var sourceIdx = idx - start;
-        var chunkIndex = Math.floor(idx / chunkSize);
-        var chunkOffset = idx % chunkSize;
-
-        // Store the data by dimensions
-        for (var k = 0; k < dimLen; k++) {
-            var dim = dimensions[k];
-            var val = this._dimValueGetterArrayRows(
-                values[sourceIdx] || emptyDataItem, dim, sourceIdx, k
-            );
-            storage[dim][chunkIndex][chunkOffset] = val;
+        var emptyDataItem = new Array(dimLen);
+        for (var idx = start; idx < end; idx++) {
+            var sourceIdx = idx - start;
+            var chunkIndex = Math.floor(idx / chunkSize);
+            var chunkOffset = idx % chunkSize;
+
+            // Store the data by dimensions
+            for (var k = 0; k < dimLen; k++) {
+                var dim = dimensions[k];
+                var val = this._dimValueGetterArrayRows(
+                    values[sourceIdx] || emptyDataItem, dim, sourceIdx, k
+                ) as ParsedDataNumeric;
+                storage[dim][chunkIndex][chunkOffset] = val;
+
+                var dimRawExtent = rawExtent[dim];
+                val < dimRawExtent[0] && (dimRawExtent[0] = val);
+                val > dimRawExtent[1] && (dimRawExtent[1] = val);
+            }
 
-            var dimRawExtent = rawExtent[dim];
-            val < dimRawExtent[0] && (dimRawExtent[0] = val);
-            val > dimRawExtent[1] && (dimRawExtent[1] = val);
+            if (names) {
+                this._nameList[idx] = names[sourceIdx];
+            }
         }
 
-        if (names) {
-            this._nameList[idx] = names[sourceIdx];
-        }
-    }
+        this._rawCount = this._count = end;
 
-    this._rawCount = this._count = end;
+        // Reset data extent
+        this._extent = {};
 
-    // Reset data extent
-    this._extent = {};
+        prepareInvertedIndex(this);
+    }
 
-    prepareInvertedIndex(this);
-};
+    private _initDataFromProvider(start: number, end: number): void {
+        // Optimize.
+        if (start >= end) {
+            return;
+        }
 
-listProto._initDataFromProvider = function (start, end) {
-    // Optimize.
-    if (start >= end) {
-        return;
-    }
+        var chunkSize = this._chunkSize;
+        var rawData = this._rawData;
+        var storage = this._storage;
+        var dimensions = this.dimensions;
+        var dimLen = dimensions.length;
+        var dimensionInfoMap = this._dimensionInfos;
+        var nameList = this._nameList;
+        var idList = this._idList;
+        var rawExtent = this._rawExtent;
+        var nameRepeatCount: NameRepeatCount = this._nameRepeatCount = {};
+        var nameDimIdx;
+
+        var originalChunkCount = this._chunkCount;
+        for (var i = 0; i < dimLen; i++) {
+            var dim = dimensions[i];
+            if (!rawExtent[dim]) {
+                rawExtent[dim] = getInitialExtent();
+            }
 
-    var chunkSize = this._chunkSize;
-    var rawData = this._rawData;
-    var storage = this._storage;
-    var dimensions = this.dimensions;
-    var dimLen = dimensions.length;
-    var dimensionInfoMap = this._dimensionInfos;
-    var nameList = this._nameList;
-    var idList = this._idList;
-    var rawExtent = this._rawExtent;
-    var nameRepeatCount = this._nameRepeatCount = {};
-    var nameDimIdx;
+            var dimInfo = dimensionInfoMap[dim];
+            if (dimInfo.otherDims.itemName === 0) {
+                nameDimIdx = this._nameDimIdx = i;
+            }
+            if (dimInfo.otherDims.itemId === 0) {
+                this._idDimIdx = i;
+            }
 
-    var originalChunkCount = this._chunkCount;
-    for (var i = 0; i < dimLen; i++) {
-        var dim = dimensions[i];
-        if (!rawExtent[dim]) {
-            rawExtent[dim] = getInitialExtent();
-        }
+            if (!storage[dim]) {
+                storage[dim] = [];
+            }
 
-        var dimInfo = dimensionInfoMap[dim];
-        if (dimInfo.otherDims.itemName === 0) {
-            nameDimIdx = this._nameDimIdx = i;
-        }
-        if (dimInfo.otherDims.itemId === 0) {
-            this._idDimIdx = i;
-        }
+            prepareChunks(storage, dimInfo, chunkSize, originalChunkCount, end);
 
-        if (!storage[dim]) {
-            storage[dim] = [];
+            this._chunkCount = storage[dim].length;
         }
 
-        prepareChunks(storage, dimInfo, chunkSize, originalChunkCount, end);
-
-        this._chunkCount = storage[dim].length;
-    }
+        var dataItem = new Array(dimLen) as OptionDataItem;
+        for (var idx = start; idx < end; idx++) {
+            // NOTICE: Try not to write things into dataItem
+            dataItem = rawData.getItem(idx, dataItem);
+            // Each data item is value
+            // [1, 2]
+            // 2
+            // Bar chart, line chart which uses category axis
+            // only gives the 'y' value. 'x' value is the indices of category
+            // Use a tempValue to normalize the value to be a (x, y) value
+            var chunkIndex = Math.floor(idx / chunkSize);
+            var chunkOffset = idx % chunkSize;
+
+            // Store the data by dimensions
+            for (var k = 0; k < dimLen; k++) {
+                var dim = dimensions[k];
+                var dimStorage = storage[dim][chunkIndex];
+                // PENDING NULL is empty or zero
+                var val = this._dimValueGetter(dataItem, dim, idx, k) as ParsedDataNumeric;
+                dimStorage[chunkOffset] = val;
+
+                var dimRawExtent = rawExtent[dim];
+                val < dimRawExtent[0] && (dimRawExtent[0] = val);
+                val > dimRawExtent[1] && (dimRawExtent[1] = val);
+            }
 
-    var dataItem = new Array(dimLen);
-    for (var idx = start; idx < end; idx++) {
-        // NOTICE: Try not to write things into dataItem
-        dataItem = rawData.getItem(idx, dataItem);
-        // Each data item is value
-        // [1, 2]
-        // 2
-        // Bar chart, line chart which uses category axis
-        // only gives the 'y' value. 'x' value is the indices of category
-        // Use a tempValue to normalize the value to be a (x, y) value
-        var chunkIndex = Math.floor(idx / chunkSize);
-        var chunkOffset = idx % chunkSize;
-
-        // Store the data by dimensions
-        for (var k = 0; k < dimLen; k++) {
-            var dim = dimensions[k];
-            var dimStorage = storage[dim][chunkIndex];
-            // PENDING NULL is empty or zero
-            var val = this._dimValueGetter(dataItem, dim, idx, k);
-            dimStorage[chunkOffset] = val;
-
-            var dimRawExtent = rawExtent[dim];
-            val < dimRawExtent[0] && (dimRawExtent[0] = val);
-            val > dimRawExtent[1] && (dimRawExtent[1] = val);
-        }
-
-        // ??? FIXME not check by pure but sourceFormat?
-        // TODO refactor these logic.
-        if (!rawData.pure) {
-            var name = nameList[idx];
-
-            if (dataItem && name == null) {
-                // If dataItem is {name: ...}, it has highest priority.
-                // That is appropriate for many common cases.
-                if (dataItem.name != null) {
-                    // There is no other place to persistent dataItem.name,
-                    // so save it to nameList.
-                    nameList[idx] = name = dataItem.name;
-                }
-                else if (nameDimIdx != null) {
-                    var nameDim = dimensions[nameDimIdx];
-                    var nameDimChunk = storage[nameDim][chunkIndex];
-                    if (nameDimChunk) {
-                        name = nameDimChunk[chunkOffset];
-                        var ordinalMeta = dimensionInfoMap[nameDim].ordinalMeta;
-                        if (ordinalMeta && ordinalMeta.categories.length) {
-                            name = ordinalMeta.categories[name];
+            // ??? FIXME not check by pure but sourceFormat?
+            // TODO refactor these logic.
+            if (!rawData.pure) {
+                var name: any = nameList[idx];
+
+                if (dataItem && name == null) {
+                    // If dataItem is {name: ...}, it has highest priority.
+                    // That is appropriate for many common cases.
+                    if ((dataItem as any).name != null) {
+                        // There is no other place to persistent dataItem.name,
+                        // so save it to nameList.
+                        nameList[idx] = name = (dataItem as any).name;
+                    }
+                    else if (nameDimIdx != null) {
+                        var nameDim = dimensions[nameDimIdx];
+                        var nameDimChunk = storage[nameDim][chunkIndex];
+                        if (nameDimChunk) {
+                            name = nameDimChunk[chunkOffset];
+                            var ordinalMeta = dimensionInfoMap[nameDim].ordinalMeta;
+                            if (ordinalMeta && ordinalMeta.categories.length) {
+                                name = ordinalMeta.categories[name];
+                            }
                         }
                     }
                 }
-            }
 
-            // Try using the id in option
-            // id or name is used on dynamical data, mapping old and new items.
-            var id = dataItem == null ? null : dataItem.id;
+                // Try using the id in option
+                // id or name is used on dynamical data, mapping old and new items.
+                var id = dataItem == null ? null : (dataItem as any).id;
 
-            if (id == null && name != null) {
-                // Use name as id and add counter to avoid same name
-                nameRepeatCount[name] = nameRepeatCount[name] || 0;
-                id = name;
-                if (nameRepeatCount[name] > 0) {
-                    id += '__ec__' + nameRepeatCount[name];
+                if (id == null && name != null) {
+                    // Use name as id and add counter to avoid same name
+                    nameRepeatCount[name] = nameRepeatCount[name] || 0;
+                    id = name;
+                    if (nameRepeatCount[name] > 0) {
+                        id += '__ec__' + nameRepeatCount[name];
+                    }
+                    nameRepeatCount[name]++;
                 }
-                nameRepeatCount[name]++;
+                id != null && (idList[idx] = id);
             }
-            id != null && (idList[idx] = id);
         }
-    }
-
-    if (!rawData.persistent && rawData.clean) {
-        // Clean unused data if data source is typed array.
-        rawData.clean();
-    }
 
-    this._rawCount = this._count = end;
+        if (!rawData.persistent && rawData.clean) {
+            // Clean unused data if data source is typed array.
+            rawData.clean();
+        }
 
-    // Reset data extent
-    this._extent = {};
+        this._rawCount = this._count = end;
 
-    prepareInvertedIndex(this);
-};
+        // Reset data extent
+        this._extent = {};
 
-function prepareChunks(storage, dimInfo, chunkSize, chunkCount, end) {
-    var DataCtor = dataCtors[dimInfo.type];
-    var lastChunkIndex = chunkCount - 1;
-    var dim = dimInfo.name;
-    var resizeChunkArray = storage[dim][lastChunkIndex];
-    if (resizeChunkArray && resizeChunkArray.length < chunkSize) {
-        var newStore = new DataCtor(Math.min(end - lastChunkIndex * chunkSize, chunkSize));
-        // The cost of the copy is probably inconsiderable
-        // within the initial chunkSize.
-        for (var j = 0; j < resizeChunkArray.length; j++) {
-            newStore[j] = resizeChunkArray[j];
-        }
-        storage[dim][lastChunkIndex] = newStore;
+        prepareInvertedIndex(this);
     }
 
-    // Create new chunks.
-    for (var k = chunkCount * chunkSize; k < end; k += chunkSize) {
-        storage[dim].push(new DataCtor(Math.min(end - k, chunkSize)));
+    count(): number {
+        return this._count;
     }
-}
 
-function prepareInvertedIndex(list) {
-    var invertedIndicesMap = list._invertedIndicesMap;
-    zrUtil.each(invertedIndicesMap, function (invertedIndices, dim) {
-        var dimInfo = list._dimensionInfos[dim];
+    getIndices(): ArrayLike<number> {
+        var newIndices;
 
-        // Currently, only dimensions that has ordinalMeta can create inverted indices.
-        var ordinalMeta = dimInfo.ordinalMeta;
-        if (ordinalMeta) {
-            invertedIndices = invertedIndicesMap[dim] = new CtorInt32Array(
-                ordinalMeta.categories.length
-            );
-            // The default value of TypedArray is 0. To avoid miss
-            // mapping to 0, we should set it as INDEX_NOT_FOUND.
-            for (var i = 0; i < invertedIndices.length; i++) {
-                invertedIndices[i] = INDEX_NOT_FOUND;
+        var indices = this._indices;
+        if (indices) {
+            var Ctor = indices.constructor as DataArrayLikeConstructor;
+            var thisCount = this._count;
+            // `new Array(a, b, c)` is different from `new Uint32Array(a, b, c)`.
+            if (Ctor === Array) {
+                newIndices = new Ctor(thisCount);
+                for (var i = 0; i < thisCount; i++) {
+                    newIndices[i] = indices[i];
+                }
             }
-            for (var i = 0; i < list._count; i++) {
-                // Only support the case that all values are distinct.
-                invertedIndices[list.get(dim, i)] = i;
+            else {
+                newIndices = new (Ctor as DataTypedArrayConstructor)(
+                    (indices as DataTypedArray).buffer, 0, thisCount
+                );
             }
         }
-    });
-}
-
-function getRawValueFromStore(list, dimIndex, rawIndex) {
-    var val;
-    if (dimIndex != null) {
-        var chunkSize = list._chunkSize;
-        var chunkIndex = Math.floor(rawIndex / chunkSize);
-        var chunkOffset = rawIndex % chunkSize;
-        var dim = list.dimensions[dimIndex];
-        var chunk = list._storage[dim][chunkIndex];
-        if (chunk) {
-            val = chunk[chunkOffset];
-            var ordinalMeta = list._dimensionInfos[dim].ordinalMeta;
-            if (ordinalMeta && ordinalMeta.categories.length) {
-                val = ordinalMeta.categories[val];
+        else {
+            var Ctor = getIndicesCtor(this);
+            newIndices = new Ctor(this.count());
+            for (var i = 0; i < newIndices.length; i++) {
+                newIndices[i] = i;
             }
         }
-    }
-    return val;
-}
 
-/**
- * @return {number}
- */
-listProto.count = function () {
-    return this._count;
-};
+        return newIndices;
+    }
 
-listProto.getIndices = function () {
-    var newIndices;
-
-    var indices = this._indices;
-    if (indices) {
-        var Ctor = indices.constructor;
-        var thisCount = this._count;
-        // `new Array(a, b, c)` is different from `new Uint32Array(a, b, c)`.
-        if (Ctor === Array) {
-            newIndices = new Ctor(thisCount);
-            for (var i = 0; i < thisCount; i++) {
-                newIndices[i] = indices[i];
-            }
-        }
-        else {
-            newIndices = new Ctor(indices.buffer, 0, thisCount);
+    /**
+     * Get value. Return NaN if idx is out of range.
+     * @param dim Dim must be concrete name.
+     */
+    get(dim: DimensionName, idx: number): ParsedDataValue {
+        if (!(idx >= 0 && idx < this._count)) {
+            return NaN;
         }
-    }
-    else {
-        var Ctor = getIndicesCtor(this);
-        var newIndices = new Ctor(this.count());
-        for (var i = 0; i < newIndices.length; i++) {
-            newIndices[i] = i;
+        var storage = this._storage;
+        if (!storage[dim]) {
+            // TODO Warn ?
+            return NaN;
         }
+
+        idx = this.getRawIndex(idx);
+
+        var chunkIndex = Math.floor(idx / this._chunkSize);
+        var chunkOffset = idx % this._chunkSize;
+
+        var chunkStore = storage[dim][chunkIndex];
+        var value = chunkStore[chunkOffset];
+        // FIXME ordinal data type is not stackable
+        // if (stack) {
+        //     var dimensionInfo = this._dimensionInfos[dim];
+        //     if (dimensionInfo && dimensionInfo.stackable) {
+        //         var stackedOn = this.stackedOn;
+        //         while (stackedOn) {
+        //             // Get no stacked data of stacked on
+        //             var stackedValue = stackedOn.get(dim, idx);
+        //             // Considering positive stack, negative stack and empty data
+        //             if ((value >= 0 && stackedValue > 0)  // Positive stack
+        //                 || (value <= 0 && stackedValue < 0) // Negative stack
+        //             ) {
+        //                 value += stackedValue;
+        //             }
+        //             stackedOn = stackedOn.stackedOn;
+        //         }
+        //     }
+        // }
+
+        return value;
     }
 
-    return newIndices;
-};
+    /**
+     * @param dim concrete dim
+     */
+    getByRawIndex(dim: DimensionName, rawIdx: number): ParsedDataValue {
+        if (!(rawIdx >= 0 && rawIdx < this._rawCount)) {
+            return NaN;
+        }
+        var dimStore = this._storage[dim];
+        if (!dimStore) {
+            // TODO Warn ?
+            return NaN;
+        }
 
-/**
- * Get value. Return NaN if idx is out of range.
- * @param {string} dim Dim must be concrete name.
- * @param {number} idx
- * @param {boolean} stack
- * @return {number}
- */
-listProto.get = function (dim, idx /*, stack */) {
-    if (!(idx >= 0 && idx < this._count)) {
-        return NaN;
+        var chunkIndex = Math.floor(rawIdx / this._chunkSize);
+        var chunkOffset = rawIdx % this._chunkSize;
+        var chunkStore = dimStore[chunkIndex];
+        return chunkStore[chunkOffset];
     }
-    var storage = this._storage;
-    if (!storage[dim]) {
-        // TODO Warn ?
-        return NaN;
+
+    /**
+     * FIXME Use `get` on chrome maybe slow(in filterSelf and selectRange).
+     * Hack a much simpler _getFast
+     */
+    private _getFast(dim: DimensionName, rawIdx: number): ParsedDataValue {
+        var chunkIndex = Math.floor(rawIdx / this._chunkSize);
+        var chunkOffset = rawIdx % this._chunkSize;
+        var chunkStore = this._storage[dim][chunkIndex];
+        return chunkStore[chunkOffset];
     }
 
-    idx = this.getRawIndex(idx);
-
-    var chunkIndex = Math.floor(idx / this._chunkSize);
-    var chunkOffset = idx % this._chunkSize;
-
-    var chunkStore = storage[dim][chunkIndex];
-    var value = chunkStore[chunkOffset];
-    // FIXME ordinal data type is not stackable
-    // if (stack) {
-    //     var dimensionInfo = this._dimensionInfos[dim];
-    //     if (dimensionInfo && dimensionInfo.stackable) {
-    //         var stackedOn = this.stackedOn;
-    //         while (stackedOn) {
-    //             // Get no stacked data of stacked on
-    //             var stackedValue = stackedOn.get(dim, idx);
-    //             // Considering positive stack, negative stack and empty data
-    //             if ((value >= 0 && stackedValue > 0)  // Positive stack
-    //                 || (value <= 0 && stackedValue < 0) // Negative stack
-    //             ) {
-    //                 value += stackedValue;
-    //             }
-    //             stackedOn = stackedOn.stackedOn;
-    //         }
-    //     }
-    // }
+    /**
+     * Get value for multi dimensions.
+     * @param dimensions If ignored, using all dimensions.
+     */
+    getValues(idx: number): ParsedDataValue[];
+    getValues(dimensions: DimensionName[], idx: number): ParsedDataValue[];
+    getValues(dimensions: DimensionName[] | number, idx?: number): ParsedDataValue[] {
+        var values = [];
+
+        if (!zrUtil.isArray(dimensions)) {
+            // stack = idx;
+            idx = dimensions;
+            dimensions = this.dimensions;
+        }
 
-    return value;
-};
+        for (var i = 0, len = dimensions.length; i < len; i++) {
+            values.push(this.get(dimensions[i], idx /*, stack */));
+        }
 
-/**
- * @param {string} dim concrete dim
- * @param {number} rawIndex
- * @return {number|string}
- */
-listProto.getByRawIndex = function (dim, rawIdx) {
-    if (!(rawIdx >= 0 && rawIdx < this._rawCount)) {
-        return NaN;
+        return values;
     }
-    var dimStore = this._storage[dim];
-    if (!dimStore) {
-        // TODO Warn ?
-        return NaN;
+
+    /**
+     * If value is NaN. Inlcuding '-'
+     * Only check the coord dimensions.
+     */
+    hasValue(idx: number): boolean {
+        var dataDimsOnCoord = this._dimensionsSummary.dataDimsOnCoord;
+        for (var i = 0, len = dataDimsOnCoord.length; i < len; i++) {
+            // Ordinal type originally can be string or number.
+            // But when an ordinal type is used on coord, it can
+            // not be string but only number. So we can also use isNaN.
+            if (isNaN(this.get(dataDimsOnCoord[i], idx) as any)) {
+                return false;
+            }
+        }
+        return true;
     }
 
-    var chunkIndex = Math.floor(rawIdx / this._chunkSize);
-    var chunkOffset = rawIdx % this._chunkSize;
-    var chunkStore = dimStore[chunkIndex];
-    return chunkStore[chunkOffset];
-};
+    /**
+     * Get extent of data in one dimension
+     */
+    getDataExtent(dim: DimensionLoose): [number, number] {
+        // Make sure use concrete dim as cache name.
+        dim = this.getDimension(dim);
+        var dimData = this._storage[dim];
+        var initialExtent = getInitialExtent();
 
-/**
- * FIXME Use `get` on chrome maybe slow(in filterSelf and selectRange).
- * Hack a much simpler _getFast
- * @private
- */
-listProto._getFast = function (dim, rawIdx) {
-    var chunkIndex = Math.floor(rawIdx / this._chunkSize);
-    var chunkOffset = rawIdx % this._chunkSize;
-    var chunkStore = this._storage[dim][chunkIndex];
-    return chunkStore[chunkOffset];
-};
+        // stack = !!((stack || false) && this.getCalculationInfo(dim));
 
-/**
- * Get value for multi dimensions.
- * @param {Array.<string>} [dimensions] If ignored, using all dimensions.
- * @param {number} idx
- * @return {number}
- */
-listProto.getValues = function (dimensions, idx /*, stack */) {
-    var values = [];
+        if (!dimData) {
+            return initialExtent;
+        }
 
-    if (!zrUtil.isArray(dimensions)) {
-        // stack = idx;
-        idx = dimensions;
-        dimensions = this.dimensions;
-    }
+        // Make more strict checkings to ensure hitting cache.
+        var currEnd = this.count();
+        // var cacheName = [dim, !!stack].join('_');
+        // var cacheName = dim;
 
-    for (var i = 0, len = dimensions.length; i < len; i++) {
-        values.push(this.get(dimensions[i], idx /*, stack */));
-    }
+        // Consider the most cases when using data zoom, `getDataExtent`
+        // happened before filtering. We cache raw extent, which is not
+        // necessary to be cleared and recalculated when restore data.
+        var useRaw = !this._indices; // && !stack;
+        var dimExtent: [number, number];
 
-    return values;
-};
+        if (useRaw) {
+            return this._rawExtent[dim].slice() as [number, number];
+        }
+        dimExtent = this._extent[dim];
+        if (dimExtent) {
+            return dimExtent.slice() as [number, number];
+        }
+        dimExtent = initialExtent;
 
-/**
- * If value is NaN. Inlcuding '-'
- * Only check the coord dimensions.
- * @param {string} dim
- * @param {number} idx
- * @return {number}
- */
-listProto.hasValue = function (idx) {
-    var dataDimsOnCoord = this._dimensionsSummary.dataDimsOnCoord;
-    for (var i = 0, len = dataDimsOnCoord.length; i < len; i++) {
-        // Ordinal type originally can be string or number.
-        // But when an ordinal type is used on coord, it can
-        // not be string but only number. So we can also use isNaN.
-        if (isNaN(this.get(dataDimsOnCoord[i], idx))) {
-            return false;
+        var min = dimExtent[0];
+        var max = dimExtent[1];
+
+        for (var i = 0; i < currEnd; i++) {
+            // var value = stack ? this.get(dim, i, true) : this._getFast(dim, this.getRawIndex(i));
+            var value = this._getFast(dim, this.getRawIndex(i)) as ParsedDataNumeric;
+            value < min && (min = value);
+            value > max && (max = value);
         }
-    }
-    return true;
-};
 
-/**
- * Get extent of data in one dimension
- * @param {string} dim
- * @param {boolean} stack
- */
-listProto.getDataExtent = function (dim /*, stack */) {
-    // Make sure use concrete dim as cache name.
-    dim = this.getDimension(dim);
-    var dimData = this._storage[dim];
-    var initialExtent = getInitialExtent();
+        dimExtent = [min, max];
 
-    // stack = !!((stack || false) && this.getCalculationInfo(dim));
+        this._extent[dim] = dimExtent;
 
-    if (!dimData) {
-        return initialExtent;
+        return dimExtent;
     }
 
-    // Make more strict checkings to ensure hitting cache.
-    var currEnd = this.count();
-    // var cacheName = [dim, !!stack].join('_');
-    // var cacheName = dim;
-
-    // Consider the most cases when using data zoom, `getDataExtent`
-    // happened before filtering. We cache raw extent, which is not
-    // necessary to be cleared and recalculated when restore data.
-    var useRaw = !this._indices; // && !stack;
-    var dimExtent;
+    /**
+     * Optimize for the scenario that data is filtered by a given extent.
+     * Consider that if data amount is more than hundreds of thousand,
+     * extent calculation will cost more than 10ms and the cache will
+     * be erased because of the filtering.
+     */
+    getApproximateExtent(dim: DimensionLoose): [number, number] {
+        dim = this.getDimension(dim);
+        return this._approximateExtent[dim] || this.getDataExtent(dim /*, stack */);
+    }
 
-    if (useRaw) {
-        return this._rawExtent[dim].slice();
+    setApproximateExtent(extent: [number, number], dim: DimensionLoose): void {
+        dim = this.getDimension(dim);
+        this._approximateExtent[dim] = extent.slice() as [number, number];
     }
-    dimExtent = this._extent[dim];
-    if (dimExtent) {
-        return dimExtent.slice();
+
+    getCalculationInfo(key: string): object {
+        return this._calculationInfo[key];
     }
-    dimExtent = initialExtent;
 
-    var min = dimExtent[0];
-    var max = dimExtent[1];
+    /**
+     * @param key or k-v object
+     */
+    setCalculationInfo(key: string | object, value?: any) {
+        isObject(key)
+            ? zrUtil.extend(this._calculationInfo, key as object)
+            : (this._calculationInfo[key] = value);
+    }
 
-    for (var i = 0; i < currEnd; i++) {
-        // var value = stack ? this.get(dim, i, true) : this._getFast(dim, this.getRawIndex(i));
-        var value = this._getFast(dim, this.getRawIndex(i));
-        value < min && (min = value);
-        value > max && (max = value);
+    /**
+     * Get sum of data in one dimension
+     */
+    getSum(dim: DimensionName): number {
+        var dimData = this._storage[dim];
+        var sum = 0;
+        if (dimData) {
+            for (var i = 0, len = this.count(); i < len; i++) {
+                var value = this.get(dim, i) as number;
+                if (!isNaN(value)) {
+                    sum += value;
+                }
+            }
+        }
+        return sum;
     }
 
-    dimExtent = [min, max];
+    /**
+     * Get median of data in one dimension
+     */
+    getMedian(dim: DimensionLoose): number {
+        var dimDataArray: ParsedDataValue[] = [];
+        // map all data of one dimension
+        this.each(dim, function (val) {
+            if (!isNaN(val as number)) {
+                dimDataArray.push(val);
+            }
+        });
+
+        // TODO
+        // Use quick select?
+
+        // immutability & sort
+        var sortedDimDataArray = [].concat(dimDataArray).sort(function (a, b) {
+            return a - b;
+        });
+        var len = this.count();
+        // calculate median
+        return len === 0
+            ? 0
+            : len % 2 === 1
+            ? sortedDimDataArray[(len - 1) / 2]
+            : (sortedDimDataArray[len / 2] + sortedDimDataArray[len / 2 - 1]) / 2;
+    }
+
+    // /**
+    //  * Retreive the index with given value
+    //  * @param {string} dim Concrete dimension.
+    //  * @param {number} value
+    //  * @return {number}
+    //  */
+    // Currently incorrect: should return dataIndex but not rawIndex.
+    // Do not fix it until this method is to be used somewhere.
+    // FIXME Precision of float value
+    // indexOf(dim, value) {
+    //     var storage = this._storage;
+    //     var dimData = storage[dim];
+    //     var chunkSize = this._chunkSize;
+    //     if (dimData) {
+    //         for (var i = 0, len = this.count(); i < len; i++) {
+    //             var chunkIndex = Math.floor(i / chunkSize);
+    //             var chunkOffset = i % chunkSize;
+    //             if (dimData[chunkIndex][chunkOffset] === value) {
+    //                 return i;
+    //             }
+    //         }
+    //     }
+    //     return -1;
+    // }
 
-    this._extent[dim] = dimExtent;
+    /**
+     * Only support the dimension which inverted index created.
+     * Do not support other cases until required.
+     * @param dim concrete dim
+     * @param value ordinal index
+     * @return rawIndex
+     */
+    rawIndexOf(dim: DimensionName, value: OrdinalRawValueIndex): number {
+        var invertedIndices = dim && this._invertedIndicesMap[dim];
+        if (__DEV__) {
+            if (!invertedIndices) {
+                throw new Error('Do not supported yet');
+            }
+        }
+        var rawIndex = invertedIndices[value];
+        if (rawIndex == null || isNaN(rawIndex)) {
+            return INDEX_NOT_FOUND;
+        }
+        return rawIndex;
+    }
 
-    return dimExtent;
-};
-
-/**
- * Optimize for the scenario that data is filtered by a given extent.
- * Consider that if data amount is more than hundreds of thousand,
- * extent calculation will cost more than 10ms and the cache will
- * be erased because of the filtering.
- */
-listProto.getApproximateExtent = function (dim /*, stack */) {
-    dim = this.getDimension(dim);
-    return this._approximateExtent[dim] || this.getDataExtent(dim /*, stack */);
-};
-
-listProto.setApproximateExtent = function (extent, dim /*, stack */) {
-    dim = this.getDimension(dim);
-    this._approximateExtent[dim] = extent.slice();
-};
-
-/**
- * @param {string} key
- * @return {*}
- */
-listProto.getCalculationInfo = function (key) {
-    return this._calculationInfo[key];
-};
-
-/**
- * @param {string|Object} key or k-v object
- * @param {*} [value]
- */
-listProto.setCalculationInfo = function (key, value) {
-    isObject(key)
-        ? zrUtil.extend(this._calculationInfo, key)
-        : (this._calculationInfo[key] = value);
-};
-
-/**
- * Get sum of data in one dimension
- * @param {string} dim
- */
-listProto.getSum = function (dim /*, stack */) {
-    var dimData = this._storage[dim];
-    var sum = 0;
-    if (dimData) {
+    /**
+     * Retreive the index with given name
+     */
+    indexOfName(name: string): number {
         for (var i = 0, len = this.count(); i < len; i++) {
-            var value = this.get(dim, i /*, stack */);
-            if (!isNaN(value)) {
-                sum += value;
+            if (this.getName(i) === name) {
+                return i;
             }
         }
-    }
-    return sum;
-};
-
-/**
- * Get median of data in one dimension
- * @param {string} dim
- */
-listProto.getMedian = function (dim /*, stack */) {
-    var dimDataArray = [];
-    // map all data of one dimension
-    this.each(dim, function (val, idx) {
-        if (!isNaN(val)) {
-            dimDataArray.push(val);
-        }
-    });
-
-    // TODO
-    // Use quick select?
-
-    // immutability & sort
-    var sortedDimDataArray = [].concat(dimDataArray).sort(function (a, b) {
-        return a - b;
-    });
-    var len = this.count();
-    // calculate median
-    return len === 0
-        ? 0
-        : len % 2 === 1
-        ? sortedDimDataArray[(len - 1) / 2]
-        : (sortedDimDataArray[len / 2] + sortedDimDataArray[len / 2 - 1]) / 2;
-};
 
-// /**
-//  * Retreive the index with given value
-//  * @param {string} dim Concrete dimension.
-//  * @param {number} value
-//  * @return {number}
-//  */
-// Currently incorrect: should return dataIndex but not rawIndex.
-// Do not fix it until this method is to be used somewhere.
-// FIXME Precision of float value
-// listProto.indexOf = function (dim, value) {
-//     var storage = this._storage;
-//     var dimData = storage[dim];
-//     var chunkSize = this._chunkSize;
-//     if (dimData) {
-//         for (var i = 0, len = this.count(); i < len; i++) {
-//             var chunkIndex = Math.floor(i / chunkSize);
-//             var chunkOffset = i % chunkSize;
-//             if (dimData[chunkIndex][chunkOffset] === value) {
-//                 return i;
-//             }
-//         }
-//     }
-//     return -1;
-// };
+        return -1;
+    }
 
-/**
- * Only support the dimension which inverted index created.
- * Do not support other cases until required.
- * @param {string} concrete dim
- * @param {number|string} value
- * @return {number} rawIndex
- */
-listProto.rawIndexOf = function (dim, value) {
-    var invertedIndices = dim && this._invertedIndicesMap[dim];
-    if (__DEV__) {
-        if (!invertedIndices) {
-            throw new Error('Do not supported yet');
+    /**
+     * Retreive the index with given raw data index
+     */
+    indexOfRawIndex(rawIndex: number): number {
+        if (rawIndex >= this._rawCount || rawIndex < 0) {
+            return -1;
         }
-    }
-    var rawIndex = invertedIndices[value];
-    if (rawIndex == null || isNaN(rawIndex)) {
-        return INDEX_NOT_FOUND;
-    }
-    return rawIndex;
-};
 
-/**
- * Retreive the index with given name
- * @param {number} idx
- * @param {number} name
- * @return {number}
- */
-listProto.indexOfName = function (name) {
-    for (var i = 0, len = this.count(); i < len; i++) {
-        if (this.getName(i) === name) {
-            return i;
+        if (!this._indices) {
+            return rawIndex;
         }
-    }
 
-    return -1;
-};
+        // Indices are ascending
+        var indices = this._indices;
 
-/**
- * Retreive the index with given raw data index
- * @param {number} idx
- * @param {number} name
- * @return {number}
- */
-listProto.indexOfRawIndex = function (rawIndex) {
-    if (rawIndex >= this._rawCount || rawIndex < 0) {
+        // If rawIndex === dataIndex
+        var rawDataIndex = indices[rawIndex];
+        if (rawDataIndex != null && rawDataIndex < this._count && rawDataIndex === rawIndex) {
+            return rawIndex;
+        }
+
+        var left = 0;
+        var right = this._count - 1;
+        while (left <= right) {
+            var mid = (left + right) / 2 | 0;
+            if (indices[mid] < rawIndex) {
+                left = mid + 1;
+            }
+            else if (indices[mid] > rawIndex) {
+                right = mid - 1;
+            }
+            else {
+                return mid;
+            }
+        }
         return -1;
     }
 
-    if (!this._indices) {
-        return rawIndex;
-    }
+    /**
+     * Retreive the index of nearest value
+     * @param dim
+     * @param value
+     * @param [maxDistance=Infinity]
+     * @return If and only if multiple indices has
+     *         the same value, they are put to the result.
+     */
+    indicesOfNearest(
+        dim: DimensionName, value: number, maxDistance?: number
+    ): number[] {
+        var storage = this._storage;
+        var dimData = storage[dim];
+        var nearestIndices: number[] = [];
+
+        if (!dimData) {
+            return nearestIndices;
+        }
 
-    // Indices are ascending
-    var indices = this._indices;
+        if (maxDistance == null) {
+            maxDistance = Infinity;
+        }
 
-    // If rawIndex === dataIndex
-    var rawDataIndex = indices[rawIndex];
-    if (rawDataIndex != null && rawDataIndex < this._count && rawDataIndex === rawIndex) {
-        return rawIndex;
-    }
+        var minDist = Infinity;
+        var minDiff = -1;
+        var nearestIndicesLen = 0;
 
-    var left = 0;
-    var right = this._count - 1;
-    while (left <= right) {
-        var mid = (left + right) / 2 | 0;
-        if (indices[mid] < rawIndex) {
-            left = mid + 1;
-        }
-        else if (indices[mid] > rawIndex) {
-            right = mid - 1;
-        }
-        else {
-            return mid;
+        // Check the test case of `test/ut/spec/data/List.js`.
+        for (var i = 0, len = this.count(); i < len; i++) {
+            var diff = value - (this.get(dim, i) as number);
+            var dist = Math.abs(diff);
+            if (dist <= maxDistance) {
+                // When the `value` is at the middle of `this.get(dim, i)` and `this.get(dim, i+1)`,
+                // we'd better not push both of them to `nearestIndices`, otherwise it is easy to
+                // get more than one item in `nearestIndices` (more specifically, in `tooltip`).
+                // So we chose the one that `diff >= 0` in this csae.
+                // But if `this.get(dim, i)` and `this.get(dim, j)` get the same value, both of them
+                // should be push to `nearestIndices`.
+                if (dist < minDist
+                    || (dist === minDist && diff >= 0 && minDiff < 0)
+                ) {
+                    minDist = dist;
+                    minDiff = diff;
+                    nearestIndicesLen = 0;
+                }
+                if (diff === minDiff) {
+                    nearestIndices[nearestIndicesLen++] = i;
+                }
+            }
         }
-    }
-    return -1;
-};
-
-/**
- * Retreive the index of nearest value
- * @param {string} dim
- * @param {number} value
- * @param {number} [maxDistance=Infinity]
- * @return {Array.<number>} If and only if multiple indices has
- *        the same value, they are put to the result.
- */
-listProto.indicesOfNearest = function (dim, value, maxDistance) {
-    var storage = this._storage;
-    var dimData = storage[dim];
-    var nearestIndices = [];
+        nearestIndices.length = nearestIndicesLen;
 
-    if (!dimData) {
         return nearestIndices;
     }
 
-    if (maxDistance == null) {
-        maxDistance = Infinity;
-    }
+    /**
+     * Get raw data index.
+     * Do not initialize.
+     * Default `getRawIndex`. And it can be changed.
+     */
+    getRawIndex: (idx: number) => number = getRawIndexWithoutIndices;
 
-    var minDist = Infinity;
-    var minDiff = -1;
-    var nearestIndicesLen = 0;
-
-    // Check the test case of `test/ut/spec/data/List.js`.
-    for (var i = 0, len = this.count(); i < len; i++) {
-        var diff = value - this.get(dim, i);
-        var dist = Math.abs(diff);
-        if (dist <= maxDistance) {
-            // When the `value` is at the middle of `this.get(dim, i)` and `this.get(dim, i+1)`,
-            // we'd better not push both of them to `nearestIndices`, otherwise it is easy to
-            // get more than one item in `nearestIndices` (more specifically, in `tooltip`).
-            // So we chose the one that `diff >= 0` in this csae.
-            // But if `this.get(dim, i)` and `this.get(dim, j)` get the same value, both of them
-            // should be push to `nearestIndices`.
-            if (dist < minDist
-                || (dist === minDist && diff >= 0 && minDiff < 0)
-            ) {
-                minDist = dist;
-                minDiff = diff;
-                nearestIndicesLen = 0;
-            }
-            if (diff === minDiff) {
-                nearestIndices[nearestIndicesLen++] = i;
+    /**
+     * Get raw data item
+     */
+    getRawDataItem(idx: number): OptionDataItem {
+        if (!this._rawData.persistent) {
+            var val = [];
+            for (var i = 0; i < this.dimensions.length; i++) {
+                var dim = this.dimensions[i];
+                val.push(this.get(dim, idx));
             }
+            return val;
+        }
+        else {
+            return this._rawData.getItem(this.getRawIndex(idx));
         }
     }
-    nearestIndices.length = nearestIndicesLen;
-
-    return nearestIndices;
-};
-
-/**
- * Get raw data index
- * @param {number} idx
- * @return {number}
- */
-listProto.getRawIndex = getRawIndexWithoutIndices;
 
-function getRawIndexWithoutIndices(idx) {
-    return idx;
-}
+    getName(idx: number): string {
+        var rawIndex = this.getRawIndex(idx);
+        return this._nameList[rawIndex]
+            || getRawValueFromStore(this, this._nameDimIdx, rawIndex)
+            || '';
+    }
 
-function getRawIndexWithIndices(idx) {
-    if (idx < this._count && idx >= 0) {
-        return this._indices[idx];
+    getId(idx: number): string {
+        return getId(this, this.getRawIndex(idx));
     }
-    return -1;
-}
 
-/**
- * Get raw data item
- * @param {number} idx
- * @return {number}
- */
-listProto.getRawDataItem = function (idx) {
-    if (!this._rawData.persistent) {
-        var val = [];
-        for (var i = 0; i < this.dimensions.length; i++) {
-            var dim = this.dimensions[i];
-            val.push(this.get(dim, idx));
+    /**
+     * Data iteration
+     * @param ctx default this
+     * @example
+     *  list.each('x', function (x, idx) {});
+     *  list.each(['x', 'y'], function (x, y, idx) {});
+     *  list.each(function (idx) {})
+     */
+    each<Ctx>(cb: EachCb0<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
+    each<Ctx>(dims: DimensionLoose, cb: EachCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
+    each<Ctx>(dims: [DimensionLoose], cb: EachCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
+    each<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: EachCb2<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
+    each<Ctx>(dims: ItrParamDims, cb: EachCb<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
+    each<Ctx>(
+        dims: ItrParamDims | EachCb<Ctx>,
+        cb: EachCb<Ctx> | Ctx,
+        ctx?: Ctx,
+        ctxCompat?: Ctx
+    ): void {
+        'use strict';
+
+        if (!this._count) {
+            return;
         }
-        return val;
-    }
-    else {
-        return this._rawData.getItem(this.getRawIndex(idx));
-    }
-};
 
-/**
- * @param {number} idx
- * @param {boolean} [notDefaultIdx=false]
- * @return {string}
- */
-listProto.getName = function (idx) {
-    var rawIndex = this.getRawIndex(idx);
-    return this._nameList[rawIndex]
-        || getRawValueFromStore(this, this._nameDimIdx, rawIndex)
-        || '';
-};
+        if (typeof dims === 'function') {
+            ctxCompat = ctx;
+            ctx = cb as Ctx;
+            cb = dims;
+            dims = [];
+        }
 
-/**
- * @param {number} idx
- * @param {boolean} [notDefaultIdx=false]
- * @return {string}
- */
-listProto.getId = function (idx) {
-    return getId(this, this.getRawIndex(idx));
-};
+        // ctxCompat just for compat echarts3
+        var fCtx = (ctx || ctxCompat || this) as CtxOrList<Ctx>;
 
-function getId(list, rawIndex) {
-    var id = list._idList[rawIndex];
-    if (id == null) {
-        id = getRawValueFromStore(list, list._idDimIdx, rawIndex);
-    }
-    if (id == null) {
-        // FIXME Check the usage in graph, should not use prefix.
-        id = ID_PREFIX + rawIndex;
-    }
-    return id;
-}
+        var dimNames = zrUtil.map(normalizeDimensions(dims), this.getDimension, this);
 
-function normalizeDimensions(dimensions) {
-    if (!zrUtil.isArray(dimensions)) {
-        dimensions = [dimensions];
-    }
-    return dimensions;
-}
+        if (__DEV__) {
+            validateDimensions(this, dimNames);
+        }
 
-function validateDimensions(list, dims) {
-    for (var i = 0; i < dims.length; i++) {
-        // stroage may be empty when no data, so use
-        // dimensionInfos to check.
-        if (!list._dimensionInfos[dims[i]]) {
-            console.error('Unkown dimension ' + dims[i]);
+        var dimSize = dimNames.length;
+
+        for (var i = 0; i < this.count(); i++) {
+            // Simple optimization
+            switch (dimSize) {
+                case 0:
+                    (cb as EachCb0<Ctx>).call(fCtx, i);
+                    break;
+                case 1:
+                    (cb as EachCb1<Ctx>).call(fCtx, this.get(dimNames[0], i), i);
+                    break;
+                case 2:
+                    (cb as EachCb2<Ctx>).call(fCtx, this.get(dimNames[0], i), this.get(dimNames[1], i), i);
+                    break;
+                default:
+                    var k = 0;
+                    var value = [];
+                    for (; k < dimSize; k++) {
+                        value[k] = this.get(dimNames[k], i);
+                    }
+                    // Index
+                    value[k] = i;
+                    (cb as EachCb<Ctx>).apply(fCtx, value);
+            }
         }
     }
-}
 
-/**
- * Data iteration
- * @param {string|Array.<string>}
- * @param {Function} cb
- * @param {*} [context=this]
- *
- * @example
- *  list.each('x', function (x, idx) {});
- *  list.each(['x', 'y'], function (x, y, idx) {});
- *  list.each(function (idx) {})
- */
-listProto.each = function (dims, cb, context, contextCompat) {
-    'use strict';
+    /**
+     * Data filter
+     */
+    filterSelf<Ctx>(cb: FilterCb0<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): List;
+    filterSelf<Ctx>(dims: DimensionLoose, cb: FilterCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): List;
+    filterSelf<Ctx>(dims: [DimensionLoose], cb: FilterCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): List;
+    filterSelf<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: FilterCb2<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): List;
+    filterSelf<Ctx>(dims: ItrParamDims, cb: FilterCb<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): List;
+    filterSelf<Ctx>(
+        dims: ItrParamDims | FilterCb<Ctx>,
+        cb: FilterCb<Ctx> | Ctx,
+        ctx?: Ctx,
+        ctxCompat?: Ctx
+    ): List {
+        'use strict';
+
+        if (!this._count) {
+            return;
+        }
 
-    if (!this._count) {
-        return;
-    }
+        if (typeof dims === 'function') {
+            ctxCompat = ctx;
+            ctx = cb as Ctx;
+            cb = dims;
+            dims = [];
+        }
 
-    if (typeof dims === 'function') {
-        contextCompat = context;
-        context = cb;
-        cb = dims;
-        dims = [];
-    }
+        // ctxCompat just for compat echarts3
+        var fCtx = (ctx || ctxCompat || this) as CtxOrList<Ctx>;
 
-    // contextCompat just for compat echarts3
-    context = context || contextCompat || this;
+        var dimNames = zrUtil.map(
+            normalizeDimensions(dims), this.getDimension, this
+        );
 
-    dims = zrUtil.map(normalizeDimensions(dims), this.getDimension, this);
+        if (__DEV__) {
+            validateDimensions(this, dimNames);
+        }
 
-    if (__DEV__) {
-        validateDimensions(this, dims);
-    }
 
-    var dimSize = dims.length;
-
-    for (var i = 0; i < this.count(); i++) {
-        // Simple optimization
-        switch (dimSize) {
-            case 0:
-                cb.call(context, i);
-                break;
-            case 1:
-                cb.call(context, this.get(dims[0], i), i);
-                break;
-            case 2:
-                cb.call(context, this.get(dims[0], i), this.get(dims[1], i), i);
-                break;
-            default:
-                var k = 0;
-                var value = [];
-                for (; k < dimSize; k++) {
-                    value[k] = this.get(dims[k], i);
+        var count = this.count();
+        var Ctor = getIndicesCtor(this);
+        var newIndices = new Ctor(count);
+        var value = [];
+        var dimSize = dimNames.length;
+
+        var offset = 0;
+        var dim0 = dimNames[0];
+
+        for (var i = 0; i < count; i++) {
+            var keep;
+            var rawIdx = this.getRawIndex(i);
+            // Simple optimization
+            if (dimSize === 0) {
+                keep = (cb as FilterCb0<Ctx>).call(fCtx, i);
+            }
+            else if (dimSize === 1) {
+                var val = this._getFast(dim0, rawIdx);
+                keep = (cb as FilterCb1<Ctx>).call(fCtx, val, i);
+            }
+            else {
+                for (var k = 0; k < dimSize; k++) {
+                    value[k] = this._getFast(dim0, rawIdx);
                 }
-                // Index
                 value[k] = i;
-                cb.apply(context, value);
+                keep = (cb as FilterCb<Ctx>).apply(fCtx, value);
+            }
+            if (keep) {
+                newIndices[offset++] = rawIdx;
+            }
         }
-    }
-};
-
-/**
- * Data filter
- * @param {string|Array.<string>}
- * @param {Function} cb
- * @param {*} [context=this]
- */
-listProto.filterSelf = function (dimensions, cb, context, contextCompat) {
-    'use strict';
 
-    if (!this._count) {
-        return;
-    }
-
-    if (typeof dimensions === 'function') {
-        contextCompat = context;
-        context = cb;
-        cb = dimensions;
-        dimensions = [];
-    }
-
-    // contextCompat just for compat echarts3
-    context = context || contextCompat || this;
+        // Set indices after filtered.
+        if (offset < count) {
+            this._indices = newIndices;
+        }
+        this._count = offset;
+        // Reset data extent
+        this._extent = {};
 
-    dimensions = zrUtil.map(
-        normalizeDimensions(dimensions), this.getDimension, this
-    );
+        this.getRawIndex = this._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;
 
-    if (__DEV__) {
-        validateDimensions(this, dimensions);
+        return this;
     }
 
+    /**
+     * Select data in range. (For optimization of filter)
+     * (Manually inline code, support 5 million data filtering in data zoom.)
+     */
+    selectRange(range: {[dimName: string]: string}): List {
+        'use strict';
 
-    var count = this.count();
-    var Ctor = getIndicesCtor(this);
-    var newIndices = new Ctor(count);
-    var value = [];
-    var dimSize = dimensions.length;
-
-    var offset = 0;
-    var dim0 = dimensions[0];
-
-    for (var i = 0; i < count; i++) {
-        var keep;
-        var rawIdx = this.getRawIndex(i);
-        // Simple optimization
-        if (dimSize === 0) {
-            keep = cb.call(context, i);
+        if (!this._count) {
+            return;
         }
-        else if (dimSize === 1) {
-            var val = this._getFast(dim0, rawIdx);
-            keep = cb.call(context, val, i);
-        }
-        else {
-            for (var k = 0; k < dimSize; k++) {
-                value[k] = this._getFast(dim0, rawIdx);
+
+        var dimensions = [];
+        for (var dim in range) {
+            if (range.hasOwnProperty(dim)) {
+                dimensions.push(dim);
             }
-            value[k] = i;
-            keep = cb.apply(context, value);
         }
-        if (keep) {
-            newIndices[offset++] = rawIdx;
-        }
-    }
-
-    // Set indices after filtered.
-    if (offset < count) {
-        this._indices = newIndices;
-    }
-    this._count = offset;
-    // Reset data extent
-    this._extent = {};
-
-    this.getRawIndex = this._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;
-
-    return this;
-};
-
-/**
- * Select data in range. (For optimization of filter)
- * (Manually inline code, support 5 million data filtering in data zoom.)
- */
-listProto.selectRange = function (range) {
-    'use strict';
 
-    if (!this._count) {
-        return;
-    }
-
-    var dimensions = [];
-    for (var dim in range) {
-        if (range.hasOwnProperty(dim)) {
-            dimensions.push(dim);
+        if (__DEV__) {
+            validateDimensions(this, dimensions);
         }
-    }
 
-    if (__DEV__) {
-        validateDimensions(this, dimensions);
-    }
-
-    var dimSize = dimensions.length;
-    if (!dimSize) {
-        return;
-    }
+        var dimSize = dimensions.length;
+        if (!dimSize) {
+            return;
+        }
 
-    var originalCount = this.count();
-    var Ctor = getIndicesCtor(this);
-    var newIndices = new Ctor(originalCount);
-
-    var offset = 0;
-    var dim0 = dimensions[0];
-
-    var min = range[dim0][0];
-    var max = range[dim0][1];
-
-    var quickFinished = false;
-    if (!this._indices) {
-        // Extreme optimization for common case. About 2x faster in chrome.
-        var idx = 0;
-        if (dimSize === 1) {
-            var dimStorage = this._storage[dimensions[0]];
-            for (var k = 0; k < this._chunkCount; k++) {
-                var chunkStorage = dimStorage[k];
-                var len = Math.min(this._count - k * this._chunkSize, this._chunkSize);
-                for (var i = 0; i < len; i++) {
-                    var val = chunkStorage[i];
-                    // NaN will not be filtered. Consider the case, in line chart, empty
-                    // value indicates the line should be broken. But for the case like
-                    // scatter plot, a data item with empty value will not be rendered,
-                    // but the axis extent may be effected if some other dim of the data
-                    // item has value. Fortunately it is not a significant negative effect.
-                    if (
-                        (val >= min && val <= max) || isNaN(val)
-                    ) {
-                        newIndices[offset++] = idx;
+        var originalCount = this.count();
+        var Ctor = getIndicesCtor(this);
+        var newIndices = new Ctor(originalCount);
+
+        var offset = 0;
+        var dim0 = dimensions[0];
+
+        var min = range[dim0][0];
+        var max = range[dim0][1];
+
+        var quickFinished = false;
+        if (!this._indices) {
+            // Extreme optimization for common case. About 2x faster in chrome.
+            var idx = 0;
+            if (dimSize === 1) {
+                var dimStorage = this._storage[dimensions[0]];
+                for (var k = 0; k < this._chunkCount; k++) {
+                    var chunkStorage = dimStorage[k];
+                    var len = Math.min(this._count - k * this._chunkSize, this._chunkSize);
+                    for (var i = 0; i < len; i++) {
+                        var val = chunkStorage[i];
+                        // NaN will not be filtered. Consider the case, in line chart, empty
+                        // value indicates the line should be broken. But for the case like
+                        // scatter plot, a data item with empty value will not be rendered,
+                        // but the axis extent may be effected if some other dim of the data
+                        // item has value. Fortunately it is not a significant negative effect.
+                        if (
+                            (val >= min && val <= max) || isNaN(val as any)
+                        ) {
+                            newIndices[offset++] = idx;
+                        }
+                        idx++;
                     }
-                    idx++;
                 }
+                quickFinished = true;
             }
-            quickFinished = true;
-        }
-        else if (dimSize === 2) {
-            var dimStorage = this._storage[dim0];
-            var dimStorage2 = this._storage[dimensions[1]];
-            var min2 = range[dimensions[1]][0];
-            var max2 = range[dimensions[1]][1];
-            for (var k = 0; k < this._chunkCount; k++) {
-                var chunkStorage = dimStorage[k];
-                var chunkStorage2 = dimStorage2[k];
-                var len = Math.min(this._count - k * this._chunkSize, this._chunkSize);
-                for (var i = 0; i < len; i++) {
-                    var val = chunkStorage[i];
-                    var val2 = chunkStorage2[i];
-                    // Do not filter NaN, see comment above.
-                    if ((
-                            (val >= min && val <= max) || isNaN(val)
-                        )
-                        && (
-                            (val2 >= min2 && val2 <= max2) || isNaN(val2)
-                        )
-                    ) {
-                        newIndices[offset++] = idx;
+            else if (dimSize === 2) {
+                var dimStorage = this._storage[dim0];
+                var dimStorage2 = this._storage[dimensions[1]];
+                var min2 = range[dimensions[1]][0];
+                var max2 = range[dimensions[1]][1];
+                for (var k = 0; k < this._chunkCount; k++) {
+                    var chunkStorage = dimStorage[k];
+                    var chunkStorage2 = dimStorage2[k];
+                    var len = Math.min(this._count - k * this._chunkSize, this._chunkSize);
+                    for (var i = 0; i < len; i++) {
+                        var val = chunkStorage[i];
+                        var val2 = chunkStorage2[i];
+                        // Do not filter NaN, see comment above.
+                        if ((
+                                (val >= min && val <= max) || isNaN(val as any)
+                            )
+                            && (
+                                (val2 >= min2 && val2 <= max2) || isNaN(val2 as any)
+                            )
+                        ) {
+                            newIndices[offset++] = idx;
+                        }
+                        idx++;
                     }
-                    idx++;
-                }
-            }
-            quickFinished = true;
-        }
-    }
-    if (!quickFinished) {
-        if (dimSize === 1) {
-            for (var i = 0; i < originalCount; i++) {
-                var rawIndex = this.getRawIndex(i);
-                var val = this._getFast(dim0, rawIndex);
-                // Do not filter NaN, see comment above.
-                if (
-                    (val >= min && val <= max) || isNaN(val)
-                ) {
-                    newIndices[offset++] = rawIndex;
                 }
+                quickFinished = true;
             }
         }
-        else {
-            for (var i = 0; i < originalCount; i++) {
-                var keep = true;
-                var rawIndex = this.getRawIndex(i);
-                for (var k = 0; k < dimSize; k++) {
-                    var dimk = dimensions[k];
-                    var val = this._getFast(dim, rawIndex);
+        if (!quickFinished) {
+            if (dimSize === 1) {
+                for (var i = 0; i < originalCount; i++) {
+                    var rawIndex = this.getRawIndex(i);
+                    var val = this._getFast(dim0, rawIndex);
                     // Do not filter NaN, see comment above.
-                    if (val < range[dimk][0] || val > range[dimk][1]) {
-                        keep = false;
+                    if (
+                        (val >= min && val <= max) || isNaN(val as any)
+                    ) {
+                        newIndices[offset++] = rawIndex;
                     }
                 }
-                if (keep) {
-                    newIndices[offset++] = this.getRawIndex(i);
+            }
+            else {
+                for (var i = 0; i < originalCount; i++) {
+                    var keep = true;
+                    var rawIndex = this.getRawIndex(i);
+                    for (var k = 0; k < dimSize; k++) {
+                        var dimk = dimensions[k];
+                        var val = this._getFast(dim, rawIndex);
+                        // Do not filter NaN, see comment above.
+                        if (val < range[dimk][0] || val > range[dimk][1]) {
+                            keep = false;
+                        }
+                    }
+                    if (keep) {
+                        newIndices[offset++] = this.getRawIndex(i);
+                    }
                 }
             }
         }
-    }
 
-    // Set indices after filtered.
-    if (offset < originalCount) {
-        this._indices = newIndices;
+        // Set indices after filtered.
+        if (offset < originalCount) {
+            this._indices = newIndices;
+        }
+        this._count = offset;
+        // Reset data extent
+        this._extent = {};
+
+        this.getRawIndex = this._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;
+
+        return this;
     }
-    this._count = offset;
-    // Reset data extent
-    this._extent = {};
 
-    this.getRawIndex = this._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;
+    /**
+     * Data mapping to a plain array
+     */
+    mapArray<Ctx>(cb: MapArrayCb0<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): any[];
+    mapArray<Ctx>(dims: DimensionLoose, cb: MapArrayCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): any[];
+    mapArray<Ctx>(dims: [DimensionLoose], cb: MapArrayCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): any[];
+    mapArray<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: MapArrayCb2<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): any[];
+    mapArray<Ctx>(dims: ItrParamDims, cb: MapArrayCb<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): any[];
+    mapArray<Ctx>(
+        dims: ItrParamDims | MapArrayCb<Ctx>,
+        cb: MapArrayCb<Ctx> | Ctx,
+        ctx?: Ctx,
+        ctxCompat?: Ctx
+    ): any[] {
+        'use strict';
+
+        if (typeof dims === 'function') {
+            ctxCompat = ctx;
+            ctx = cb as Ctx;
+            cb = dims;
+            dims = [];
+        }
 
-    return this;
-};
+        // ctxCompat just for compat echarts3
+        ctx = (ctx || ctxCompat || this) as Ctx;
 
-/**
- * Data mapping to a plain array
- * @param {string|Array.<string>} [dimensions]
- * @param {Function} cb
- * @param {*} [context=this]
- * @return {Array}
- */
-listProto.mapArray = function (dimensions, cb, context, contextCompat) {
-    'use strict';
-
-    if (typeof dimensions === 'function') {
-        contextCompat = context;
-        context = cb;
-        cb = dimensions;
-        dimensions = [];
+        var result: any[] = [];
+        this.each(dims, function () {
+            result.push(cb && (cb as MapArrayCb<Ctx>).apply(this, arguments));
+        }, ctx);
+        return result;
     }
 
-    // contextCompat just for compat echarts3
-    context = context || contextCompat || this;
+    /**
+     * Data mapping to a new List with given dimensions
+     */
+    map<Ctx>(dims: DimensionLoose, cb: MapCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): List;
+    map<Ctx>(dims: [DimensionLoose], cb: MapCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): List;
+    map<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: MapCb2<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): List;
+    map<Ctx>(
+        dims: ItrParamDims,
+        cb: MapCb<Ctx>,
+        ctx?: Ctx,
+        ctxCompat?: Ctx
+    ): List {
+        'use strict';
+
+        // ctxCompat just for compat echarts3
+        var fCtx = (ctx || ctxCompat || this) as CtxOrList<Ctx>;
+
+        var dimNames = zrUtil.map(
+            normalizeDimensions(dims), this.getDimension, this
+        );
+
+        if (__DEV__) {
+            validateDimensions(this, dimNames);
+        }
+
+        var list = cloneListForMapAndSample(this, dimNames);
 
-    var result = [];
-    this.each(dimensions, function () {
-        result.push(cb && cb.apply(this, arguments));
-    }, context);
-    return result;
-};
+        // Following properties are all immutable.
+        // So we can reference to the same value
+        list._indices = this._indices;
+        list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;
+
+        var storage = list._storage;
 
-// Data in excludeDimensions is copied, otherwise transfered.
-function cloneListForMapAndSample(original, excludeDimensions) {
-    var allDimensions = original.dimensions;
-    var list = new List(
-        zrUtil.map(allDimensions, original.getDimensionInfo, original),
-        original.hostModel
-    );
-    // FIXME If needs stackedOn, value may already been stacked
-    transferProperties(list, original);
-
-    var storage = list._storage = {};
-    var originalStorage = original._storage;
-
-    // Init storage
-    for (var i = 0; i < allDimensions.length; i++) {
-        var dim = allDimensions[i];
-        if (originalStorage[dim]) {
-            // Notice that we do not reset invertedIndicesMap here, becuase
-            // there is no scenario of mapping or sampling ordinal dimension.
-            if (zrUtil.indexOf(excludeDimensions, dim) >= 0) {
-                storage[dim] = cloneDimStore(originalStorage[dim]);
-                list._rawExtent[dim] = getInitialExtent();
-                list._extent[dim] = null;
+        var tmpRetValue = [];
+        var chunkSize = this._chunkSize;
+        var dimSize = dimNames.length;
+        var dataCount = this.count();
+        var values = [];
+        var rawExtent = list._rawExtent;
+
+        for (var dataIndex = 0; dataIndex < dataCount; dataIndex++) {
+            for (var dimIndex = 0; dimIndex < dimSize; dimIndex++) {
+                values[dimIndex] = this.get(dimNames[dimIndex], dataIndex);
             }
-            else {
-                // Direct reference for other dimensions
-                storage[dim] = originalStorage[dim];
+            values[dimSize] = dataIndex;
+
+            var retValue = cb && cb.apply(fCtx, values);
+            if (retValue != null) {
+                // a number or string (in oridinal dimension)?
+                if (typeof retValue !== 'object') {
+                    tmpRetValue[0] = retValue;
+                    retValue = tmpRetValue;
+                }
+
+                var rawIndex = this.getRawIndex(dataIndex);
+                var chunkIndex = Math.floor(rawIndex / chunkSize);
+                var chunkOffset = rawIndex % chunkSize;
+
+                for (var i = 0; i < retValue.length; i++) {
+                    var dim = dimNames[i];
+                    var val = retValue[i];
+                    var rawExtentOnDim = rawExtent[dim];
+
+                    var dimStore = storage[dim];
+                    if (dimStore) {
+                        dimStore[chunkIndex][chunkOffset] = val;
+                    }
+
+                    if (val < rawExtentOnDim[0]) {
+                        rawExtentOnDim[0] = val as number;
+                    }
+                    if (val > rawExtentOnDim[1]) {
+                        rawExtentOnDim[1] = val as number;
+                    }
+                }
             }
         }
-    }
-    return list;
-}
 
-function cloneDimStore(originalDimStore) {
-    var newDimStore = new Array(originalDimStore.length);
-    for (var j = 0; j < originalDimStore.length; j++) {
-        newDimStore[j] = cloneChunk(originalDimStore[j]);
+        return list;
     }
-    return newDimStore;
-}
 
-function getInitialExtent() {
-    return [Infinity, -Infinity];
-}
+    /**
+     * Large data down sampling on given dimension
+     * @param sampleIndex Sample index for name and id
+     */
+    downSample(
+        dimension: DimensionName,
+        rate: number,
+        sampleValue: (frameValues: ParsedDataValue[]) => ParsedDataNumeric,
+        sampleIndex: (frameValues: ParsedDataValue[], value: ParsedDataNumeric) => number
+    ): List {
+        var list = cloneListForMapAndSample(this, [dimension]);
+        var targetStorage = list._storage;
+
+        var frameValues = [];
+        var frameSize = Math.floor(1 / rate);
+
+        var dimStore = targetStorage[dimension];
+        var len = this.count();
+        var chunkSize = this._chunkSize;
+        var rawExtentOnDim = list._rawExtent[dimension];
+
+        var newIndices = new (getIndicesCtor(this))(len);
+
+        var offset = 0;
+        for (var i = 0; i < len; i += frameSize) {
+            // Last frame
+            if (frameSize > len - i) {
+                frameSize = len - i;
+                frameValues.length = frameSize;
+            }
+            for (var k = 0; k < frameSize; k++) {
+                var dataIdx = this.getRawIndex(i + k);
+                var originalChunkIndex = Math.floor(dataIdx / chunkSize);
+                var originalChunkOffset = dataIdx % chunkSize;
+                frameValues[k] = dimStore[originalChunkIndex][originalChunkOffset];
+            }
+            var value = sampleValue(frameValues);
+            var sampleFrameIdx = this.getRawIndex(
+                Math.min(i + sampleIndex(frameValues, value) || 0, len - 1)
+            );
+            var sampleChunkIndex = Math.floor(sampleFrameIdx / chunkSize);
+            var sampleChunkOffset = sampleFrameIdx % chunkSize;
+            // Only write value on the filtered data
+            dimStore[sampleChunkIndex][sampleChunkOffset] = value;
 
-/**
- * Data mapping to a new List with given dimensions
- * @param {string|Array.<string>} dimensions
- * @param {Function} cb
- * @param {*} [context=this]
- * @return {Array}
- */
-listProto.map = function (dimensions, cb, context, contextCompat) {
-    'use strict';
+            if (value < rawExtentOnDim[0]) {
+                rawExtentOnDim[0] = value;
+            }
+            if (value > rawExtentOnDim[1]) {
+                rawExtentOnDim[1] = value;
+            }
+
+            newIndices[offset++] = sampleFrameIdx;
+        }
 
-    // contextCompat just for compat echarts3
-    context = context || contextCompat || this;
+        list._count = offset;
+        list._indices = newIndices;
 
-    dimensions = zrUtil.map(
-        normalizeDimensions(dimensions), this.getDimension, this
-    );
+        list.getRawIndex = getRawIndexWithIndices;
 
-    if (__DEV__) {
-        validateDimensions(this, dimensions);
+        return list;
     }
 
-    var list = cloneListForMapAndSample(this, dimensions);
-
-    // Following properties are all immutable.
-    // So we can reference to the same value
-    list._indices = this._indices;
-    list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;
+    /**
+     * Get model of one data item.
+     */
+    // FIXME Model proxy ?
+    getItemModel(idx: number): Model {
+        var hostModel = this.hostModel;
+        return new Model(this.getRawDataItem(idx), hostModel, hostModel && hostModel.ecModel);
+    }
 
-    var storage = list._storage;
+    /**
+     * Create a data differ
+     */
+    diff(otherList: List): DataDiffer {
+        var thisList = this;
+
+        return new DataDiffer(
+            otherList ? otherList.getIndices() : [],
+            this.getIndices(),
+            function (idx) {
+                return getId(otherList, idx);
+            },
+            function (idx) {
+                return getId(thisList, idx);
+            }
+        );
+    }
 
-    var tmpRetValue = [];
-    var chunkSize = this._chunkSize;
-    var dimSize = dimensions.length;
-    var dataCount = this.count();
-    var values = [];
-    var rawExtent = list._rawExtent;
+    /**
+     * Get visual property.
+     */
+    getVisual(key: string): any {
+        var visual = this._visual;
+        return visual && visual[key];
+    }
 
-    for (var dataIndex = 0; dataIndex < dataCount; dataIndex++) {
-        for (var dimIndex = 0; dimIndex < dimSize; dimIndex++) {
-            values[dimIndex] = this.get(dimensions[dimIndex], dataIndex /*, stack */);
+    /**
+     * Set visual property
+     *
+     * @example
+     *  setVisual('color', color);
+     *  setVisual({
+     *      'color': color
+     *  });
+     */
+    setVisual(key: string, val: any): void;
+    setVisual(kvObj: Dictionary<any>): void;
+    setVisual(key: string | Dictionary<any>, val?: any): void {
+        if (isObject<Dictionary<any>>(key)) {
+            for (var name in key) {
+                if (key.hasOwnProperty(name)) {
+                    this.setVisual(name, key[name]);
+                }
+            }
+            return;
         }
-        values[dimSize] = dataIndex;
+        this._visual = this._visual || {};
+        this._visual[key] = val;
+    }
 
-        var retValue = cb && cb.apply(context, values);
-        if (retValue != null) {
-            // a number or string (in oridinal dimension)?
-            if (typeof retValue !== 'object') {
-                tmpRetValue[0] = retValue;
-                retValue = tmpRetValue;
+    /**
+     * Set layout property.
+     */
+    setLayout(key: string, val: any): void;
+    setLayout(kvObj: Dictionary<any>): void;
+    setLayout(key: string | Dictionary<any>, val?: any): void {
+        if (isObject<Dictionary<any>>(key)) {
+            for (var name in key) {
+                if (key.hasOwnProperty(name)) {
+                    this.setLayout(name, key[name]);
+                }
             }
+            return;
+        }
+        this._layout[key] = val;
+    }
+
+    /**
+     * Get layout property.
+     */
+    getLayout(key: string): any {
+        return this._layout[key];
+    }
 
-            var rawIndex = this.getRawIndex(dataIndex);
-            var chunkIndex = Math.floor(rawIndex / chunkSize);
-            var chunkOffset = rawIndex % chunkSize;
+    /**
+     * Get layout of single data item
+     */
+    getItemLayout(idx: number): Dictionary<any> {
+        return this._itemLayouts[idx];
+    }
 
-            for (var i = 0; i < retValue.length; i++) {
-                var dim = dimensions[i];
-                var val = retValue[i];
-                var rawExtentOnDim = rawExtent[dim];
+    /**
+     * Set layout of single data item
+     */
+    setItemLayout<M = false>(
+        idx: number,
+        layout: (M extends true ? Dictionary<any> : any),
+        merge?: M
+    ): void {
+        this._itemLayouts[idx] = merge
+            ? zrUtil.extend(this._itemLayouts[idx] || {}, layout)
+            : layout;
+    }
 
-                var dimStore = storage[dim];
-                if (dimStore) {
-                    dimStore[chunkIndex][chunkOffset] = val;
-                }
+    /**
+     * Clear all layout of single data item
+     */
+    clearItemLayouts(): void {
+        this._itemLayouts.length = 0;
+    }
 
-                if (val < rawExtentOnDim[0]) {
-                    rawExtentOnDim[0] = val;
-                }
-                if (val > rawExtentOnDim[1]) {
-                    rawExtentOnDim[1] = val;
+    /**
+     * Get visual property of single data item
+     */
+    getItemVisual(idx: number, key: string, ignoreParent?: boolean): any {
+        var itemVisual = this._itemVisuals[idx];
+        var val = itemVisual && itemVisual[key];
+        if (val == null && !ignoreParent) {
+            // Use global visual property
+            return this.getVisual(key);
+        }
+        return val;
+    }
+
+    /**
+     * Set visual property of single data item
+     *
+     * @param {number} idx
+     * @param {string|Object} key
+     * @param {*} [value]
+     *
+     * @example
+     *  setItemVisual(0, 'color', color);
+     *  setItemVisual(0, {
+     *      'color': color
+     *  });
+     */
+    setItemVisual(idx: number, key: string, value: any): void;
+    setItemVisual(idx: number, kvObject: Dictionary<any>): void;
+    setItemVisual(idx: number, key: string | Dictionary<any>, value?: any): void {
+        var itemVisual = this._itemVisuals[idx] || {};
+        var hasItemVisual = this.hasItemVisual;
+        this._itemVisuals[idx] = itemVisual;
+
+        if (isObject<Dictionary<any>>(key)) {
+            for (var name in key) {
+                if (key.hasOwnProperty(name)) {
+                    itemVisual[name] = key[name];
+                    hasItemVisual[name] = true;
                 }
             }
+            return;
         }
+        itemVisual[key] = value;
+        hasItemVisual[key] = true;
     }
 
-    return list;
-};
+    /**
+     * Clear itemVisuals and list visual.
+     */
+    clearAllVisual(): void {
+        this._visual = {};
+        this._itemVisuals = [];
+        this.hasItemVisual = {};
+    }
 
-/**
- * Large data down sampling on given dimension
- * @param {string} dimension
- * @param {number} rate
- * @param {Function} sampleValue
- * @param {Function} sampleIndex Sample index for name and id
- */
-listProto.downSample = function (dimension, rate, sampleValue, sampleIndex) {
-    var list = cloneListForMapAndSample(this, [dimension]);
-    var targetStorage = list._storage;
-
-    var frameValues = [];
-    var frameSize = Math.floor(1 / rate);
-
-    var dimStore = targetStorage[dimension];
-    var len = this.count();
-    var chunkSize = this._chunkSize;
-    var rawExtentOnDim = list._rawExtent[dimension];
-
-    var newIndices = new (getIndicesCtor(this))(len);
-
-    var offset = 0;
-    for (var i = 0; i < len; i += frameSize) {
-        // Last frame
-        if (frameSize > len - i) {
-            frameSize = len - i;
-            frameValues.length = frameSize;
-        }
-        for (var k = 0; k < frameSize; k++) {
-            var dataIdx = this.getRawIndex(i + k);
-            var originalChunkIndex = Math.floor(dataIdx / chunkSize);
-            var originalChunkOffset = dataIdx % chunkSize;
-            frameValues[k] = dimStore[originalChunkIndex][originalChunkOffset];
-        }
-        var value = sampleValue(frameValues);
-        var sampleFrameIdx = this.getRawIndex(
-            Math.min(i + sampleIndex(frameValues, value) || 0, len - 1)
-        );
-        var sampleChunkIndex = Math.floor(sampleFrameIdx / chunkSize);
-        var sampleChunkOffset = sampleFrameIdx % chunkSize;
-        // Only write value on the filtered data
-        dimStore[sampleChunkIndex][sampleChunkOffset] = value;
+    /**
+     * Set graphic element relative to data. It can be set as null
+     */
+    setItemGraphicEl(idx: number, el: Element): void {
+        var hostModel = this.hostModel;
 
-        if (value < rawExtentOnDim[0]) {
-            rawExtentOnDim[0] = value;
-        }
-        if (value > rawExtentOnDim[1]) {
-            rawExtentOnDim[1] = value;
+        if (el) {
+            // Add data index and series index for indexing the data by element
+            // Useful in tooltip
+            (el as ECElement).dataIndex = idx;
+            (el as ECElement).dataType = this.dataType;
+            (el as ECElement).seriesIndex = hostModel && (hostModel as any).seriesIndex;
+            if (el.type === 'group') {
+                el.traverse(setItemDataAndSeriesIndex, el);
+            }
         }
 
-        newIndices[offset++] = sampleFrameIdx;
+        this._graphicEls[idx] = el;
     }
 
-    list._count = offset;
-    list._indices = newIndices;
+    getItemGraphicEl(idx: number): Element {
+        return this._graphicEls[idx];
+    }
 
-    list.getRawIndex = getRawIndexWithIndices;
+    eachItemGraphicEl<Ctx = unknown>(
+        cb: (this: Ctx, el: Element, idx: number) => void,
+        context?: Ctx
+    ): void {
+        zrUtil.each(this._graphicEls, function (el, idx) {
+            if (el) {
+                cb && cb.call(context, el, idx);
+            }
+        });
+    }
 
-    return list;
-};
+    /**
+     * Shallow clone a new list except visual and layout properties, and graph elements.
+     * New list only change the indices.
+     */
+    cloneShallow(list?: List): List {
+        if (!list) {
+            var dimensionInfoList = zrUtil.map(this.dimensions, this.getDimensionInfo, this);
+            list = new List(dimensionInfoList, this.hostModel);
+        }
 
-/**
- * Get model of one data item.
- *
- * @param {number} idx
- */
-// FIXME Model proxy ?
-listProto.getItemModel = function (idx) {
-    var hostModel = this.hostModel;
-    return new Model(this.getRawDataItem(idx), hostModel, hostModel && hostModel.ecModel);
-};
+        // FIXME
+        list._storage = this._storage;
 
-/**
- * Create a data differ
- * @param {module:echarts/data/List} otherList
- * @return {module:echarts/data/DataDiffer}
- */
-listProto.diff = function (otherList) {
-    var thisList = this;
-
-    return new DataDiffer(
-        otherList ? otherList.getIndices() : [],
-        this.getIndices(),
-        function (idx) {
-            return getId(otherList, idx);
-        },
-        function (idx) {
-            return getId(thisList, idx);
-        }
-    );
-};
-/**
- * Get visual property.
- * @param {string} key
- */
-listProto.getVisual = function (key) {
-    var visual = this._visual;
-    return visual && visual[key];
-};
+        transferProperties(list, this);
 
-/**
- * Set visual property
- * @param {string|Object} key
- * @param {*} [value]
- *
- * @example
- *  setVisual('color', color);
- *  setVisual({
- *      'color': color
- *  });
- */
-listProto.setVisual = function (key, val) {
-    if (isObject(key)) {
-        for (var name in key) {
-            if (key.hasOwnProperty(name)) {
-                this.setVisual(name, key[name]);
+        // Clone will not change the data extent and indices
+        if (this._indices) {
+            var Ctor = this._indices.constructor as DataArrayLikeConstructor;
+            if (Ctor === Array) {
+                var thisCount = this._indices.length;
+                list._indices = new Ctor(thisCount);
+                for (var i = 0; i < thisCount; i++) {
+                    list._indices[i] = this._indices[i];
+                }
+            }
+            else {
+                list._indices = new (Ctor as DataTypedArrayConstructor)(this._indices);
             }
         }
-        return;
+        else {
+            list._indices = null;
+        }
+        list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;
+
+        return list;
     }
-    this._visual = this._visual || {};
-    this._visual[key] = val;
-};
 
-/**
- * Set layout property.
- * @param {string|Object} key
- * @param {*} [val]
- */
-listProto.setLayout = function (key, val) {
-    if (isObject(key)) {
-        for (var name in key) {
-            if (key.hasOwnProperty(name)) {
-                this.setLayout(name, key[name]);
-            }
+    /**
+     * Wrap some method to add more feature
+     */
+    wrapMethod(
+        methodName: FunctionPropertyNames<List>,
+        injectFunction: (...args: any) => any
+    ): void {
+        var originalMethod = this[methodName];
+        if (typeof originalMethod !== 'function') {
+            return;
         }
-        return;
+        this.__wrappedMethods = this.__wrappedMethods || [];
+        this.__wrappedMethods.push(methodName);
+        this[methodName] = function () {
+            var res = (originalMethod as any).apply(this, arguments);
+            return injectFunction.apply(this, [res].concat(zrUtil.slice(arguments)));
+        };
     }
-    this._layout[key] = val;
-};
 
-/**
- * Get layout property.
- * @param  {string} key.
- * @return {*}
- */
-listProto.getLayout = function (key) {
-    return this._layout[key];
-};
 
-/**
- * Get layout of single data item
- * @param {number} idx
- */
-listProto.getItemLayout = function (idx) {
-    return this._itemLayouts[idx];
-};
+    // ----------------------------------------------------------
+    // A work around for internal method visiting private member.
+    // ----------------------------------------------------------
+    static internalField = (function () {
 
-/**
- * Set layout of single data item
- * @param {number} idx
- * @param {Object} layout
- * @param {boolean=} [merge=false]
- */
-listProto.setItemLayout = function (idx, layout, merge) {
-    this._itemLayouts[idx] = merge
-        ? zrUtil.extend(this._itemLayouts[idx] || {}, layout)
-        : layout;
-};
+        defaultDimValueGetters = {
 
-/**
- * Clear all layout of single data item
- */
-listProto.clearItemLayouts = function () {
-    this._itemLayouts.length = 0;
-};
+            arrayRows: getDimValueSimply,
 
-/**
- * Get visual property of single data item
- * @param {number} idx
- * @param {string} key
- * @param {boolean} [ignoreParent=false]
- */
-listProto.getItemVisual = function (idx, key, ignoreParent) {
-    var itemVisual = this._itemVisuals[idx];
-    var val = itemVisual && itemVisual[key];
-    if (val == null && !ignoreParent) {
-        // Use global visual property
-        return this.getVisual(key);
-    }
-    return val;
-};
+            objectRows: function (
+                this: List, dataItem: Dictionary<any>, dimName: string, dataIndex: number, dimIndex: number
+            ): ParsedDataValue {
+                return convertDataValue(dataItem[dimName], this._dimensionInfos[dimName]);
+            },
 
-/**
- * Set visual property of single data item
- *
- * @param {number} idx
- * @param {string|Object} key
- * @param {*} [value]
- *
- * @example
- *  setItemVisual(0, 'color', color);
- *  setItemVisual(0, {
- *      'color': color
- *  });
- */
-listProto.setItemVisual = function (idx, key, value) {
-    var itemVisual = this._itemVisuals[idx] || {};
-    var hasItemVisual = this.hasItemVisual;
-    this._itemVisuals[idx] = itemVisual;
-
-    if (isObject(key)) {
-        for (var name in key) {
-            if (key.hasOwnProperty(name)) {
-                itemVisual[name] = key[name];
-                hasItemVisual[name] = true;
+            keyedColumns: getDimValueSimply,
+
+            original: function (
+                this: List, dataItem: any, dimName: string, dataIndex: number, dimIndex: number
+            ): ParsedDataValue {
+                // Performance sensitive, do not use modelUtil.getDataItemValue.
+                // If dataItem is an plain object with no value field, the var `value`
+                // will be assigned with the object, but it will be tread correctly
+                // in the `convertDataValue`.
+                var value = dataItem && (dataItem.value == null ? dataItem : dataItem.value);
+
+                // If any dataItem is like { value: 10 }
+                if (!this._rawData.pure && isDataItemOption(dataItem)) {
+                    this.hasItemOption = true;
+                }
+                return convertDataValue(
+                    (value instanceof Array)
+                        ? value[dimIndex]
+                        // If value is a single number or something else not array.
+                        : value,
+                    this._dimensionInfos[dimName]
+                );
+            },
+
+            typedArray: function (
+                this: List, dataItem: any, dimName: string, dataIndex: number, dimIndex: number
+            ): ParsedDataValue {
+                return dataItem[dimIndex];
             }
-        }
-        return;
-    }
-    itemVisual[key] = value;
-    hasItemVisual[key] = true;
-};
 
-/**
- * Clear itemVisuals and list visual.
- */
-listProto.clearAllVisual = function () {
-    this._visual = {};
-    this._itemVisuals = [];
-    this.hasItemVisual = {};
-};
+        };
 
-var setItemDataAndSeriesIndex = function (child) {
-    child.seriesIndex = this.seriesIndex;
-    child.dataIndex = this.dataIndex;
-    child.dataType = this.dataType;
-};
-/**
- * Set graphic element relative to data. It can be set as null
- * @param {number} idx
- * @param {module:zrender/Element} [el]
- */
-listProto.setItemGraphicEl = function (idx, el) {
-    var hostModel = this.hostModel;
-
-    if (el) {
-        // Add data index and series index for indexing the data by element
-        // Useful in tooltip
-        el.dataIndex = idx;
-        el.dataType = this.dataType;
-        el.seriesIndex = hostModel && hostModel.seriesIndex;
-        if (el.type === 'group') {
-            el.traverse(setItemDataAndSeriesIndex, el);
+        function getDimValueSimply(
+            this: List, dataItem: any, dimName: string, dataIndex: number, dimIndex: number
+        ): ParsedDataValue {
+            return convertDataValue(dataItem[dimIndex], this._dimensionInfos[dimName]);
         }
-    }
 
-    this._graphicEls[idx] = el;
-};
+        /**
+         * Convert raw the value in to inner value in List.
+         * [Caution]: this is the key logic of user value parser.
+         * For backward compatibiliy, do not modify it until have to.
+         */
+        function convertDataValue(value: any, dimInfo: DataDimensionInfo): ParsedDataValue {
+            // Performance sensitive.
+            var dimType = dimInfo && dimInfo.type;
+            if (dimType === 'ordinal') {
+                // If given value is a category string
+                var ordinalMeta = dimInfo && dimInfo.ordinalMeta;
+                return ordinalMeta
+                    ? ordinalMeta.parseAndCollect(value)
+                    : value;
+            }
 
-/**
- * @param {number} idx
- * @return {module:zrender/Element}
- */
-listProto.getItemGraphicEl = function (idx) {
-    return this._graphicEls[idx];
-};
+            if (dimType === 'time'
+                // spead up when using timestamp
+                && typeof value !== 'number'
+                && value != null
+                && value !== '-'
+            ) {
+                value = +parseDate(value);
+            }
 
-/**
- * @param {Function} cb
- * @param {*} context
- */
-listProto.eachItemGraphicEl = function (cb, context) {
-    zrUtil.each(this._graphicEls, function (el, idx) {
-        if (el) {
-            cb && cb.call(context, el, idx);
+            // dimType defaults 'number'.
+            // If dimType is not ordinal and value is null or undefined or NaN or '-',
+            // parse to NaN.
+            return (value == null || value === '')
+                ? NaN
+                // If string (like '-'), using '+' parse to NaN
+                // If object, also parse to NaN
+                : +value;
+        };
+
+        prepareInvertedIndex = function (list: List): void {
+            var invertedIndicesMap = list._invertedIndicesMap;
+            zrUtil.each(invertedIndicesMap, function (invertedIndices, dim) {
+                var dimInfo = list._dimensionInfos[dim];
+
+                // Currently, only dimensions that has ordinalMeta can create inverted indices.
+                var ordinalMeta = dimInfo.ordinalMeta;
+                if (ordinalMeta) {
+                    invertedIndices = invertedIndicesMap[dim] = new CtorInt32Array(
+                        ordinalMeta.categories.length
+                    );
+                    // The default value of TypedArray is 0. To avoid miss
+                    // mapping to 0, we should set it as INDEX_NOT_FOUND.
+                    for (var i = 0; i < invertedIndices.length; i++) {
+                        invertedIndices[i] = INDEX_NOT_FOUND;
+                    }
+                    for (var i = 0; i < list._count; i++) {
+                        // Only support the case that all values are distinct.
+                        invertedIndices[list.get(dim, i) as number] = i;
+                    }
+                }
+            });
+        };
+
+        getRawValueFromStore = function (list: List, dimIndex: number, rawIndex: number): any {
+            var val;
+            if (dimIndex != null) {
+                var chunkSize = list._chunkSize;
+                var chunkIndex = Math.floor(rawIndex / chunkSize);
+                var chunkOffset = rawIndex % chunkSize;
+                var dim = list.dimensions[dimIndex];
+                var chunk = list._storage[dim][chunkIndex];
+                if (chunk) {
+                    val = chunk[chunkOffset];
+                    var ordinalMeta = list._dimensionInfos[dim].ordinalMeta;
+                    if (ordinalMeta && ordinalMeta.categories.length) {
+                        val = ordinalMeta.categories[val as OrdinalRawValueIndex];
+                    }
+                }
+            }
+            return val;
+        };
+
+        getIndicesCtor = function (list: List): DataArrayLikeConstructor {
+            // The possible max value in this._indicies is always this._rawCount despite of filtering.
+            return list._rawCount > 65535 ? CtorUint32Array : CtorUint16Array;
+        };
+
+        prepareChunks = function (
+            storage: DataStorage,
+            dimInfo: DataDimensionInfo,
+            chunkSize: number,
+            chunkCount: number,
+            end: number
+        ): void {
+            var DataCtor = dataCtors[dimInfo.type];
+            var lastChunkIndex = chunkCount - 1;
+            var dim = dimInfo.name;
+            var resizeChunkArray = storage[dim][lastChunkIndex];
+            if (resizeChunkArray && resizeChunkArray.length < chunkSize) {
+                var newStore = new DataCtor(Math.min(end - lastChunkIndex * chunkSize, chunkSize));
+                // The cost of the copy is probably inconsiderable
+                // within the initial chunkSize.
+                for (var j = 0; j < resizeChunkArray.length; j++) {
+                    newStore[j] = resizeChunkArray[j];
+                }
+                storage[dim][lastChunkIndex] = newStore;
+            }
+
+            // Create new chunks.
+            for (var k = chunkCount * chunkSize; k < end; k += chunkSize) {
+                storage[dim].push(new DataCtor(Math.min(end - k, chunkSize)));
+            }
+        };
+
+        getRawIndexWithoutIndices = function (this: List, idx: number): number {
+            return idx;
+        };
+
+        getRawIndexWithIndices = function (this: List, idx: number): number {
+            if (idx < this._count && idx >= 0) {
+                return this._indices[idx];
+            }
+            return -1;
+        };
+
+        getId = function (list: List, rawIndex: number): string {
+            var id = list._idList[rawIndex];
+            if (id == null) {
+                id = getRawValueFromStore(list, list._idDimIdx, rawIndex);
+            }
+            if (id == null) {
+                // FIXME Check the usage in graph, should not use prefix.
+                id = ID_PREFIX + rawIndex;
+            }
+            return id;
+        };
+
+        normalizeDimensions = function (
+            dimensions: ItrParamDims
+        ): Array<DimensionLoose> {
+            if (!zrUtil.isArray(dimensions)) {
+                dimensions = [dimensions];
+            }
+            return dimensions;
+        };
+
+        validateDimensions = function (list: List, dims: DimensionName[]): void {
+            for (var i = 0; i < dims.length; i++) {
+                // stroage may be empty when no data, so use
+                // dimensionInfos to check.
+                if (!list._dimensionInfos[dims[i]]) {
+                    console.error('Unkown dimension ' + dims[i]);
+                }
+            }
+        };
+
+        // Data in excludeDimensions is copied, otherwise transfered.
+        cloneListForMapAndSample = function (
+            original: List, excludeDimensions: DimensionName[]
+        ): List {
+            var allDimensions = original.dimensions;
+            var list = new List(
+                zrUtil.map(allDimensions, original.getDimensionInfo, original),
+                original.hostModel
+            );
+            // FIXME If needs stackedOn, value may already been stacked
+            transferProperties(list, original);
+
+            var storage = list._storage = {} as DataStorage;
+            var originalStorage = original._storage;
+
+            // Init storage
+            for (var i = 0; i < allDimensions.length; i++) {
+                var dim = allDimensions[i];
+                if (originalStorage[dim]) {
+                    // Notice that we do not reset invertedIndicesMap here, becuase
+                    // there is no scenario of mapping or sampling ordinal dimension.
+                    if (zrUtil.indexOf(excludeDimensions, dim) >= 0) {
+                        storage[dim] = cloneDimStore(originalStorage[dim]);
+                        list._rawExtent[dim] = getInitialExtent();
+                        list._extent[dim] = null;
+                    }
+                    else {
+                        // Direct reference for other dimensions
+                        storage[dim] = originalStorage[dim];
+                    }
+                }
+            }
+            return list;
+        };
+
+        cloneDimStore = function (originalDimStore: DataValueChunk[]): DataValueChunk[] {
+            var newDimStore = new Array(originalDimStore.length);
+            for (var j = 0; j < originalDimStore.length; j++) {
+                newDimStore[j] = cloneChunk(originalDimStore[j]);
+            }
+            return newDimStore;
+        };
+
+        function cloneChunk(originalChunk: DataValueChunk): DataValueChunk {
+            var Ctor = originalChunk.constructor;
+            // Only shallow clone is enough when Array.
+            return Ctor === Array
+                ? (originalChunk as Array<ParsedDataValue>).slice()
+                : new (Ctor as DataTypedArrayConstructor)(originalChunk as DataTypedArray);
         }
-    });
-};
 
-/**
- * Shallow clone a new list except visual and layout properties, and graph elements.
- * New list only change the indices.
- */
-listProto.cloneShallow = function (list) {
-    if (!list) {
-        var dimensionInfoList = zrUtil.map(this.dimensions, this.getDimensionInfo, this);
-        list = new List(dimensionInfoList, this.hostModel);
-    }
+        getInitialExtent = function (): [number, number] {
+            return [Infinity, -Infinity];
+        };
+
+        setItemDataAndSeriesIndex = function (this: Element, child: Element): void {
+            (child as ECElement).seriesIndex = (this as ECElement).seriesIndex;
+            (child as ECElement).dataIndex = (this as ECElement).dataIndex;
+            (child as ECElement).dataType = (this as ECElement).dataType;
+        };
+
+        transferProperties = function (target: List, source: List): void {
+            zrUtil.each(
+                TRANSFERABLE_PROPERTIES.concat(source.__wrappedMethods || []),
+                function (propName) {
+                    if (source.hasOwnProperty(propName)) {
+                        (target as any)[propName] = (source as any)[propName];
+                    }
+                }
+            );
 
-    // FIXME
-    list._storage = this._storage;
+            target.__wrappedMethods = source.__wrappedMethods;
 
-    transferProperties(list, this);
+            zrUtil.each(CLONE_PROPERTIES, function (propName) {
+                (target as any)[propName] = zrUtil.clone((source as any)[propName]);
+            });
 
-    // Clone will not change the data extent and indices
-    if (this._indices) {
-        var Ctor = this._indices.constructor;
-        list._indices = new Ctor(this._indices);
-    }
-    else {
-        list._indices = null;
-    }
-    list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;
+            target._calculationInfo = zrUtil.extend({}, source._calculationInfo);
+        };
 
-    return list;
-};
+    })();
 
-/**
- * Wrap some method to add more feature
- * @param {string} methodName
- * @param {Function} injectFunction
- */
-listProto.wrapMethod = function (methodName, injectFunction) {
-    var originalMethod = this[methodName];
-    if (typeof originalMethod !== 'function') {
-        return;
-    }
-    this.__wrappedMethods = this.__wrappedMethods || [];
-    this.__wrappedMethods.push(methodName);
-    this[methodName] = function () {
-        var res = originalMethod.apply(this, arguments);
-        return injectFunction.apply(this, [res].concat(zrUtil.slice(arguments)));
-    };
-};
+}
+
+// -----------------------------
+// Internal method declarations:
+// -----------------------------
+var defaultDimValueGetters: {[sourceFormat: string]: DimValueGetter};
+var prepareInvertedIndex: (list: List) => void;
+var getRawValueFromStore: (list: List, dimIndex: number, rawIndex: number) => any;
+var getIndicesCtor: (list: List) => DataArrayLikeConstructor;
+var prepareChunks: (
+    storage: DataStorage, dimInfo: DataDimensionInfo, chunkSize: number, chunkCount: number, end: number
+) => void;
+var getRawIndexWithoutIndices: (this: List, idx: number) => number;
+var getRawIndexWithIndices: (this: List, idx: number) => number;
+var getId: (list: List, rawIndex: number) => string;
+var normalizeDimensions: (dimensions: ItrParamDims) => Array<DimensionLoose>;
+var validateDimensions: (list: List, dims: DimensionName[]) => void;
+var cloneListForMapAndSample: (original: List, excludeDimensions: DimensionName[]) => List;
+var cloneDimStore: (originalDimStore: DataValueChunk[]) => DataValueChunk[];
+var getInitialExtent: () => [number, number];
+var setItemDataAndSeriesIndex: (this: Element, child: Element) => void;
+var transferProperties: (target: List, source: List) => void;
 
-// Methods that create a new list based on this list should be listed here.
-// Notice that those method should `RETURN` the new list.
-listProto.TRANSFERABLE_METHODS = ['cloneShallow', 'downSample', 'map'];
-// Methods that change indices of this list should be listed here.
-listProto.CHANGABLE_METHODS = ['filterSelf', 'selectRange'];
 
 export default List;
diff --git a/src/data/OrdinalMeta.ts b/src/data/OrdinalMeta.ts
index d20c1d1..5beb8a1 100644
--- a/src/data/OrdinalMeta.ts
+++ b/src/data/OrdinalMeta.ts
@@ -17,125 +17,103 @@
 * under the License.
 */
 
-import {createHashMap, isObject, map} from 'zrender/src/core/util';
+import {createHashMap, isObject, map, HashMap} from 'zrender/src/core/util';
+import Model from '../model/Model';
 
-/**
- * @constructor
- * @param {Object} [opt]
- * @param {Object} [opt.categories=[]]
- * @param {Object} [opt.needCollect=false]
- * @param {Object} [opt.deduplication=false]
- */
-function OrdinalMeta(opt) {
+class OrdinalMeta {
 
-    /**
-     * @readOnly
-     * @type {Array.<string>}
-     */
-    this.categories = opt.categories || [];
+    readonly categories: string[];
 
-    /**
-     * @private
-     * @type {boolean}
-     */
-    this._needCollect = opt.needCollect;
+    private _needCollect: boolean;
 
-    /**
-     * @private
-     * @type {boolean}
-     */
-    this._deduplication = opt.deduplication;
+    private _deduplication: boolean;
+
+    private _map: HashMap<number>;
 
-    /**
-     * @private
-     * @type {boolean}
-     */
-    this._map;
-}
 
-/**
- * @param {module:echarts/model/Model} axisModel
- * @return {module:echarts/data/OrdinalMeta}
- */
-OrdinalMeta.createByAxisModel = function (axisModel) {
-    var option = axisModel.option;
-    var data = option.data;
-    var categories = data && map(data, getName);
-
-    return new OrdinalMeta({
-        categories: categories,
-        needCollect: !categories,
-        // deduplication is default in axis.
-        deduplication: option.dedplication !== false
-    });
-};
-
-var proto = OrdinalMeta.prototype;
-
-/**
- * @param {string} category
- * @return {number} ordinal
- */
-proto.getOrdinal = function (category) {
-    return getOrCreateMap(this).get(category);
-};
-
-/**
- * @param {*} category
- * @return {number} The ordinal. If not found, return NaN.
- */
-proto.parseAndCollect = function (category) {
-    var index;
-    var needCollect = this._needCollect;
-
-    // The value of category dim can be the index of the given category set.
-    // This feature is only supported when !needCollect, because we should
-    // consider a common case: a value is 2017, which is a number but is
-    // expected to be tread as a category. This case usually happen in dataset,
-    // where it happent to be no need of the index feature.
-    if (typeof category !== 'string' && !needCollect) {
-        return category;
+    constructor(opt: {
+        categories?: string[],
+        needCollect?: boolean
+        deduplication?: boolean
+    }) {
+        this.categories = opt.categories || [];
+        this._needCollect = opt.needCollect;
+        this._deduplication = opt.deduplication;
     }
 
-    // Optimize for the scenario:
-    // category is ['2012-01-01', '2012-01-02', ...], where the input
-    // data has been ensured not duplicate and is large data.
-    // Notice, if a dataset dimension provide categroies, usually echarts
-    // should remove duplication except user tell echarts dont do that
-    // (set axis.deduplication = false), because echarts do not know whether
-    // the values in the category dimension has duplication (consider the
-    // parallel-aqi example)
-    if (needCollect && !this._deduplication) {
-        index = this.categories.length;
-        this.categories[index] = category;
-        return index;
+    static createByAxisModel(axisModel: Model): OrdinalMeta {
+        var option = axisModel.option;
+        var data = option.data;
+        var categories = data && map(data, getName);
+
+        return new OrdinalMeta({
+            categories: categories,
+            needCollect: !categories,
+            // deduplication is default in axis.
+            deduplication: option.dedplication !== false
+        });
+    };
+
+    getOrdinal(category: string): number {
+        return this._getOrCreateMap().get(category);
     }
 
-    var map = getOrCreateMap(this);
-    index = map.get(category);
+    /**
+     * @return The ordinal. If not found, return NaN.
+     */
+    parseAndCollect(category: any): number {
+        var index;
+        var needCollect = this._needCollect;
+
+        // The value of category dim can be the index of the given category set.
+        // This feature is only supported when !needCollect, because we should
+        // consider a common case: a value is 2017, which is a number but is
+        // expected to be tread as a category. This case usually happen in dataset,
+        // where it happent to be no need of the index feature.
+        if (typeof category !== 'string' && !needCollect) {
+            return category;
+        }
 
-    if (index == null) {
-        if (needCollect) {
+        // Optimize for the scenario:
+        // category is ['2012-01-01', '2012-01-02', ...], where the input
+        // data has been ensured not duplicate and is large data.
+        // Notice, if a dataset dimension provide categroies, usually echarts
+        // should remove duplication except user tell echarts dont do that
+        // (set axis.deduplication = false), because echarts do not know whether
+        // the values in the category dimension has duplication (consider the
+        // parallel-aqi example)
+        if (needCollect && !this._deduplication) {
             index = this.categories.length;
             this.categories[index] = category;
-            map.set(category, index);
+            return index;
         }
-        else {
-            index = NaN;
+
+        var map = this._getOrCreateMap();
+        index = map.get(category);
+
+        if (index == null) {
+            if (needCollect) {
+                index = this.categories.length;
+                this.categories[index] = category;
+                map.set(category, index);
+            }
+            else {
+                index = NaN;
+            }
         }
-    }
 
-    return index;
-};
+        return index;
+    }
 
-// Consider big data, do not create map until needed.
-function getOrCreateMap(ordinalMeta) {
-    return ordinalMeta._map || (
-        ordinalMeta._map = createHashMap(ordinalMeta.categories)
-    );
+    // Consider big data, do not create map until needed.
+    private _getOrCreateMap(): HashMap<number> {
+        return this._map || (
+            this._map = createHashMap<number>(this.categories)
+        );
+    }
 }
 
-function getName(obj) {
+function getName(obj: any): string {
     if (isObject(obj) && obj.value != null) {
         return obj.value;
     }
diff --git a/src/data/Source.ts b/src/data/Source.ts
index 55acf3a..4d1b5fb 100644
--- a/src/data/Source.ts
+++ b/src/data/Source.ts
@@ -17,15 +17,17 @@
 * under the License.
 */
 
-import {createHashMap, isTypedArray} from 'zrender/src/core/util';
-import {enableClassCheck} from '../util/clazz';
+import {createHashMap, isTypedArray, HashMap} from 'zrender/src/core/util';
+import {enableClassCheck, CheckableConstructor} from '../util/clazz';
 import {
+    SourceFormat, SeriesLayoutBy, DimensionDefinition,
+    OptionEncodeValue, OptionSourceData, OptionEncode,
     SOURCE_FORMAT_ORIGINAL,
     SERIES_LAYOUT_BY_COLUMN,
     SOURCE_FORMAT_UNKNOWN,
-    SOURCE_FORMAT_TYPED_ARRAY,
-    SOURCE_FORMAT_KEYED_COLUMNS
-} from './helper/sourceType';
+    SOURCE_FORMAT_KEYED_COLUMNS,
+    SOURCE_FORMAT_TYPED_ARRAY
+} from '../util/types';
 
 /**
  * [sourceFormat]
@@ -63,87 +65,89 @@ import {
  * + "unknown"
  */
 
-/**
- * @constructor
- * @param {Object} fields
- * @param {string} fields.sourceFormat
- * @param {Array|Object} fields.fromDataset
- * @param {Array|Object} [fields.data]
- * @param {string} [seriesLayoutBy='column']
- * @param {Array.<Object|string>} [dimensionsDefine]
- * @param {Objet|HashMap} [encodeDefine]
- * @param {number} [startIndex=0]
- * @param {number} [dimensionsDetectCount]
- */
-function Source(fields) {
+class Source {
 
-    /**
-     * @type {boolean}
-     */
-    this.fromDataset = fields.fromDataset;
+    readonly fromDataset: boolean;
 
     /**
      * Not null/undefined.
      * @type {Array|Object}
      */
-    this.data = fields.data || (
-        fields.sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS ? {} : []
-    );
+    readonly data: OptionSourceData;
 
     /**
      * See also "detectSourceFormat".
      * Not null/undefined.
-     * @type {string}
      */
-    this.sourceFormat = fields.sourceFormat || SOURCE_FORMAT_UNKNOWN;
+    readonly sourceFormat: SourceFormat;
 
     /**
      * 'row' or 'column'
      * Not null/undefined.
-     * @type {string} seriesLayoutBy
      */
-    this.seriesLayoutBy = fields.seriesLayoutBy || SERIES_LAYOUT_BY_COLUMN;
+    readonly seriesLayoutBy: SeriesLayoutBy;
 
     /**
      * dimensions definition in option.
      * can be null/undefined.
-     * @type {Array.<Object|string>}
      */
-    this.dimensionsDefine = fields.dimensionsDefine;
+    readonly dimensionsDefine: DimensionDefinition[];
 
     /**
      * encode definition in option.
      * can be null/undefined.
-     * @type {Objet|HashMap}
      */
-    this.encodeDefine = fields.encodeDefine && createHashMap(fields.encodeDefine);
+    readonly encodeDefine: HashMap<OptionEncodeValue>;
 
     /**
      * Not null/undefined, uint.
-     * @type {number}
      */
-    this.startIndex = fields.startIndex || 0;
+    readonly startIndex: number;
 
     /**
      * Can be null/undefined (when unknown), uint.
-     * @type {number}
      */
-    this.dimensionsDetectCount = fields.dimensionsDetectCount;
+    readonly dimensionsDetectCount: number;
+
+
+    constructor(fields: {
+        fromDataset: boolean,
+        data?: OptionSourceData,
+        sourceFormat?: SourceFormat, // default: SOURCE_FORMAT_UNKNOWN
+        seriesLayoutBy?: SeriesLayoutBy, // default: 'column'
+        dimensionsDefine?: DimensionDefinition[],
+        encodeDefine?: OptionEncode,
+        startIndex?: number, // default: 0
+        dimensionsDetectCount?: number
+    }) {
+
+        this.fromDataset = fields.fromDataset;
+        this.data = fields.data || (
+            fields.sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS ? {} : []
+        );
+        this.sourceFormat = fields.sourceFormat || SOURCE_FORMAT_UNKNOWN;
+        this.seriesLayoutBy = fields.seriesLayoutBy || SERIES_LAYOUT_BY_COLUMN;
+        this.dimensionsDefine = fields.dimensionsDefine;
+        this.encodeDefine = fields.encodeDefine && createHashMap(fields.encodeDefine);
+        this.startIndex = fields.startIndex || 0;
+        this.dimensionsDetectCount = fields.dimensionsDetectCount;
+    }
+
+    /**
+     * Wrap original series data for some compatibility cases.
+     */
+    static seriesDataToSource(data: OptionSourceData): Source {
+        return new Source({
+            data: data,
+            sourceFormat: isTypedArray(data)
+                ? SOURCE_FORMAT_TYPED_ARRAY
+                : SOURCE_FORMAT_ORIGINAL,
+            fromDataset: false
+        });
+    };
 }
 
-/**
- * Wrap original series data for some compatibility cases.
- */
-Source.seriesDataToSource = function (data) {
-    return new Source({
-        data: data,
-        sourceFormat: isTypedArray(data)
-            ? SOURCE_FORMAT_TYPED_ARRAY
-            : SOURCE_FORMAT_ORIGINAL,
-        fromDataset: false
-    });
-};
-
-enableClassCheck(Source);
+export type SourceConstructor = typeof Source & CheckableConstructor;
+enableClassCheck(Source as SourceConstructor);
 
 export default Source;
\ No newline at end of file
diff --git a/src/data/helper/completeDimensions.ts b/src/data/helper/completeDimensions.ts
index 41fa8eb..24e766a 100644
--- a/src/data/helper/completeDimensions.ts
+++ b/src/data/helper/completeDimensions.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 /**
  * @deprecated
  * Use `echarts/data/helper/createDimensions` instead.
@@ -26,7 +28,7 @@ import {createHashMap, each, isString, defaults, extend, isObject, clone} from '
 import {normalizeToArray} from '../../util/model';
 import {guessOrdinal, BE_ORDINAL} from './sourceHelper';
 import Source from '../Source';
-import {OTHER_DIMENSIONS} from './dimensionHelper';
+import {VISUAL_DIMENSIONS} from '../../util/types';
 import DataDimensionInfo from '../DataDimensionInfo';
 
 /**
@@ -190,7 +192,7 @@ function completeDimensions(sysDims, source, opt) {
     });
 
     function applyDim(resultItem, coordDim, coordDimIndex) {
-        if (OTHER_DIMENSIONS.get(coordDim) != null) {
+        if (VISUAL_DIMENSIONS.get(coordDim) != null) {
             resultItem.otherDims[coordDim] = coordDimIndex;
         }
         else {
diff --git a/src/data/helper/dataProvider.ts b/src/data/helper/dataProvider.ts
index bac6936..c6a9e04 100644
--- a/src/data/helper/dataProvider.ts
+++ b/src/data/helper/dataProvider.ts
@@ -23,292 +23,289 @@
 
 import {__DEV__} from '../../config';
 import {isTypedArray, extend, assert, each, isObject} from 'zrender/src/core/util';
-import {getDataItemValue, isDataItemOption} from '../../util/model';
-import {parseDate} from '../../util/number';
-import Source from '../Source';
+import {getDataItemValue} from '../../util/model';
+import Source, { SourceConstructor } from '../Source';
+import {ArrayLike, Dictionary} from 'zrender/src/core/types';
 import {
+    SOURCE_FORMAT_ORIGINAL,
+    SOURCE_FORMAT_OBJECT_ROWS,
+    SOURCE_FORMAT_KEYED_COLUMNS,
     SOURCE_FORMAT_TYPED_ARRAY,
     SOURCE_FORMAT_ARRAY_ROWS,
-    SOURCE_FORMAT_ORIGINAL,
-    SOURCE_FORMAT_OBJECT_ROWS
-} from './sourceType';
+    SERIES_LAYOUT_BY_COLUMN,
+    SERIES_LAYOUT_BY_ROW,
+    DimensionName, DimensionIndex, OptionSourceData,
+    DimensionIndexLoose, OptionDataItem, OptionDataPrimitive
+} from '../../util/types';
+import List from '../List';
+
+
+export interface DataProvider {
+    // If data is pure without style configuration
+    pure: boolean;
+    // If data is persistent and will not be released after use.
+    persistent: boolean;
+
+    getSource(): Source;
+    count(): number;
+    getItem(idx: number, out?: OptionDataItem): OptionDataItem;
+    appendData(newData: ArrayLike<OptionDataItem>): void;
+    clean(): void;
+}
 
 /**
  * If normal array used, mutable chunk size is supported.
  * If typed array used, chunk size must be fixed.
  */
-export function DefaultDataProvider(source, dimSize) {
-    if (!Source.isInstance(source)) {
-        source = Source.seriesDataToSource(source);
-    }
-    this._source = source;
+export class DefaultDataProvider implements DataProvider {
 
-    var data = this._data = source.data;
-    var sourceFormat = source.sourceFormat;
+    private _source: Source;
 
-    // Typed array. TODO IE10+?
-    if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {
-        if (__DEV__) {
-            if (dimSize == null) {
-                throw new Error('Typed array data must specify dimension size');
-            }
-        }
-        this._offset = 0;
-        this._dimSize = dimSize;
-        this._data = data;
-    }
+    private _data: OptionSourceData;
 
-    var methods = providerMethods[
-        sourceFormat === SOURCE_FORMAT_ARRAY_ROWS
-        ? sourceFormat + '_' + source.seriesLayoutBy
-        : sourceFormat
-    ];
+    private _offset: number;
 
-    if (__DEV__) {
-        assert(methods, 'Invalide sourceFormat: ' + sourceFormat);
-    }
+    private _dimSize: number;
 
-    extend(this, methods);
-}
+    pure: boolean;
 
-var providerProto = DefaultDataProvider.prototype;
-// If data is pure without style configuration
-providerProto.pure = false;
-// If data is persistent and will not be released after use.
-providerProto.persistent = true;
+    persistent: boolean;
 
-// ???! FIXME legacy data provider do not has method getSource
-providerProto.getSource = function () {
-    return this._source;
-};
+    static protoInitialize = (function () {
+        // PENDING: To avoid potential incompat (e.g., prototype
+        // is visited somewhere), still init them on prototype.
+        var proto = DefaultDataProvider.prototype;
+        proto.pure = false;
+        proto.persistent = true;
+    })();
 
-var providerMethods = {
-
-    'arrayRows_column': {
-        pure: true,
-        count: function () {
-            return Math.max(0, this._data.length - this._source.startIndex);
-        },
-        getItem: function (idx) {
-            return this._data[idx + this._source.startIndex];
-        },
-        appendData: appendDataSimply
-    },
 
-    'arrayRows_row': {
-        pure: true,
-        count: function () {
-            var row = this._data[0];
-            return row ? Math.max(0, row.length - this._source.startIndex) : 0;
-        },
-        getItem: function (idx) {
-            idx += this._source.startIndex;
-            var item = [];
-            var data = this._data;
-            for (var i = 0; i < data.length; i++) {
-                var row = data[i];
-                item.push(row ? row[idx] : null);
+    constructor(sourceParam: Source | OptionSourceData, dimSize?: number) {
+        // var source: Source;
+        var source: Source = !(Source as SourceConstructor).isInstance(sourceParam)
+            ? Source.seriesDataToSource(sourceParam as OptionSourceData)
+            : sourceParam as Source;
+
+        // declare source is Source;
+        this._source = source;
+
+        var data = this._data = source.data;
+        var sourceFormat = source.sourceFormat;
+
+        // Typed array. TODO IE10+?
+        if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {
+            if (__DEV__) {
+                if (dimSize == null) {
+                    throw new Error('Typed array data must specify dimension size');
+                }
             }
-            return item;
-        },
-        appendData: function () {
-            throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
+            this._offset = 0;
+            this._dimSize = dimSize;
+            this._data = data;
         }
-    },
 
-    'objectRows': {
-        pure: true,
-        count: countSimply,
-        getItem: getItemSimply,
-        appendData: appendDataSimply
-    },
+        var methods = providerMethods[
+            sourceFormat === SOURCE_FORMAT_ARRAY_ROWS
+            ? sourceFormat + '_' + source.seriesLayoutBy
+            : sourceFormat
+        ];
 
-    'keyedColumns': {
-        pure: true,
-        count: function () {
-            var dimName = this._source.dimensionsDefine[0].name;
-            var col = this._data[dimName];
-            return col ? col.length : 0;
-        },
-        getItem: function (idx) {
-            var item = [];
-            var dims = this._source.dimensionsDefine;
-            for (var i = 0; i < dims.length; i++) {
-                var col = this._data[dims[i].name];
-                item.push(col ? col[idx] : null);
-            }
-            return item;
-        },
-        appendData: function (newData) {
-            var data = this._data;
-            each(newData, function (newCol, key) {
-                var oldCol = data[key] || (data[key] = []);
-                for (var i = 0; i < (newCol || []).length; i++) {
-                    oldCol.push(newCol[i]);
-                }
-            });
+        if (__DEV__) {
+            assert(methods, 'Invalide sourceFormat: ' + sourceFormat);
         }
-    },
 
-    'original': {
-        count: countSimply,
-        getItem: getItemSimply,
-        appendData: appendDataSimply
-    },
+        extend(this, methods);
+    }
 
-    'typedArray': {
-        persistent: false,
-        pure: true,
-        count: function () {
-            return this._data ? (this._data.length / this._dimSize) : 0;
-        },
-        getItem: function (idx, out) {
-            idx = idx - this._offset;
-            out = out || [];
-            var offset = this._dimSize * idx;
-            for (var i = 0; i < this._dimSize; i++) {
-                out[i] = this._data[offset + i];
-            }
-            return out;
-        },
-        appendData: function (newData) {
-            if (__DEV__) {
-                assert(
-                    isTypedArray(newData),
-                    'Added data must be TypedArray if data in initialization is TypedArray'
-                );
-            }
+    getSource(): Source {
+        return this._source;
+    }
 
-            this._data = newData;
-        },
+    count(): number {
+        return 0;
+    }
 
-        // Clean self if data is already used.
-        clean: function () {
-            // PENDING
-            this._offset += this.count();
-            this._data = null;
-        }
+    getItem(idx: number): OptionDataItem {
+        return;
     }
-};
 
-function countSimply() {
-    return this._data.length;
-}
-function getItemSimply(idx) {
-    return this._data[idx];
-}
-function appendDataSimply(newData) {
-    for (var i = 0; i < newData.length; i++) {
-        this._data.push(newData[i]);
+    appendData(newData: OptionSourceData): void {
     }
-}
 
+    clean(): void {
+    }
 
+    static internalField = (function () {
+
+        providerMethods = {
+
+            [SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_COLUMN]: {
+                pure: true,
+                count: function (this: DefaultDataProvider): number {
+                    return Math.max(0, (this._data as OptionDataItem[][]).length - this._source.startIndex);
+                },
+                getItem: function (this: DefaultDataProvider, idx: number): OptionDataPrimitive[] {
+                    return (this._data as OptionDataPrimitive[][])[idx + this._source.startIndex];
+                },
+                appendData: appendDataSimply
+            },
+
+            [SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_ROW]: {
+                pure: true,
+                count: function (this: DefaultDataProvider): number {
+                    var row = (this._data as OptionDataPrimitive[][])[0];
+                    return row ? Math.max(0, row.length - this._source.startIndex) : 0;
+                },
+                getItem: function (this: DefaultDataProvider, idx: number): OptionDataPrimitive[] {
+                    idx += this._source.startIndex;
+                    var item = [];
+                    var data = this._data as OptionDataPrimitive[][];
+                    for (var i = 0; i < data.length; i++) {
+                        var row = data[i];
+                        item.push(row ? row[idx] : null);
+                    }
+                    return item;
+                },
+                appendData: function () {
+                    throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
+                }
+            },
+
+            [SOURCE_FORMAT_OBJECT_ROWS]: {
+                pure: true,
+                count: countSimply,
+                getItem: getItemSimply,
+                appendData: appendDataSimply
+            },
+
+            [SOURCE_FORMAT_KEYED_COLUMNS]: {
+                pure: true,
+                count: function (this: DefaultDataProvider): number {
+                    var dimName = this._source.dimensionsDefine[0].name;
+                    var col = (this._data as Dictionary<OptionDataPrimitive[]>)[dimName];
+                    return col ? col.length : 0;
+                },
+                getItem: function (this: DefaultDataProvider, idx: number): OptionDataPrimitive[] {
+                    var item = [];
+                    var dims = this._source.dimensionsDefine;
+                    for (var i = 0; i < dims.length; i++) {
+                        var col = (this._data as Dictionary<OptionDataPrimitive[]>)[dims[i].name];
+                        item.push(col ? col[idx] : null);
+                    }
+                    return item;
+                },
+                appendData: function (this: DefaultDataProvider, newData: OptionSourceData) {
+                    var data = this._data as Dictionary<OptionDataPrimitive[]>;
+                    each(newData, function (newCol, key) {
+                        var oldCol = data[key] || (data[key] = []);
+                        for (var i = 0; i < (newCol || []).length; i++) {
+                            oldCol.push(newCol[i]);
+                        }
+                    });
+                }
+            },
+
+            [SOURCE_FORMAT_ORIGINAL]: {
+                count: countSimply,
+                getItem: getItemSimply,
+                appendData: appendDataSimply
+            },
+
+            [SOURCE_FORMAT_TYPED_ARRAY]: {
+                persistent: false,
+                pure: true,
+                count: function (this: DefaultDataProvider): number {
+                    return this._data ? ((this._data as ArrayLike<number>).length / this._dimSize) : 0;
+                },
+                getItem: function (this: DefaultDataProvider, idx: number, out: ArrayLike<number>): ArrayLike<number> {
+                    idx = idx - this._offset;
+                    out = out || [];
+                    var offset = this._dimSize * idx;
+                    for (var i = 0; i < this._dimSize; i++) {
+                        out[i] = (this._data as ArrayLike<number>)[offset + i];
+                    }
+                    return out;
+                },
+                appendData: function (this: DefaultDataProvider, newData: ArrayLike<number>): void {
+                    if (__DEV__) {
+                        assert(
+                            isTypedArray(newData),
+                            'Added data must be TypedArray if data in initialization is TypedArray'
+                        );
+                    }
+
+                    this._data = newData;
+                },
+
+                // Clean self if data is already used.
+                clean: function (this: DefaultDataProvider): void {
+                    // PENDING
+                    this._offset += this.count();
+                    this._data = null;
+                }
+            }
+        };
+
+        function countSimply(this: DefaultDataProvider): number {
+            return (this._data as []).length;
+        }
+        function getItemSimply(this: DefaultDataProvider, idx: number): OptionDataItem {
+            return (this._data as [])[idx];
+        }
+        function appendDataSimply(this: DefaultDataProvider, newData: ArrayLike<OptionDataItem>): void {
+            for (var i = 0; i < newData.length; i++) {
+                (this._data as any[]).push(newData[i]);
+            }
+        }
 
-var rawValueGetters = {
+    })()
+}
 
-    arrayRows: getRawValueSimply,
+var providerMethods: Dictionary<any>;
 
-    objectRows: function (dataItem, dataIndex, dimIndex, dimName) {
+// TODO
+// merge it to dataProvider?
+type RawValueGetter = (
+    dataItem: OptionDataItem,
+    dataIndex: number,
+    dimIndex: DimensionIndex,
+    dimName: DimensionName
+    // If dimIndex not provided, return OptionDataItem.
+    // If dimIndex provided, return OptionDataPrimitive.
+) => OptionDataPrimitive | OptionDataItem;
+
+var rawValueGetters: {[sourceFormat: string]: RawValueGetter} = {
+
+    [SOURCE_FORMAT_ARRAY_ROWS]: getRawValueSimply,
+
+    [SOURCE_FORMAT_OBJECT_ROWS]: function (
+        dataItem: Dictionary<OptionDataPrimitive>, dataIndex: number, dimIndex: number, dimName: string
+    ): OptionDataPrimitive | Dictionary<OptionDataPrimitive> {
         return dimIndex != null ? dataItem[dimName] : dataItem;
     },
 
-    keyedColumns: getRawValueSimply,
+    [SOURCE_FORMAT_KEYED_COLUMNS]: getRawValueSimply,
 
-    original: function (dataItem, dataIndex, dimIndex, dimName) {
-        // FIXME
-        // In some case (markpoint in geo (geo-map.html)), dataItem
-        // is {coord: [...]}
+    [SOURCE_FORMAT_ORIGINAL]: function (
+        dataItem: OptionDataItem, dataIndex: number, dimIndex: number, dimName: string
+    ): OptionDataPrimitive | OptionDataItem {
+        // FIXME: In some case (markpoint in geo (geo-map.html)),
+        // dataItem is {coord: [...]}
         var value = getDataItemValue(dataItem);
         return (dimIndex == null || !(value instanceof Array))
             ? value
             : value[dimIndex];
     },
 
-    typedArray: getRawValueSimply
+    [SOURCE_FORMAT_TYPED_ARRAY]: getRawValueSimply
 };
 
-function getRawValueSimply(dataItem, dataIndex, dimIndex, dimName) {
+function getRawValueSimply(
+    dataItem: ArrayLike<OptionDataPrimitive>, dataIndex: number, dimIndex: number, dimName: string
+): OptionDataPrimitive | ArrayLike<OptionDataPrimitive> {
     return dimIndex != null ? dataItem[dimIndex] : dataItem;
 }
 
-
-export var defaultDimValueGetters = {
-
-    arrayRows: getDimValueSimply,
-
-    objectRows: function (dataItem, dimName, dataIndex, dimIndex) {
-        return converDataValue(dataItem[dimName], this._dimensionInfos[dimName]);
-    },
-
-    keyedColumns: getDimValueSimply,
-
-    original: function (dataItem, dimName, dataIndex, dimIndex) {
-        // Performance sensitive, do not use modelUtil.getDataItemValue.
-        // If dataItem is an plain object with no value field, the var `value`
-        // will be assigned with the object, but it will be tread correctly
-        // in the `convertDataValue`.
-        var value = dataItem && (dataItem.value == null ? dataItem : dataItem.value);
-
-        // If any dataItem is like { value: 10 }
-        if (!this._rawData.pure && isDataItemOption(dataItem)) {
-            this.hasItemOption = true;
-        }
-        return converDataValue(
-            (value instanceof Array)
-                ? value[dimIndex]
-                // If value is a single number or something else not array.
-                : value,
-            this._dimensionInfos[dimName]
-        );
-    },
-
-    typedArray: function (dataItem, dimName, dataIndex, dimIndex) {
-        return dataItem[dimIndex];
-    }
-
-};
-
-function getDimValueSimply(dataItem, dimName, dataIndex, dimIndex) {
-    return converDataValue(dataItem[dimIndex], this._dimensionInfos[dimName]);
-}
-
-/**
- * This helper method convert value in data.
- * @param {string|number|Date} value
- * @param {Object|string} [dimInfo] If string (like 'x'), dimType defaults 'number'.
- *        If "dimInfo.ordinalParseAndSave", ordinal value can be parsed.
- */
-function converDataValue(value, dimInfo) {
-    // Performance sensitive.
-    var dimType = dimInfo && dimInfo.type;
-    if (dimType === 'ordinal') {
-        // If given value is a category string
-        var ordinalMeta = dimInfo && dimInfo.ordinalMeta;
-        return ordinalMeta
-            ? ordinalMeta.parseAndCollect(value)
-            : value;
-    }
-
-    if (dimType === 'time'
-        // spead up when using timestamp
-        && typeof value !== 'number'
-        && value != null
-        && value !== '-'
-    ) {
-        value = +parseDate(value);
-    }
-
-    // dimType defaults 'number'.
-    // If dimType is not ordinal and value is null or undefined or NaN or '-',
-    // parse to NaN.
-    return (value == null || value === '')
-        ? NaN
-        // If string (like '-'), using '+' parse to NaN
-        // If object, also parse to NaN
-        : +value;
-}
-
 // ??? FIXME can these logic be more neat: getRawValue, getRawDataItem,
 // Consider persistent.
 // Caution: why use raw value to display on label or tooltip?
@@ -316,13 +313,9 @@ function converDataValue(value, dimInfo) {
 // how to format is expected. More over, if stack is used, calculated
 // value may be 0.91000000001, which have brings trouble to display.
 // TODO: consider how to treat null/undefined/NaN when display?
-/**
- * @param {module:echarts/data/List} data
- * @param {number} dataIndex
- * @param {string|number} [dim] dimName or dimIndex
- * @return {Array.<number>|string|number} can be null/undefined.
- */
-export function retrieveRawValue(data, dataIndex, dim) {
+export function retrieveRawValue(
+    data: List, dataIndex: number, dim?: DimensionName | DimensionIndexLoose
+): any {
     if (!data) {
         return;
     }
@@ -352,14 +345,14 @@ export function retrieveRawValue(data, dataIndex, dim) {
  * data: [{name: 'xx', value: 5, selected: true}, ...]
  * where only sourceFormat is 'original' and 'objectRows' supported.
  *
- * ??? TODO
+ * // TODO
  * Supported detail options in data item when using 'arrayRows'.
  *
- * @param {module:echarts/data/List} data
- * @param {number} dataIndex
- * @param {string} attr like 'selected'
+ * @param data
+ * @param dataIndex
+ * @param attr like 'selected'
  */
-export function retrieveRawAttr(data, dataIndex, attr) {
+export function retrieveRawAttr(data: List, dataIndex: number, attr: string): any {
     if (!data) {
         return;
     }
@@ -377,6 +370,6 @@ export function retrieveRawAttr(data, dataIndex, attr) {
         dataItem = null;
     }
     if (dataItem) {
-        return dataItem[attr];
+        return (dataItem as Dictionary<OptionDataPrimitive>)[attr];
     }
 }
diff --git a/src/data/helper/dimensionHelper.ts b/src/data/helper/dimensionHelper.ts
index b0e616c..1db36ed 100644
--- a/src/data/helper/dimensionHelper.ts
+++ b/src/data/helper/dimensionHelper.ts
@@ -17,16 +17,44 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {each, createHashMap, assert} from 'zrender/src/core/util';
 import { __DEV__ } from '../../config';
+import List from '../List';
+import {
+    DimensionName, DimensionIndex, VISUAL_DIMENSIONS, DimensionType
+} from '../../util/types';
+
+export type DimensionSummaryEncode = {
+    defaultedLabel: DimensionName[],
+    defaultedTooltip: DimensionName[],
+    [coordOrVisualDimName: string]:
+        // index: coordDimIndex, value: dataDimName
+        DimensionName[]
+};
+export type DimensionUserOuputEncode = {
+    [coordOrVisualDimName: string]:
+        // index: coordDimIndex, value: dataDimIndex
+        DimensionIndex[]
+};
+export type DimensionUserOuput = {
+    // The same as `data.dimensions`
+    dimensionNames: DimensionName[]
+    encode: DimensionUserOuputEncode
+};
+export type DimensionSummary = {
+    encode: DimensionSummaryEncode,
+    // Those details that can be expose to users are put int `userOutput`.
+    userOutput: DimensionUserOuput,
+    // All of the data dim names that mapped by coordDim.
+    dataDimsOnCoord: DimensionName[],
+    encodeFirstDimNotExtra: {[coordDim: string]: DimensionName},
+}
 
-export var OTHER_DIMENSIONS = createHashMap([
-    'tooltip', 'label', 'itemName', 'itemId', 'seriesName'
-]);
-
-export function summarizeDimensions(data) {
-    var summary = {};
-    var encode = summary.encode = {};
+export function summarizeDimensions(data: List): DimensionSummary {
+    var summary: DimensionSummary = {} as DimensionSummary;
+    var encode = summary.encode = {} as DimensionSummaryEncode;
     var notExtraCoordDimMap = createHashMap();
     var defaultedLabel = [];
     var defaultedTooltip = [];
@@ -43,7 +71,7 @@ export function summarizeDimensions(data) {
         var coordDim = dimItem.coordDim;
         if (coordDim) {
             if (__DEV__) {
-                assert(OTHER_DIMENSIONS.get(coordDim) == null);
+                assert(VISUAL_DIMENSIONS.get(coordDim) == null);
             }
 
             var coordDimIndex = dimItem.coordDimIndex;
@@ -69,7 +97,7 @@ export function summarizeDimensions(data) {
             }
         }
 
-        OTHER_DIMENSIONS.each(function (v, otherDim) {
+        VISUAL_DIMENSIONS.each(function (v, otherDim) {
             var encodeArr = getOrCreateEncodeArr(encode, otherDim);
 
             var dimIndex = dimItem.otherDims[otherDim];
@@ -117,14 +145,17 @@ export function summarizeDimensions(data) {
     return summary;
 }
 
-function getOrCreateEncodeArr(encode, dim) {
+function getOrCreateEncodeArr(
+    encode: DimensionSummaryEncode, dim: DimensionName
+): DimensionName[] {
     if (!encode.hasOwnProperty(dim)) {
         encode[dim] = [];
     }
     return encode[dim];
 }
 
-export function getDimensionTypeByAxis(axisType) {
+// FIXME:TS should be type `AxisType`
+export function getDimensionTypeByAxis(axisType: string) {
     return axisType === 'category'
         ? 'ordinal'
         : axisType === 'time'
@@ -132,7 +163,7 @@ export function getDimensionTypeByAxis(axisType) {
         : 'float';
 }
 
-function mayLabelDimType(dimType) {
+function mayLabelDimType(dimType: DimensionType): boolean {
     // In most cases, ordinal and time do not suitable for label.
     // Ordinal info can be displayed on axis. Time is too long.
     return !(dimType === 'ordinal' || dimType === 'time');
diff --git a/src/data/helper/sourceHelper.ts b/src/data/helper/sourceHelper.ts
index b58b01f..db59b9e 100644
--- a/src/data/helper/sourceHelper.ts
+++ b/src/data/helper/sourceHelper.ts
@@ -17,6 +17,8 @@
 * under the License.
 */
 
+// @ts-nocheck
+
 import {__DEV__} from '../../config';
 import {makeInner, getDataItemValue} from '../../util/model';
 import {
@@ -37,11 +39,11 @@ import {
     SOURCE_FORMAT_ORIGINAL,
     SOURCE_FORMAT_ARRAY_ROWS,
     SOURCE_FORMAT_OBJECT_ROWS,
+    SERIES_LAYOUT_BY_ROW,
     SOURCE_FORMAT_KEYED_COLUMNS,
-    SOURCE_FORMAT_UNKNOWN,
     SOURCE_FORMAT_TYPED_ARRAY,
-    SERIES_LAYOUT_BY_ROW
-} from './sourceType';
+    SOURCE_FORMAT_UNKNOWN
+} from '../../util/types';
 
 // The result of `guessOrdinal`.
 export var BE_ORDINAL = {
diff --git a/src/data/helper/sourceType.ts b/src/data/helper/sourceType.ts
deleted file mode 100644
index 537f671..0000000
--- a/src/data/helper/sourceType.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-// Avoid typo.
-export var SOURCE_FORMAT_ORIGINAL = 'original';
-export var SOURCE_FORMAT_ARRAY_ROWS = 'arrayRows';
-export var SOURCE_FORMAT_OBJECT_ROWS = 'objectRows';
-export var SOURCE_FORMAT_KEYED_COLUMNS = 'keyedColumns';
-export var SOURCE_FORMAT_UNKNOWN = 'unknown';
-// ??? CHANGE A NAME
-export var SOURCE_FORMAT_TYPED_ARRAY = 'typedArray';
-
-export var SERIES_LAYOUT_BY_COLUMN = 'column';
-export var SERIES_LAYOUT_BY_ROW = 'row';
diff --git a/src/echarts.ts b/src/echarts.ts
index 36a29cf..32fc419 100644
--- a/src/echarts.ts
+++ b/src/echarts.ts
@@ -16,23 +16,27 @@
 * specific language governing permissions and limitations
 * under the License.
 */
+
 import {__DEV__} from './config';
 import * as zrender from 'zrender/src/zrender';
 import * as zrUtil from 'zrender/src/core/util';
 import * as colorTool from 'zrender/src/tool/color';
 import env from 'zrender/src/core/env';
 import timsort from 'zrender/src/core/timsort';
-import Eventful from 'zrender/src/mixin/Eventful';
-import GlobalModel from './model/Global';
+import Eventful from 'zrender/src/core/Eventful';
+import Element, { ElementEvent } from 'zrender/src/Element';
+import CanvasPainter from 'zrender/src/canvas/Painter';
+import SVGPainter from 'zrender/src/svg/Painter';
+import GlobalModel, {QueryConditionKindA} from './model/Global';
 import ExtensionAPI from './ExtensionAPI';
 import CoordinateSystemManager from './CoordinateSystem';
 import OptionManager from './model/OptionManager';
 import backwardCompat from './preprocessor/backwardCompat';
 import dataStack from './processor/dataStack';
-import ComponentModel from './model/Component';
-import SeriesModel from './model/Series';
-import ComponentView from './view/Component';
-import ChartView from './view/Chart';
+import ComponentModel, { ComponentModelConstructor } from './model/Component';
+import SeriesModel, { SeriesModelConstructor } from './model/Series';
+import ComponentView, {ComponentViewConstructor} from './view/Component';
+import ChartView, {ChartViewConstructor} from './view/Chart';
 import * as graphic from './util/graphic';
 import * as modelUtil from './util/model';
 import {throttle} from './util/throttle';
@@ -43,13 +47,33 @@ import Scheduler from './stream/Scheduler';
 import lightTheme from './theme/light';
 import darkTheme from './theme/dark';
 import './component/dataset';
-import mapDataStorage from './coord/geo/mapDataStorage';
+import mapDataStorage, { GeoMapDefinition, GeoMapGeoJSONSource, GeoSpecialAreas } from './coord/geo/mapDataStorage';
+import {CoordinateSystem, CoordinateSystemCreator} from './coord/CoordinateSystem';
+import { parseClassType } from './util/clazz';
+import {ECEventProcessor} from './util/ECEventProcessor';
+import {
+    Payload, PayloadItem, ECElement, RendererType, ECEvent,
+    ActionHandler, ActionInfo, OptionPreprocessor, PostUpdater,
+    LoadingEffect, LoadingEffectCreator, StageHandler,
+    StageHandlerOverallReset, VisualType, StageHandlerInput,
+    ViewRootGroup, DimensionDefinitionLoose, ECEventData, ThemeOption,
+    ECOption,
+    ECUnitOption,
+    ZRColor,
+    ComponentMainType,
+    ComponentSubType
+} from './util/types';
+import Displayable from 'zrender/src/graphic/Displayable';
+import IncrementalDisplayable from 'zrender/src/graphic/IncrementalDisplayable';
+
+
+declare var global: any;
+type ModelFinder = modelUtil.ModelFinder;
 
 var assert = zrUtil.assert;
 var each = zrUtil.each;
 var isFunction = zrUtil.isFunction;
 var isObject = zrUtil.isObject;
-var parseClassType = ComponentModel.parseClassType;
 
 export var version = '4.6.0';
 
@@ -96,1950 +120,1792 @@ export var PRIORITY = {
 // dispatchAction with updateMethod "none" in main process.
 // This flag is used to carry out this rule.
 // All events will be triggered out side main process (i.e. when !this[IN_MAIN_PROCESS]).
-var IN_MAIN_PROCESS = '__flagInMainProcess';
-var OPTION_UPDATED = '__optionUpdated';
+var IN_MAIN_PROCESS = '__flagInMainProcess' as const;
+var OPTION_UPDATED = '__optionUpdated' as const;
 var ACTION_REG = /^[a-zA-Z0-9_]+$/;
 
+var CONNECT_STATUS_KEY = '__connectUpdateStatus' as const;
+var CONNECT_STATUS_PENDING = 0 as const;
+var CONNECT_STATUS_UPDATING = 1 as const;
+var CONNECT_STATUS_UPDATED = 2 as const;
+type ConnectStatus =
+    typeof CONNECT_STATUS_PENDING
+    | typeof CONNECT_STATUS_UPDATING
+    | typeof CONNECT_STATUS_UPDATED;
+
+type SetOptionOpts = {
+    notMerge?: boolean,
+    lazyUpdate?: boolean,
+    silent?: boolean
+};
 
-function createRegisterEventWithLowercaseName(method, ignoreDisposed) {
-    return function (eventName, handler, context) {
-        if (!ignoreDisposed && this._disposed) {
+type EventMethodName = 'on' | 'off';
+function createRegisterEventWithLowercaseECharts(method: EventMethodName) {
+    return function (this: ECharts, ...args: any): ECharts {
+        if (this.isDisposed()) {
             disposedWarning(this.id);
             return;
         }
-
-        // Event name is all lowercase
-        eventName = eventName && eventName.toLowerCase();
-        Eventful.prototype[method].call(this, eventName, handler, context);
+        return toLowercaseNameAndCallEventful<ECharts>(this, method, args);
     };
 }
-
-/**
- * @module echarts~MessageCenter
- */
-function MessageCenter() {
-    Eventful.call(this);
+function createRegisterEventWithLowercaseMessageCenter(method: EventMethodName) {
+    return function (this: MessageCenter, ...args: any): MessageCenter {
+        return toLowercaseNameAndCallEventful<MessageCenter>(this, method, args);
+    };
+}
+function toLowercaseNameAndCallEventful<T>(host: T, method: EventMethodName, args: any): T {
+    // `args[0]` is event name. Event name is all lowercase.
+    args[0] = args[0] && args[0].toLowerCase();
+    return Eventful.prototype[method].apply(host, args) as any;
 }
-MessageCenter.prototype.on = createRegisterEventWithLowercaseName('on', true);
-MessageCenter.prototype.off = createRegisterEventWithLowercaseName('off', true);
-MessageCenter.prototype.one = createRegisterEventWithLowercaseName('one', true);
-zrUtil.mixin(MessageCenter, Eventful);
 
-/**
- * @module echarts~ECharts
- */
-function ECharts(dom, theme, opts) {
-    opts = opts || {};
 
-    // Get theme by name
-    if (typeof theme === 'string') {
-        theme = themeStorage[theme];
-    }
+class MessageCenter extends Eventful<MessageCenter> {}
+var messageCenterProto = MessageCenter.prototype;
+messageCenterProto.on = createRegisterEventWithLowercaseMessageCenter('on');
+messageCenterProto.off = createRegisterEventWithLowercaseMessageCenter('off');
+// messageCenterProto.one = createRegisterEventWithLowercaseMessageCenter('one');
+
+
+class ECharts {
 
     /**
-     * @type {string}
+     * @readonly
      */
-    this.id;
+    id: string;
 
     /**
      * Group id
-     * @type {string}
+     * @readonly
      */
-    this.group;
+    group: string;
 
-    /**
-     * @type {HTMLElement}
-     * @private
-     */
-    this._dom = dom;
+    private _zr: zrender.ZRenderType;
 
-    var defaultRenderer = 'canvas';
-    if (__DEV__) {
-        defaultRenderer = (
-            typeof window === 'undefined' ? global : window
-        ).__ECHARTS__DEFAULT__RENDERER__ || defaultRenderer;
-    }
+    private _dom: HTMLElement;
 
-    /**
-     * @type {module:zrender/ZRender}
-     * @private
-     */
-    var zr = this._zr = zrender.init(dom, {
-        renderer: opts.renderer || defaultRenderer,
-        devicePixelRatio: opts.devicePixelRatio,
-        width: opts.width,
-        height: opts.height
-    });
+    private _model: GlobalModel;
 
-    /**
-     * Expect 60 fps.
-     * @type {Function}
-     * @private
-     */
-    this._throttledZrFlush = throttle(zrUtil.bind(zr.flush, zr), 17);
+    private _throttledZrFlush: zrender.ZRenderType extends {flush: infer R} ? R : never;
 
-    var theme = zrUtil.clone(theme);
-    theme && backwardCompat(theme, true);
-    /**
-     * @type {Object}
-     * @private
-     */
-    this._theme = theme;
+    private _theme: ThemeOption;
 
-    /**
-     * @type {Array.<module:echarts/view/Chart>}
-     * @private
-     */
-    this._chartsViews = [];
+    private _chartsViews: ChartView[] = [];
 
-    /**
-     * @type {Object.<string, module:echarts/view/Chart>}
-     * @private
-     */
-    this._chartsMap = {};
+    private _chartsMap: {[viewId: string]: ChartView} = {};
 
-    /**
-     * @type {Array.<module:echarts/view/Component>}
-     * @private
-     */
-    this._componentsViews = [];
+    private _componentsViews: ComponentView[] = [];
 
-    /**
-     * @type {Object.<string, module:echarts/view/Component>}
-     * @private
-     */
-    this._componentsMap = {};
+    private _componentsMap: {[viewId: string]: ComponentView} = {};
 
-    /**
-     * @type {module:echarts/CoordinateSystem}
-     * @private
-     */
-    this._coordSysMgr = new CoordinateSystemManager();
+    private _coordSysMgr: CoordinateSystemManager;
 
-    /**
-     * @type {module:echarts/ExtensionAPI}
-     * @private
-     */
-    var api = this._api = createExtensionAPI(this);
+    private _api: ExtensionAPI;
 
-    // Sort on demand
-    function prioritySortFunc(a, b) {
-        return a.__prio - b.__prio;
-    }
-    timsort(visualFuncs, prioritySortFunc);
-    timsort(dataProcessorFuncs, prioritySortFunc);
+    private _scheduler: Scheduler;
 
-    /**
-     * @type {module:echarts/stream/Scheduler}
-     */
-    this._scheduler = new Scheduler(this, api, dataProcessorFuncs, visualFuncs);
+    private _messageCenter: MessageCenter;
 
-    Eventful.call(this, this._ecEventProcessor = new EventProcessor());
+    // Can't dispatch action during rendering procedure
+    private _pendingActions: Payload[] = [];
 
-    /**
-     * @type {module:echarts~MessageCenter}
-     * @private
-     */
-    this._messageCenter = new MessageCenter();
+    private _ecEventProcessor: ECEventProcessor;
 
-    // Init mouse events
-    this._initEvents();
+    private _disposed: boolean;
 
-    // In case some people write `window.onresize = chart.resize`
-    this.resize = zrUtil.bind(this.resize, this);
+    private _loadingFX: LoadingEffect;
 
-    // Can't dispatch action during rendering procedure
-    this._pendingActions = [];
+    private [OPTION_UPDATED]: boolean | {silent: boolean};
+    private [IN_MAIN_PROCESS]: boolean;
+    private [CONNECT_STATUS_KEY]: ConnectStatus;
 
-    zr.animation.on('frame', this._onframe, this);
 
-    bindRenderedEvent(zr, this);
+    constructor(
+        dom: HTMLElement,
+        // Theme name or themeOption.
+        theme?: string | ThemeOption,
+        opts?: {
+            renderer?: RendererType,
+            devicePixelRatio?: number,
+            width?: number,
+            height?: number
+        }
+    ) {
+        opts = opts || {};
 
-    // ECharts instance can be used as value.
-    zrUtil.setAsPrimitive(this);
-}
+        // Get theme by name
+        if (typeof theme === 'string') {
+            theme = themeStorage[theme] as object;
+        }
 
-var echartsProto = ECharts.prototype;
+        this._dom = dom;
 
-echartsProto._onframe = function () {
-    if (this._disposed) {
-        return;
-    }
+        var defaultRenderer = 'canvas';
+        if (__DEV__) {
+            defaultRenderer = ((
+                typeof window === 'undefined' ? global : window
+            ) as any).__ECHARTS__DEFAULT__RENDERER__ || defaultRenderer;
+        }
 
-    var scheduler = this._scheduler;
+        var zr = this._zr = zrender.init(dom, {
+            renderer: opts.renderer || defaultRenderer,
+            devicePixelRatio: opts.devicePixelRatio,
+            width: opts.width,
+            height: opts.height
+        });
 
-    // Lazy update
-    if (this[OPTION_UPDATED]) {
-        var silent = this[OPTION_UPDATED].silent;
+        // Expect 60 fps.
+        this._throttledZrFlush = throttle(zrUtil.bind(zr.flush, zr), 17);
 
-        this[IN_MAIN_PROCESS] = true;
+        theme = zrUtil.clone(theme);
+        theme && backwardCompat(theme, true);
 
-        prepare(this);
-        updateMethods.update.call(this);
+        this._theme = theme;
 
-        this[IN_MAIN_PROCESS] = false;
+        this._coordSysMgr = new CoordinateSystemManager();
 
-        this[OPTION_UPDATED] = false;
+        var api = this._api = createExtensionAPI(this);
 
-        flushPendingActions.call(this, silent);
+        // Sort on demand
+        function prioritySortFunc(a: StageHandler, b: StageHandler): number {
+            return a.__prio - b.__prio;
+        }
+        timsort(visualFuncs, prioritySortFunc);
+        timsort(dataProcessorFuncs, prioritySortFunc);
 
-        triggerUpdatedEvent.call(this, silent);
-    }
-    // Avoid do both lazy update and progress in one frame.
-    else if (scheduler.unfinished) {
-        // Stream progress.
-        var remainTime = TEST_FRAME_REMAIN_TIME;
-        var ecModel = this._model;
-        var api = this._api;
-        scheduler.unfinished = false;
-        do {
-            var startTime = +new Date();
+        this._scheduler = new Scheduler(this, api, dataProcessorFuncs, visualFuncs);
 
-            scheduler.performSeriesTasks(ecModel);
+        this._ecEventProcessor = new ECEventProcessor();
+        Eventful.call(this, this._ecEventProcessor);
 
-            // Currently dataProcessorFuncs do not check threshold.
-            scheduler.performDataProcessorTasks(ecModel);
+        this._messageCenter = new MessageCenter();
 
-            updateStreamModes(this, ecModel);
+        // Init mouse events
+        this._initEvents();
 
-            // Do not update coordinate system here. Because that coord system update in
-            // each frame is not a good user experience. So we follow the rule that
-            // the extent of the coordinate system is determin in the first frame (the
-            // frame is executed immedietely after task reset.
-            // this._coordSysMgr.update(ecModel, api);
+        // In case some people write `window.onresize = chart.resize`
+        this.resize = zrUtil.bind(this.resize, this);
 
-            // console.log('--- ec frame visual ---', remainTime);
-            scheduler.performVisualTasks(ecModel);
+        zr.animation.on('frame', this._onframe, this);
 
-            renderSeries(this, this._model, api, 'remain');
+        bindRenderedEvent(zr, this);
 
-            remainTime -= (+new Date() - startTime);
-        }
-        while (remainTime > 0 && scheduler.unfinished);
+        // ECharts instance can be used as value.
+        zrUtil.setAsPrimitive(this);
+    }
 
-        // Call flush explicitly for trigger finished event.
-        if (!scheduler.unfinished) {
-            this._zr.flush();
+    private _onframe(): void {
+        if (this._disposed) {
+            return;
         }
-        // Else, zr flushing be ensue within the same frame,
-        // because zr flushing is after onframe event.
-    }
-};
 
-/**
- * @return {HTMLElement}
- */
-echartsProto.getDom = function () {
-    return this._dom;
-};
+        var scheduler = this._scheduler;
 
-/**
- * @return {module:zrender~ZRender}
- */
-echartsProto.getZr = function () {
-    return this._zr;
-};
+        // Lazy update
+        if (this[OPTION_UPDATED]) {
+            var silent = (this[OPTION_UPDATED] as any).silent;
 
-/**
- * Usage:
- * chart.setOption(option, notMerge, lazyUpdate);
- * chart.setOption(option, {
- *     notMerge: ...,
- *     lazyUpdate: ...,
- *     silent: ...
- * });
- *
- * @param {Object} option
- * @param {Object|boolean} [opts] opts or notMerge.
- * @param {boolean} [opts.notMerge=false]
- * @param {boolean} [opts.lazyUpdate=false] Useful when setOption frequently.
- */
-echartsProto.setOption = function (option, notMerge, lazyUpdate) {
-    if (__DEV__) {
-        assert(!this[IN_MAIN_PROCESS], '`setOption` should not be called during main process.');
-    }
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
-    }
+            this[IN_MAIN_PROCESS] = true;
 
-    var silent;
-    if (isObject(notMerge)) {
-        lazyUpdate = notMerge.lazyUpdate;
-        silent = notMerge.silent;
-        notMerge = notMerge.notMerge;
-    }
+            prepare(this);
+            updateMethods.update.call(this);
 
-    this[IN_MAIN_PROCESS] = true;
+            this[IN_MAIN_PROCESS] = false;
 
-    if (!this._model || notMerge) {
-        var optionManager = new OptionManager(this._api);
-        var theme = this._theme;
-        var ecModel = this._model = new GlobalModel();
-        ecModel.scheduler = this._scheduler;
-        ecModel.init(null, null, theme, optionManager);
-    }
+            this[OPTION_UPDATED] = false;
 
-    this._model.setOption(option, optionPreprocessorFuncs);
+            flushPendingActions.call(this, silent);
 
-    if (lazyUpdate) {
-        this[OPTION_UPDATED] = {silent: silent};
-        this[IN_MAIN_PROCESS] = false;
-    }
-    else {
-        prepare(this);
+            triggerUpdatedEvent.call(this, silent);
+        }
+        // Avoid do both lazy update and progress in one frame.
+        else if (scheduler.unfinished) {
+            // Stream progress.
+            var remainTime = TEST_FRAME_REMAIN_TIME;
+            var ecModel = this._model;
+            var api = this._api;
+            scheduler.unfinished = +false;
+            do {
+                var startTime = +new Date();
 
-        updateMethods.update.call(this);
+                scheduler.performSeriesTasks(ecModel);
 
-        // Ensure zr refresh sychronously, and then pixel in canvas can be
-        // fetched after `setOption`.
-        this._zr.flush();
+                // Currently dataProcessorFuncs do not check threshold.
+                scheduler.performDataProcessorTasks(ecModel);
 
-        this[OPTION_UPDATED] = false;
-        this[IN_MAIN_PROCESS] = false;
+                updateStreamModes(this, ecModel);
 
-        flushPendingActions.call(this, silent);
-        triggerUpdatedEvent.call(this, silent);
+                // Do not update coordinate system here. Because that coord system update in
+                // each frame is not a good user experience. So we follow the rule that
+                // the extent of the coordinate system is determin in the first frame (the
+                // frame is executed immedietely after task reset.
+                // this._coordSysMgr.update(ecModel, api);
+
+                // console.log('--- ec frame visual ---', remainTime);
+                scheduler.performVisualTasks(ecModel);
+
+                renderSeries(this, this._model, api, 'remain');
+
+                remainTime -= (+new Date() - startTime);
+            }
+            while (remainTime > 0 && scheduler.unfinished);
+
+            // Call flush explicitly for trigger finished event.
+            if (!scheduler.unfinished) {
+                this._zr.flush();
+            }
+            // Else, zr flushing be ensue within the same frame,
+            // because zr flushing is after onframe event.
+        }
     }
-};
 
-/**
- * @DEPRECATED
- */
-echartsProto.setTheme = function () {
-    console.error('ECharts#setTheme() is DEPRECATED in ECharts 3.0');
-};
+    getDom(): HTMLElement {
+        return this._dom;
+    }
 
-/**
- * @return {module:echarts/model/Global}
- */
-echartsProto.getModel = function () {
-    return this._model;
-};
+    getZr(): zrender.ZRenderType {
+        return this._zr;
+    }
 
-/**
- * @return {Object}
- */
-echartsProto.getOption = function () {
-    return this._model && this._model.getOption();
-};
+    /**
+     * Usage:
+     * chart.setOption(option, notMerge, lazyUpdate);
+     * chart.setOption(option, {
+     *     notMerge: ...,
+     *     lazyUpdate: ...,
+     *     silent: ...
+     * });
+     *
+     * @param opts opts or notMerge.
+     * @param opts.notMerge Default `false`
+     * @param opts.lazyUpdate Default `false`. Useful when setOption frequently.
+     * @param opts.silent Default `false`.
+     */
+    setOption(option: ECOption, notMerge?: boolean, lazyUpdate?: boolean): void;
+    setOption(option: ECOption, opts?: SetOptionOpts): void;
+    setOption(option: ECOption, notMerge?: boolean | SetOptionOpts, lazyUpdate?: boolean): void {
+        if (__DEV__) {
+            assert(!this[IN_MAIN_PROCESS], '`setOption` should not be called during main process.');
+        }
+        if (this._disposed) {
+            disposedWarning(this.id);
+            return;
+        }
 
-/**
- * @return {number}
- */
-echartsProto.getWidth = function () {
-    return this._zr.getWidth();
-};
+        var silent;
+        if (isObject<SetOptionOpts>(notMerge)) {
+            lazyUpdate = notMerge.lazyUpdate;
+            silent = notMerge.silent;
+            notMerge = notMerge.notMerge;
+        }
 
-/**
- * @return {number}
- */
-echartsProto.getHeight = function () {
-    return this._zr.getHeight();
-};
+        this[IN_MAIN_PROCESS] = true;
 
-/**
- * @return {number}
- */
-echartsProto.getDevicePixelRatio = function () {
-    return this._zr.painter.dpr || window.devicePixelRatio || 1;
-};
+        if (!this._model || notMerge) {
+            var optionManager = new OptionManager(this._api);
+            var theme = this._theme;
+            var ecModel = this._model = new GlobalModel();
+            ecModel.scheduler = this._scheduler;
+            ecModel.init(null, null, null, theme, optionManager);
+        }
 
-/**
- * Get canvas which has all thing rendered
- * @param {Object} opts
- * @param {string} [opts.backgroundColor]
- * @return {string}
- */
-echartsProto.getRenderedCanvas = function (opts) {
-    if (!env.canvasSupported) {
-        return;
-    }
-    opts = opts || {};
-    opts.pixelRatio = opts.pixelRatio || 1;
-    opts.backgroundColor = opts.backgroundColor
-        || this._model.get('backgroundColor');
-    var zr = this._zr;
-    // var list = zr.storage.getDisplayList();
-    // Stop animations
-    // Never works before in init animation, so remove it.
-    // zrUtil.each(list, function (el) {
-    //     el.stopAnimation(true);
-    // });
-    return zr.painter.getRenderedCanvas(opts);
-};
+        this._model.setOption(option, optionPreprocessorFuncs);
 
-/**
- * Get svg data url
- * @return {string}
- */
-echartsProto.getSvgDataUrl = function () {
-    if (!env.svgSupported) {
-        return;
-    }
+        if (lazyUpdate) {
+            this[OPTION_UPDATED] = {silent: silent};
+            this[IN_MAIN_PROCESS] = false;
+        }
+        else {
+            prepare(this);
 
-    var zr = this._zr;
-    var list = zr.storage.getDisplayList();
-    // Stop animations
-    zrUtil.each(list, function (el) {
-        el.stopAnimation(true);
-    });
+            updateMethods.update.call(this);
 
-    return zr.painter.pathToDataUrl();
-};
+            // Ensure zr refresh sychronously, and then pixel in canvas can be
+            // fetched after `setOption`.
+            this._zr.flush();
 
-/**
- * @return {string}
- * @param {Object} opts
- * @param {string} [opts.type='png']
- * @param {string} [opts.pixelRatio=1]
- * @param {string} [opts.backgroundColor]
- * @param {string} [opts.excludeComponents]
- */
-echartsProto.getDataURL = function (opts) {
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
+            this[OPTION_UPDATED] = false;
+            this[IN_MAIN_PROCESS] = false;
+
+            flushPendingActions.call(this, silent);
+            triggerUpdatedEvent.call(this, silent);
+        }
     }
 
-    opts = opts || {};
-    var excludeComponents = opts.excludeComponents;
-    var ecModel = this._model;
-    var excludesComponentViews = [];
-    var self = this;
-
-    each(excludeComponents, function (componentType) {
-        ecModel.eachComponent({
-            mainType: componentType
-        }, function (component) {
-            var view = self._componentsMap[component.__viewId];
-            if (!view.group.ignore) {
-                excludesComponentViews.push(view);
-                view.group.ignore = true;
-            }
-        });
-    });
+    /**
+     * @DEPRECATED
+     */
+    setTheme(): void {
+        console.error('ECharts#setTheme() is DEPRECATED in ECharts 3.0');
+    }
 
-    var url = this._zr.painter.getType() === 'svg'
-        ? this.getSvgDataUrl()
-        : this.getRenderedCanvas(opts).toDataURL(
-            'image/' + (opts && opts.type || 'png')
-        );
+    getModel(): GlobalModel {
+        return this._model;
+    }
 
-    each(excludesComponentViews, function (view) {
-        view.group.ignore = false;
-    });
+    getOption(): ECUnitOption {
+        return this._model && this._model.getOption();
+    }
 
-    return url;
-};
+    getWidth(): number {
+        return this._zr.getWidth();
+    }
 
+    getHeight(): number {
+        return this._zr.getHeight();
+    }
 
-/**
- * @return {string}
- * @param {Object} opts
- * @param {string} [opts.type='png']
- * @param {string} [opts.pixelRatio=1]
- * @param {string} [opts.backgroundColor]
- */
-echartsProto.getConnectedDataURL = function (opts) {
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
+    getDevicePixelRatio(): number {
+        return (this._zr.painter as CanvasPainter).dpr || window.devicePixelRatio || 1;
     }
 
-    if (!env.canvasSupported) {
-        return;
+    /**
+     * Get canvas which has all thing rendered
+     */
+    getRenderedCanvas(opts?: {
+        backgroundColor?: ZRColor
+        pixelRatio?: number
+    }): HTMLCanvasElement {
+        if (!env.canvasSupported) {
+            return;
+        }
+        opts = zrUtil.extend({}, opts || {});
+        opts.pixelRatio = opts.pixelRatio || 1;
+        opts.backgroundColor = opts.backgroundColor
+            || this._model.get('backgroundColor');
+        var zr = this._zr;
+        // var list = zr.storage.getDisplayList();
+        // Stop animations
+        // Never works before in init animation, so remove it.
+        // zrUtil.each(list, function (el) {
+        //     el.stopAnimation(true);
+        // });
+        return (zr.painter as CanvasPainter).getRenderedCanvas(opts);
     }
-    var groupId = this.group;
-    var mathMin = Math.min;
-    var mathMax = Math.max;
-    var MAX_NUMBER = Infinity;
-    if (connectedGroups[groupId]) {
-        var left = MAX_NUMBER;
-        var top = MAX_NUMBER;
-        var right = -MAX_NUMBER;
-        var bottom = -MAX_NUMBER;
-        var canvasList = [];
-        var dpr = (opts && opts.pixelRatio) || 1;
-
-        zrUtil.each(instances, function (chart, id) {
-            if (chart.group === groupId) {
-                var canvas = chart.getRenderedCanvas(
-                    zrUtil.clone(opts)
-                );
-                var boundingRect = chart.getDom().getBoundingClientRect();
-                left = mathMin(boundingRect.left, left);
-                top = mathMin(boundingRect.top, top);
-                right = mathMax(boundingRect.right, right);
-                bottom = mathMax(boundingRect.bottom, bottom);
-                canvasList.push({
-                    dom: canvas,
-                    left: boundingRect.left,
-                    top: boundingRect.top
-                });
-            }
+
+    /**
+     * Get svg data url
+     */
+    getSvgDataUrl(): string {
+        if (!env.svgSupported) {
+            return;
+        }
+
+        var zr = this._zr;
+        var list = zr.storage.getDisplayList();
+        // Stop animations
+        zrUtil.each(list, function (el: Element) {
+            el.stopAnimation(true);
         });
 
-        left *= dpr;
-        top *= dpr;
-        right *= dpr;
-        bottom *= dpr;
-        var width = right - left;
-        var height = bottom - top;
-        var targetCanvas = zrUtil.createCanvas();
-        targetCanvas.width = width;
-        targetCanvas.height = height;
-        var zr = zrender.init(targetCanvas);
-
-        // Background between the charts
-        if (opts.connectedBackgroundColor) {
-            zr.add(new graphic.Rect({
-                shape: {
-                    x: 0,
-                    y: 0,
-                    width: width,
-                    height: height
-                },
-                style: {
-                    fill: opts.connectedBackgroundColor
-                }
-            }));
+        return (zr.painter as SVGPainter).pathToDataUrl();
+    }
+
+    getDataURL(opts?: {
+        // file type 'png' by defualt
+        type?: string,
+        pixelRatio?: number,
+        backgroundColor?: ZRColor,
+        // component type array
+        excludeComponents?: ComponentMainType[]
+    }): string {
+        if (this._disposed) {
+            disposedWarning(this.id);
+            return;
         }
 
-        each(canvasList, function (item) {
-            var img = new graphic.Image({
-                style: {
-                    x: item.left * dpr - left,
-                    y: item.top * dpr - top,
-                    image: item.dom
+        opts = opts || {};
+        var excludeComponents = opts.excludeComponents;
+        var ecModel = this._model;
+        var excludesComponentViews: ComponentView[] = [];
+        var self = this;
+
+        each(excludeComponents, function (componentType) {
+            ecModel.eachComponent({
+                mainType: componentType
+            }, function (component) {
+                var view = self._componentsMap[component.__viewId];
+                if (!view.group.ignore) {
+                    excludesComponentViews.push(view);
+                    view.group.ignore = true;
                 }
             });
-            zr.add(img);
         });
-        zr.refreshImmediately();
-
-        return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
-    }
-    else {
-        return this.getDataURL(opts);
-    }
-};
 
-/**
- * Convert from logical coordinate system to pixel coordinate system.
- * See CoordinateSystem#convertToPixel.
- * @param {string|Object} finder
- *        If string, e.g., 'geo', means {geoIndex: 0}.
- *        If Object, could contain some of these properties below:
- *        {
- *            seriesIndex / seriesId / seriesName,
- *            geoIndex / geoId, geoName,
- *            bmapIndex / bmapId / bmapName,
- *            xAxisIndex / xAxisId / xAxisName,
- *            yAxisIndex / yAxisId / yAxisName,
- *            gridIndex / gridId / gridName,
- *            ... (can be extended)
- *        }
- * @param {Array|number} value
- * @return {Array|number} result
- */
-echartsProto.convertToPixel = zrUtil.curry(doConvertPixel, 'convertToPixel');
+        var url = this._zr.painter.getType() === 'svg'
+            ? this.getSvgDataUrl()
+            : this.getRenderedCanvas(opts).toDataURL(
+                'image/' + (opts && opts.type || 'png')
+            );
 
-/**
- * Convert from pixel coordinate system to logical coordinate system.
- * See CoordinateSystem#convertFromPixel.
- * @param {string|Object} finder
- *        If string, e.g., 'geo', means {geoIndex: 0}.
- *        If Object, could contain some of these properties below:
- *        {
- *            seriesIndex / seriesId / seriesName,
- *            geoIndex / geoId / geoName,
- *            bmapIndex / bmapId / bmapName,
- *            xAxisIndex / xAxisId / xAxisName,
- *            yAxisIndex / yAxisId / yAxisName
- *            gridIndex / gridId / gridName,
- *            ... (can be extended)
- *        }
- * @param {Array|number} value
- * @return {Array|number} result
- */
-echartsProto.convertFromPixel = zrUtil.curry(doConvertPixel, 'convertFromPixel');
+        each(excludesComponentViews, function (view) {
+            view.group.ignore = false;
+        });
 
-function doConvertPixel(methodName, finder, value) {
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
+        return url;
     }
 
-    var ecModel = this._model;
-    var coordSysList = this._coordSysMgr.getCoordinateSystems();
-    var result;
+    /**
+     * @return {string}
+     * @param {Object} opts
+     * @param {string} [opts.type='png']
+     * @param {string} [opts.pixelRatio=1]
+     * @param {string} [opts.backgroundColor]
+     */
+    getConnectedDataURL(opts?: {
+        // file type 'png' by defualt
+        type?: string,
+        pixelRatio?: number,
+        backgroundColor?: ZRColor,
+        connectedBackgroundColor?: string
+    }): string {
+        if (this._disposed) {
+            disposedWarning(this.id);
+            return;
+        }
+
+        if (!env.canvasSupported) {
+            return;
+        }
+        var groupId = this.group;
+        var mathMin = Math.min;
+        var mathMax = Math.max;
+        var MAX_NUMBER = Infinity;
+        if (connectedGroups[groupId]) {
+            var left = MAX_NUMBER;
+            var top = MAX_NUMBER;
+            var right = -MAX_NUMBER;
+            var bottom = -MAX_NUMBER;
+            var canvasList: {dom: HTMLCanvasElement, left: number, top: number}[] = [];
+            var dpr = (opts && opts.pixelRatio) || 1;
+
+            zrUtil.each(instances, function (chart, id) {
+                if (chart.group === groupId) {
+                    var canvas = chart.getRenderedCanvas(
+                        zrUtil.clone(opts)
+                    );
+                    var boundingRect = chart.getDom().getBoundingClientRect();
+                    left = mathMin(boundingRect.left, left);
+                    top = mathMin(boundingRect.top, top);
+                    right = mathMax(boundingRect.right, right);
+                    bottom = mathMax(boundingRect.bottom, bottom);
+                    canvasList.push({
+                        dom: canvas,
+                        left: boundingRect.left,
+                        top: boundingRect.top
+                    });
+                }
+            });
+
+            left *= dpr;
+            top *= dpr;
+            right *= dpr;
+            bottom *= dpr;
+            var width = right - left;
+            var height = bottom - top;
+            var targetCanvas = zrUtil.createCanvas();
+            targetCanvas.width = width;
+            targetCanvas.height = height;
+            var zr = zrender.init(targetCanvas);
+
+            // Background between the charts
+            if (opts.connectedBackgroundColor) {
+                zr.add(new graphic.Rect({
+                    shape: {
+                        x: 0,
+                        y: 0,
+                        width: width,
+                        height: height
+                    },
+                    style: {
+                        fill: opts.connectedBackgroundColor
+                    }
+                }));
+            }
 
-    finder = modelUtil.parseFinder(ecModel, finder);
+            each(canvasList, function (item) {
+                var img = new graphic.Image({
+                    style: {
+                        x: item.left * dpr - left,
+                        y: item.top * dpr - top,
+                        image: item.dom
+                    }
+                });
+                zr.add(img);
+            });
+            zr.refreshImmediately();
 
-    for (var i = 0; i < coordSysList.length; i++) {
-        var coordSys = coordSysList[i];
-        if (coordSys[methodName]
-            && (result = coordSys[methodName](ecModel, finder, value)) != null
-        ) {
-            return result;
+            return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+        }
+        else {
+            return this.getDataURL(opts);
         }
     }
 
-    if (__DEV__) {
-        console.warn(
-            'No coordinate system that supports ' + methodName + ' found by the given finder.'
-        );
+    /**
+     * Convert from logical coordinate system to pixel coordinate system.
+     * See CoordinateSystem#convertToPixel.
+     */
+    convertToPixel(finder: ModelFinder, value: any): number[] {
+        return doConvertPixel(this, 'convertToPixel', finder, value);
     }
-}
 
-/**
- * Is the specified coordinate systems or components contain the given pixel point.
- * @param {string|Object} finder
- *        If string, e.g., 'geo', means {geoIndex: 0}.
- *        If Object, could contain some of these properties below:
- *        {
- *            seriesIndex / seriesId / seriesName,
- *            geoIndex / geoId / geoName,
- *            bmapIndex / bmapId / bmapName,
- *            xAxisIndex / xAxisId / xAxisName,
- *            yAxisIndex / yAxisId / yAxisName,
- *            gridIndex / gridId / gridName,
- *            ... (can be extended)
- *        }
- * @param {Array|number} value
- * @return {boolean} result
- */
-echartsProto.containPixel = function (finder, value) {
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
+    /**
+     * Convert from pixel coordinate system to logical coordinate system.
+     * See CoordinateSystem#convertFromPixel.
+     */
+    convertFromPixel(finder: ModelFinder, value: number[]): any {
+        return doConvertPixel(this, 'convertFromPixel', finder, value);
     }
 
-    var ecModel = this._model;
-    var result;
+    /**
+     * Is the specified coordinate systems or components contain the given pixel point.
+     * @param {Array|number} value
+     * @return {boolean} result
+     */
+    containPixel(finder: ModelFinder, value: number[]): boolean {
+        if (this._disposed) {
+            disposedWarning(this.id);
+            return;
+        }
 
-    finder = modelUtil.parseFinder(ecModel, finder);
+        var ecModel = this._model;
+        var result: boolean;
 
-    zrUtil.each(finder, function (models, key) {
-        key.indexOf('Models') >= 0 && zrUtil.each(models, function (model) {
-            var coordSys = model.coordinateSystem;
-            if (coordSys && coordSys.containPoint) {
-                result |= !!coordSys.containPoint(value);
-            }
-            else if (key === 'seriesModels') {
-                var view = this._chartsMap[model.__viewId];
-                if (view && view.containPoint) {
-                    result |= view.containPoint(value, model);
+        var findResult = modelUtil.parseFinder(ecModel, finder);
+
+        zrUtil.each(findResult, function (models, key) {
+            key.indexOf('Models') >= 0 && zrUtil.each(models as ComponentModel, function (model) {
+                var coordSys = model.coordinateSystem;
+                if (coordSys && coordSys.containPoint) {
+                    result = result || !!coordSys.containPoint(value);
+                }
+                else if (key === 'seriesModels') {
+                    var view = this._chartsMap[model.__viewId];
+                    if (view && view.containPoint) {
+                        result = result || view.containPoint(value, model as SeriesModel);
+                    }
+                    else {
+                        if (__DEV__) {
+                            console.warn(key + ': ' + (view
+                                ? 'The found component do not support containPoint.'
+                                : 'No view mapping to the found component.'
+                            ));
+                        }
+                    }
                 }
                 else {
                     if (__DEV__) {
-                        console.warn(key + ': ' + (view
-                            ? 'The found component do not support containPoint.'
-                            : 'No view mapping to the found component.'
-                        ));
+                        console.warn(key + ': containPoint is not supported');
                     }
                 }
-            }
-            else {
-                if (__DEV__) {
-                    console.warn(key + ': containPoint is not supported');
-                }
-            }
+            }, this);
         }, this);
-    }, this);
 
-    return !!result;
-};
+        return !!result;
+    }
 
-/**
- * Get visual from series or data.
- * @param {string|Object} finder
- *        If string, e.g., 'series', means {seriesIndex: 0}.
- *        If Object, could contain some of these properties below:
- *        {
- *            seriesIndex / seriesId / seriesName,
- *            dataIndex / dataIndexInside
- *        }
- *        If dataIndex is not specified, series visual will be fetched,
- *        but not data item visual.
- *        If all of seriesIndex, seriesId, seriesName are not specified,
- *        visual will be fetched from first series.
- * @param {string} visualType 'color', 'symbol', 'symbolSize'
- */
-echartsProto.getVisual = function (finder, visualType) {
-    var ecModel = this._model;
+    /**
+     * Get visual from series or data.
+     * @param finder
+     *        If string, e.g., 'series', means {seriesIndex: 0}.
+     *        If Object, could contain some of these properties below:
+     *        {
+     *            seriesIndex / seriesId / seriesName,
+     *            dataIndex / dataIndexInside
+     *        }
+     *        If dataIndex is not specified, series visual will be fetched,
+     *        but not data item visual.
+     *        If all of seriesIndex, seriesId, seriesName are not specified,
+     *        visual will be fetched from first series.
+     * @param visualType 'color', 'symbol', 'symbolSize'
+     */
+    getVisual(finder: ModelFinder, visualType: string) {
+        var ecModel = this._model;
 
-    finder = modelUtil.parseFinder(ecModel, finder, {defaultMainType: 'series'});
+        finder = modelUtil.parseFinder(ecModel, finder, {defaultMainType: 'series'});
 
-    var seriesModel = finder.seriesModel;
+        var seriesModel = finder.seriesModel;
 
-    if (__DEV__) {
-        if (!seriesModel) {
-            console.warn('There is no specified seires model');
+        if (__DEV__) {
+            if (!seriesModel) {
+                console.warn('There is no specified seires model');
+            }
         }
-    }
 
-    var data = seriesModel.getData();
+        var data = seriesModel.getData();
 
-    var dataIndexInside = finder.hasOwnProperty('dataIndexInside')
-        ? finder.dataIndexInside
-        : finder.hasOwnProperty('dataIndex')
-        ? data.indexOfRawIndex(finder.dataIndex)
-        : null;
+        var dataIndexInside = finder.hasOwnProperty('dataIndexInside')
+            ? finder.dataIndexInside
+            : finder.hasOwnProperty('dataIndex')
+            ? data.indexOfRawIndex(finder.dataIndex)
+            : null;
 
-    return dataIndexInside != null
-        ? data.getItemVisual(dataIndexInside, visualType)
-        : data.getVisual(visualType);
-};
-
-/**
- * Get view of corresponding component model
- * @param  {module:echarts/model/Component} componentModel
- * @return {module:echarts/view/Component}
- */
-echartsProto.getViewOfComponentModel = function (componentModel) {
-    return this._componentsMap[componentModel.__viewId];
-};
+        return dataIndexInside != null
+            ? data.getItemVisual(dataIndexInside, visualType)
+            : data.getVisual(visualType);
+    }
 
-/**
- * Get view of corresponding series model
- * @param  {module:echarts/model/Series} seriesModel
- * @return {module:echarts/view/Chart}
- */
-echartsProto.getViewOfSeriesModel = function (seriesModel) {
-    return this._chartsMap[seriesModel.__viewId];
-};
-
-var updateMethods = {
-
-    prepareAndUpdate: function (payload) {
-        prepare(this);
-        updateMethods.update.call(this, payload);
-    },
+    /**
+     * Get view of corresponding component model
+     */
+    getViewOfComponentModel(componentModel: ComponentModel): ComponentView {
+        return this._componentsMap[componentModel.__viewId];
+    }
 
     /**
-     * @param {Object} payload
-     * @private
+     * Get view of corresponding series model
      */
-    update: function (payload) {
-        // console.profile && console.profile('update');
-
-        var ecModel = this._model;
-        var api = this._api;
-        var zr = this._zr;
-        var coordSysMgr = this._coordSysMgr;
-        var scheduler = this._scheduler;
-
-        // update before setOption
-        if (!ecModel) {
-            return;
-        }
-
-        scheduler.restoreData(ecModel, payload);
-
-        scheduler.performSeriesTasks(ecModel);
-
-        // TODO
-        // Save total ecModel here for undo/redo (after restoring data and before processing data).
-        // Undo (restoration of total ecModel) can be carried out in 'action' or outside API call.
+    getViewOfSeriesModel(seriesModel: SeriesModel): ChartView {
+        return this._chartsMap[seriesModel.__viewId];
+    }
+
+    private _initEvents(): void {
+        each(MOUSE_EVENT_NAMES, function (eveName) {
+            var handler = function (this: ECharts, e: ElementEvent) {
+                var ecModel = this.getModel();
+                var targetEl = e.target;
+                var el = targetEl as ECElement;
+                var params: ECEvent;
+                var isGlobalOut = eveName === 'globalout';
+
+                // no e.target when 'globalout'.
+                if (isGlobalOut) {
+                    params = {} as ECEvent;
+                }
+                else if (el && el.dataIndex != null) {
+                    var dataModel = el.dataModel || ecModel.getSeriesByIndex(el.seriesIndex);
+                    params = (
+                        dataModel && dataModel.getDataParams(el.dataIndex, el.dataType, targetEl) || {}
+                    ) as ECEvent;
+                }
+                // If element has custom eventData of components
+                else if (el && el.eventData) {
+                    params = zrUtil.extend({}, el.eventData) as ECEvent;
+                }
 
-        // Create new coordinate system each update
-        // In LineView may save the old coordinate system and use it to get the orignal point
-        coordSysMgr.create(ecModel, api);
+                // Contract: if params prepared in mouse event,
+                // these properties must be specified:
+                // {
+                //    componentType: string (component main type)
+                //    componentIndex: number
+                // }
+                // Otherwise event query can not work.
+
+                if (params) {
+                    var componentType = params.componentType;
+                    var componentIndex = params.componentIndex;
+                    // Special handling for historic reason: when trigger by
+                    // markLine/markPoint/markArea, the componentType is
+                    // 'markLine'/'markPoint'/'markArea', but we should better
+                    // enable them to be queried by seriesIndex, since their
+                    // option is set in each series.
+                    if (componentType === 'markLine'
+                        || componentType === 'markPoint'
+                        || componentType === 'markArea'
+                    ) {
+                        componentType = 'series';
+                        componentIndex = params.seriesIndex;
+                    }
+                    var model = componentType && componentIndex != null
+                        && ecModel.getComponent(componentType, componentIndex);
+                    var view = model && this[
+                        model.mainType === 'series' ? '_chartsMap' : '_componentsMap'
+                    ][model.__viewId];
 
-        scheduler.performDataProcessorTasks(ecModel, payload);
+                    if (__DEV__) {
+                        // `event.componentType` and `event[componentTpype + 'Index']` must not
+                        // be missed, otherwise there is no way to distinguish source component.
+                        // See `dataFormat.getDataParams`.
+                        if (!isGlobalOut && !(model && view)) {
+                            console.warn('model or view can not be found by params');
+                        }
+                    }
 
-        // Current stream render is not supported in data process. So we can update
-        // stream modes after data processing, where the filtered data is used to
-        // deteming whether use progressive rendering.
-        updateStreamModes(this, ecModel);
+                    params.event = e;
+                    params.type = eveName;
 
-        // We update stream modes before coordinate system updated, then the modes info
-        // can be fetched when coord sys updating (consider the barGrid extent fix). But
-        // the drawback is the full coord info can not be fetched. Fortunately this full
-        // coord is not requied in stream mode updater currently.
-        coordSysMgr.update(ecModel, api);
+                    this._ecEventProcessor.eventInfo = {
+                        targetEl: el,
+                        packedEvent: params,
+                        model: model,
+                        view: view
+                    };
 
-        clearColorPalette(ecModel);
-        scheduler.performVisualTasks(ecModel, payload);
+                    this.trigger(eveName, params);
+                }
+            };
+            // Consider that some component (like tooltip, brush, ...)
+            // register zr event handler, but user event handler might
+            // do anything, such as call `setOption` or `dispatchAction`,
+            // which probably update any of the content and probably
+            // cause problem if it is called previous other inner handlers.
+            (handler as any).zrEventfulCallAtLast = true;
+            this._zr.on(eveName, handler, this);
+        }, this);
 
-        render(this, ecModel, api, payload);
+        each(eventActionMap, function (actionType, eventType) {
+            this._messageCenter.on(eventType, function (event) {
+                this.trigger(eventType, event);
+            }, this);
+        }, this);
+    }
 
-        // Set background
-        var backgroundColor = ecModel.get('backgroundColor') || 'transparent';
+    isDisposed(): boolean {
+        return this._disposed;
+    }
 
-        // In IE8
-        if (!env.canvasSupported) {
-            var colorArr = colorTool.parse(backgroundColor);
-            backgroundColor = colorTool.stringify(colorArr, 'rgb');
-            if (colorArr[3] === 0) {
-                backgroundColor = 'transparent';
-            }
-        }
-        else {
-            zr.setBackgroundColor(backgroundColor);
+    clear(): void {
+        if (this._disposed) {
+            disposedWarning(this.id);
+            return;
         }
+        this.setOption({ series: [] }, true);
+    }
 
-        performPostUpdateFuncs(ecModel, api);
-
-        // console.profile && console.profileEnd('update');
-    },
-
-    /**
-     * @param {Object} payload
-     * @private
-     */
-    updateTransform: function (payload) {
-        var ecModel = this._model;
-        var ecIns = this;
-        var api = this._api;
-
-        // update before setOption
-        if (!ecModel) {
+    dispose(): void {
+        if (this._disposed) {
+            disposedWarning(this.id);
             return;
         }
+        this._disposed = true;
 
-        // ChartView.markUpdateMethod(payload, 'updateTransform');
+        modelUtil.setAttribute(this.getDom(), DOM_ATTRIBUTE_KEY, '');
 
-        var componentDirtyList = [];
-        ecModel.eachComponent(function (componentType, componentModel) {
-            var componentView = ecIns.getViewOfComponentModel(componentModel);
-            if (componentView && componentView.__alive) {
-                if (componentView.updateTransform) {
-                    var result = componentView.updateTransform(componentModel, ecModel, api, payload);
-                    result && result.update && componentDirtyList.push(componentView);
-                }
-                else {
-                    componentDirtyList.push(componentView);
-                }
-            }
-        });
+        var api = this._api;
+        var ecModel = this._model;
 
-        var seriesDirtyMap = zrUtil.createHashMap();
-        ecModel.eachSeries(function (seriesModel) {
-            var chartView = ecIns._chartsMap[seriesModel.__viewId];
-            if (chartView.updateTransform) {
-                var result = chartView.updateTransform(seriesModel, ecModel, api, payload);
-                result && result.update && seriesDirtyMap.set(seriesModel.uid, 1);
-            }
-            else {
-                seriesDirtyMap.set(seriesModel.uid, 1);
-            }
+        each(this._componentsViews, function (component) {
+            component.dispose(ecModel, api);
+        });
+        each(this._chartsViews, function (chart) {
+            chart.dispose(ecModel, api);
         });
 
-        clearColorPalette(ecModel);
-        // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.
-        // this._scheduler.performVisualTasks(ecModel, payload, 'layout', true);
-        this._scheduler.performVisualTasks(
-            ecModel, payload, {setDirty: true, dirtyMap: seriesDirtyMap}
-        );
-
-        // Currently, not call render of components. Geo render cost a lot.
-        // renderComponents(ecIns, ecModel, api, payload, componentDirtyList);
-        renderSeries(ecIns, ecModel, api, payload, seriesDirtyMap);
+        // Dispose after all views disposed
+        this._zr.dispose();
 
-        performPostUpdateFuncs(ecModel, this._api);
-    },
+        delete instances[this.id];
+    }
 
     /**
-     * @param {Object} payload
-     * @private
+     * Resize the chart
      */
-    updateView: function (payload) {
-        var ecModel = this._model;
-
-        // update before setOption
-        if (!ecModel) {
+    resize(opts?: {
+        width?: number | 'auto', // Can be 'auto' (the same as null/undefined)
+        height?: number | 'auto', // Can be 'auto' (the same as null/undefined)
+        silent?: boolean // by default false.
+    }): void {
+        if (__DEV__) {
+            assert(!this[IN_MAIN_PROCESS], '`resize` should not be called during main process.');
+        }
+        if (this._disposed) {
+            disposedWarning(this.id);
             return;
         }
 
-        ChartView.markUpdateMethod(payload, 'updateView');
-
-        clearColorPalette(ecModel);
+        this._zr.resize(opts);
 
-        // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.
-        this._scheduler.performVisualTasks(ecModel, payload, {setDirty: true});
-
-        render(this, this._model, this._api, payload);
+        var ecModel = this._model;
 
-        performPostUpdateFuncs(ecModel, this._api);
-    },
+        // Resize loading effect
+        this._loadingFX && this._loadingFX.resize();
 
-    /**
-     * @param {Object} payload
-     * @private
-     */
-    updateVisual: function (payload) {
-        updateMethods.update.call(this, payload);
+        if (!ecModel) {
+            return;
+        }
 
-        // var ecModel = this._model;
+        var optionChanged = ecModel.resetOption('media');
 
-        // // update before setOption
-        // if (!ecModel) {
-        //     return;
-        // }
+        var silent = opts && opts.silent;
 
-        // ChartView.markUpdateMethod(payload, 'updateVisual');
+        this[IN_MAIN_PROCESS] = true;
 
-        // clearColorPalette(ecModel);
+        optionChanged && prepare(this);
+        updateMethods.update.call(this);
 
-        // // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.
-        // this._scheduler.performVisualTasks(ecModel, payload, {visualType: 'visual', setDirty: true});
+        this[IN_MAIN_PROCESS] = false;
 
-        // render(this, this._model, this._api, payload);
+        flushPendingActions.call(this, silent);
 
-        // performPostUpdateFuncs(ecModel, this._api);
-    },
+        triggerUpdatedEvent.call(this, silent);
+    }
 
     /**
-     * @param {Object} payload
-     * @private
+     * Show loading effect
+     * @param name 'default' by default
+     * @param cfg cfg of registered loading effect
      */
-    updateLayout: function (payload) {
-        updateMethods.update.call(this, payload);
-
-        // var ecModel = this._model;
-
-        // // update before setOption
-        // if (!ecModel) {
-        //     return;
-        // }
-
-        // ChartView.markUpdateMethod(payload, 'updateLayout');
+    showLoading(cfg?: object): void;
+    showLoading(name?: string, cfg?: object): void;
+    showLoading(name?: string | object, cfg?: object): void {
+        if (this._disposed) {
+            disposedWarning(this.id);
+            return;
+        }
 
-        // // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.
-        // // this._scheduler.performVisualTasks(ecModel, payload, 'layout', true);
-        // this._scheduler.performVisualTasks(ecModel, payload, {setDirty: true});
+        if (isObject(name)) {
+            cfg = name as object;
+            name = '';
+        }
+        name = name || 'default';
 
-        // render(this, this._model, this._api, payload);
+        this.hideLoading();
+        if (!loadingEffects[name]) {
+            if (__DEV__) {
+                console.warn('Loading effects ' + name + ' not exists.');
+            }
+            return;
+        }
+        var el = loadingEffects[name](this._api, cfg);
+        var zr = this._zr;
+        this._loadingFX = el;
 
-        // performPostUpdateFuncs(ecModel, this._api);
+        zr.add(el);
     }
-};
 
-function prepare(ecIns) {
-    var ecModel = ecIns._model;
-    var scheduler = ecIns._scheduler;
-
-    scheduler.restorePipelines(ecModel);
-
-    scheduler.prepareStageTasks();
-
-    prepareView(ecIns, 'component', ecModel, scheduler);
-
-    prepareView(ecIns, 'chart', ecModel, scheduler);
-
-    scheduler.plan();
-}
+    /**
+     * Hide loading effect
+     */
+    hideLoading(): void {
+        if (this._disposed) {
+            disposedWarning(this.id);
+            return;
+        }
 
-/**
- * @private
- */
-function updateDirectly(ecIns, method, payload, mainType, subType) {
-    var ecModel = ecIns._model;
-
-    // broadcast
-    if (!mainType) {
-        // FIXME
-        // Chart will not be update directly here, except set dirty.
-        // But there is no such scenario now.
-        each(ecIns._componentsViews.concat(ecIns._chartsViews), callView);
-        return;
+        this._loadingFX && this._zr.remove(this._loadingFX);
+        this._loadingFX = null;
     }
 
-    var query = {};
-    query[mainType + 'Id'] = payload[mainType + 'Id'];
-    query[mainType + 'Index'] = payload[mainType + 'Index'];
-    query[mainType + 'Name'] = payload[mainType + 'Name'];
+    makeActionFromEvent(eventObj: ECEvent): Payload {
+        var payload = zrUtil.extend({}, eventObj) as Payload;
+        payload.type = eventActionMap[eventObj.type];
+        return payload;
+    }
 
-    var condition = {mainType: mainType, query: query};
-    subType && (condition.subType = subType); // subType may be '' by parseClassType;
+    /**
+     * @param opt If pass boolean, means opt.silent
+     * @param opt.silent Default `false`. Whether trigger events.
+     * @param opt.flush Default `undefined`.
+     *        true: Flush immediately, and then pixel in canvas can be fetched
+     *            immediately. Caution: it might affect performance.
+     *        false: Not flush.
+     *        undefined: Auto decide whether perform flush.
+     */
+    dispatchAction(
+        payload: Payload,
+        opt?: boolean | {
+            silent?: boolean,
+            flush?: boolean | undefined
+        }
+    ): void {
+        if (this._disposed) {
+            disposedWarning(this.id);
+            return;
+        }
 
-    var excludeSeriesId = payload.excludeSeriesId;
-    if (excludeSeriesId != null) {
-        excludeSeriesId = zrUtil.createHashMap(modelUtil.normalizeToArray(excludeSeriesId));
-    }
+        if (!isObject(opt)) {
+            opt = {silent: !!opt};
+        }
 
-    // If dispatchAction before setOption, do nothing.
-    ecModel && ecModel.eachComponent(condition, function (model) {
-        if (!excludeSeriesId || excludeSeriesId.get(model.id) == null) {
-            callView(ecIns[
-                mainType === 'series' ? '_chartsMap' : '_componentsMap'
-            ][model.__viewId]);
+        if (!actions[payload.type]) {
+            return;
         }
-    }, ecIns);
 
-    function callView(view) {
-        view && view.__alive && view[method] && view[method](
-            view.__model, ecModel, ecIns._api, payload
-        );
-    }
-}
+        // Avoid dispatch action before setOption. Especially in `connect`.
+        if (!this._model) {
+            return;
+        }
 
-/**
- * Resize the chart
- * @param {Object} opts
- * @param {number} [opts.width] Can be 'auto' (the same as null/undefined)
- * @param {number} [opts.height] Can be 'auto' (the same as null/undefined)
- * @param {boolean} [opts.silent=false]
- */
-echartsProto.resize = function (opts) {
-    if (__DEV__) {
-        assert(!this[IN_MAIN_PROCESS], '`resize` should not be called during main process.');
-    }
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
-    }
+        // May dispatchAction in rendering procedure
+        if (this[IN_MAIN_PROCESS]) {
+            this._pendingActions.push(payload);
+            return;
+        }
 
-    this._zr.resize(opts);
+        var silent = (opt as any).silent;
+        doDispatchAction.call(this, payload, silent);
 
-    var ecModel = this._model;
+        var flush = (opt as any).flush;
+        if (flush) {
+            this._zr.flush();
+        }
+        else if (flush !== false && env.browser.weChat) {
+            // In WeChat embeded browser, `requestAnimationFrame` and `setInterval`
+            // hang when sliding page (on touch event), which cause that zr does not
+            // refresh util user interaction finished, which is not expected.
+            // But `dispatchAction` may be called too frequently when pan on touch
+            // screen, which impacts performance if do not throttle them.
+            this._throttledZrFlush();
+        }
 
-    // Resize loading effect
-    this._loadingFX && this._loadingFX.resize();
+        flushPendingActions.call(this, silent);
 
-    if (!ecModel) {
-        return;
+        triggerUpdatedEvent.call(this, silent);
     }
 
-    var optionChanged = ecModel.resetOption('media');
+    appendData(params: {
+        seriesIndex: number,
+        data: any
+    }): void {
+        if (this._disposed) {
+            disposedWarning(this.id);
+            return;
+        }
 
-    var silent = opts && opts.silent;
+        var seriesIndex = params.seriesIndex;
+        var ecModel = this.getModel();
+        var seriesModel = ecModel.getSeriesByIndex(seriesIndex) as SeriesModel;
 
-    this[IN_MAIN_PROCESS] = true;
+        if (__DEV__) {
+            assert(params.data && seriesModel);
+        }
 
-    optionChanged && prepare(this);
-    updateMethods.update.call(this);
+        seriesModel.appendData(params);
 
-    this[IN_MAIN_PROCESS] = false;
+        // Note: `appendData` does not support that update extent of coordinate
+        // system, util some scenario require that. In the expected usage of
+        // `appendData`, the initial extent of coordinate system should better
+        // be fixed by axis `min`/`max` setting or initial data, otherwise if
+        // the extent changed while `appendData`, the location of the painted
+        // graphic elements have to be changed, which make the usage of
+        // `appendData` meaningless.
 
-    flushPendingActions.call(this, silent);
+        this._scheduler.unfinished = +true;
+    }
 
-    triggerUpdatedEvent.call(this, silent);
-};
 
-function updateStreamModes(ecIns, ecModel) {
-    var chartsMap = ecIns._chartsMap;
-    var scheduler = ecIns._scheduler;
-    ecModel.eachSeries(function (seriesModel) {
-        scheduler.updateStreamModes(seriesModel, chartsMap[seriesModel.__viewId]);
-    });
-}
+    // A work around for no `internal` modifier in ts yet but
+    // need to strictly hide private methods to JS users.
+    static internalField = (function () {
 
-/**
- * Show loading effect
- * @param  {string} [name='default']
- * @param  {Object} [cfg]
- */
-echartsProto.showLoading = function (name, cfg) {
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
-    }
+        prepare = function (ecIns: ECharts): void {
+            var scheduler = ecIns._scheduler;
 
-    if (isObject(name)) {
-        cfg = name;
-        name = '';
-    }
-    name = name || 'default';
+            scheduler.restorePipelines(ecIns._model);
+            scheduler.prepareStageTasks();
 
-    this.hideLoading();
-    if (!loadingEffects[name]) {
-        if (__DEV__) {
-            console.warn('Loading effects ' + name + ' not exists.');
-        }
-        return;
-    }
-    var el = loadingEffects[name](this._api, cfg);
-    var zr = this._zr;
-    this._loadingFX = el;
+            prepareView(ecIns, true);
+            prepareView(ecIns, false);
 
-    zr.add(el);
-};
+            scheduler.plan();
+        };
 
-/**
- * Hide loading effect
- */
-echartsProto.hideLoading = function () {
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
-    }
+        /**
+         * Prepare view instances of charts and components
+         */
+        prepareView = function (ecIns: ECharts, isComponent: boolean): void {
+            var ecModel = ecIns._model;
+            var scheduler = ecIns._scheduler;
+            var viewList = isComponent ? ecIns._componentsViews : ecIns._chartsViews;
+            var viewMap = isComponent ? ecIns._componentsMap : ecIns._chartsMap;
+            var zr = ecIns._zr;
+            var api = ecIns._api;
+
+            for (var i = 0; i < viewList.length; i++) {
+                viewList[i].__alive = false;
+            }
 
-    this._loadingFX && this._zr.remove(this._loadingFX);
-    this._loadingFX = null;
-};
+            isComponent
+                ? ecModel.eachComponent(function (componentType, model) {
+                    componentType !== 'series' && doPrepare(model);
+                })
+                : ecModel.eachSeries(doPrepare);
+
+            function doPrepare(model: ComponentModel): void {
+                // Consider: id same and type changed.
+                var viewId = '_ec_' + model.id + '_' + model.type;
+                var view = viewMap[viewId];
+                if (!view) {
+                    var classType = parseClassType(model.type);
+                    var Clazz = isComponent
+                        ? (ComponentView as ComponentViewConstructor).getClass(classType.main, classType.sub)
+                        : (ChartView as ChartViewConstructor).getClass(classType.sub);
 
-/**
- * @param {Object} eventObj
- * @return {Object}
- */
-echartsProto.makeActionFromEvent = function (eventObj) {
-    var payload = zrUtil.extend({}, eventObj);
-    payload.type = eventActionMap[eventObj.type];
-    return payload;
-};
+                    if (__DEV__) {
+                        assert(Clazz, classType.sub + ' does not exist.');
+                    }
 
-/**
- * @pubilc
- * @param {Object} payload
- * @param {string} [payload.type] Action type
- * @param {Object|boolean} [opt] If pass boolean, means opt.silent
- * @param {boolean} [opt.silent=false] Whether trigger events.
- * @param {boolean} [opt.flush=undefined]
- *                  true: Flush immediately, and then pixel in canvas can be fetched
- *                      immediately. Caution: it might affect performance.
- *                  false: Not flush.
- *                  undefined: Auto decide whether perform flush.
- */
-echartsProto.dispatchAction = function (payload, opt) {
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
-    }
+                    view = new Clazz();
+                    view.init(ecModel, api);
+                    viewMap[viewId] = view;
+                    viewList.push(view as any);
+                    zr.add(view.group);
+                }
 
-    if (!isObject(opt)) {
-        opt = {silent: !!opt};
-    }
+                model.__viewId = view.__id = viewId;
+                view.__alive = true;
+                view.__model = model;
+                view.group.__ecComponentInfo = {
+                    mainType: model.mainType,
+                    index: model.componentIndex
+                };
+                !isComponent && scheduler.prepareView(
+                    view as ChartView, model as SeriesModel, ecModel, api
+                );
+            }
 
-    if (!actions[payload.type]) {
-        return;
-    }
+            for (var i = 0; i < viewList.length;) {
+                var view = viewList[i];
+                if (!view.__alive) {
+                    !isComponent && (view as ChartView).renderTask.dispose();
+                    zr.remove(view.group);
+                    view.dispose(ecModel, api);
+                    viewList.splice(i, 1);
+                    delete viewMap[view.__id];
+                    view.__id = view.group.__ecComponentInfo = null;
+                }
+                else {
+                    i++;
+                }
+            }
+        };
 
-    // Avoid dispatch action before setOption. Especially in `connect`.
-    if (!this._model) {
-        return;
-    }
+        updateDirectly = function (
+            ecIns: ECharts,
+            method: string,
+            payload: Payload,
+            mainType: ComponentMainType,
+            subType?: ComponentSubType
+        ): void {
+            var ecModel = ecIns._model;
+
+            // broadcast
+            if (!mainType) {
+                // FIXME
+                // Chart will not be update directly here, except set dirty.
+                // But there is no such scenario now.
+                each([].concat(ecIns._componentsViews).concat(ecIns._chartsViews), callView);
+                return;
+            }
 
-    // May dispatchAction in rendering procedure
-    if (this[IN_MAIN_PROCESS]) {
-        this._pendingActions.push(payload);
-        return;
-    }
+            var query: QueryConditionKindA['query'] = {};
+            query[mainType + 'Id'] = payload[mainType + 'Id'];
+            query[mainType + 'Index'] = payload[mainType + 'Index'];
+            query[mainType + 'Name'] = payload[mainType + 'Name'];
 
-    doDispatchAction.call(this, payload, opt.silent);
+            var condition = {mainType: mainType, query: query} as QueryConditionKindA;
+            subType && (condition.subType = subType); // subType may be '' by parseClassType;
 
-    if (opt.flush) {
-        this._zr.flush(true);
-    }
-    else if (opt.flush !== false && env.browser.weChat) {
-        // In WeChat embeded browser, `requestAnimationFrame` and `setInterval`
-        // hang when sliding page (on touch event), which cause that zr does not
-        // refresh util user interaction finished, which is not expected.
-        // But `dispatchAction` may be called too frequently when pan on touch
-        // screen, which impacts performance if do not throttle them.
-        this._throttledZrFlush();
-    }
+            var excludeSeriesId = payload.excludeSeriesId;
+            var excludeSeriesIdMap: zrUtil.HashMap<string[]>;
+            if (excludeSeriesId != null) {
+                excludeSeriesIdMap = zrUtil.createHashMap(modelUtil.normalizeToArray(excludeSeriesId));
+            }
 
-    flushPendingActions.call(this, opt.silent);
+            // If dispatchAction before setOption, do nothing.
+            ecModel && ecModel.eachComponent(condition, function (model) {
+                if (!excludeSeriesIdMap || excludeSeriesIdMap.get(model.id) == null) {
+                    callView(ecIns[
+                        mainType === 'series' ? '_chartsMap' : '_componentsMap'
+                    ][model.__viewId]);
+                }
+            }, ecIns);
 
-    triggerUpdatedEvent.call(this, opt.silent);
-};
+            function callView(view: ComponentView | ChartView) {
+                view && view.__alive && (view as any)[method] && (view as any)[method](
+                    view.__model, ecModel, ecIns._api, payload
+                );
+            }
+        };
 
-function doDispatchAction(payload, silent) {
-    var payloadType = payload.type;
-    var escapeConnect = payload.escapeConnect;
-    var actionWrap = actions[payloadType];
-    var actionInfo = actionWrap.actionInfo;
-
-    var cptType = (actionInfo.update || 'update').split(':');
-    var updateMethod = cptType.pop();
-    cptType = cptType[0] != null && parseClassType(cptType[0]);
-
-    this[IN_MAIN_PROCESS] = true;
-
-    var payloads = [payload];
-    var batched = false;
-    // Batch action
-    if (payload.batch) {
-        batched = true;
-        payloads = zrUtil.map(payload.batch, function (item) {
-            item = zrUtil.defaults(zrUtil.extend({}, item), payload);
-            item.batch = null;
-            return item;
-        });
-    }
+        updateMethods = {
 
-    var eventObjBatch = [];
-    var eventObj;
-    var isHighDown = payloadType === 'highlight' || payloadType === 'downplay';
-
-    each(payloads, function (batchItem) {
-        // Action can specify the event by return it.
-        eventObj = actionWrap.action(batchItem, this._model, this._api);
-        // Emit event outside
-        eventObj = eventObj || zrUtil.extend({}, batchItem);
-        // Convert type to eventType
-        eventObj.type = actionInfo.event || eventObj.type;
-        eventObjBatch.push(eventObj);
-
-        // light update does not perform data process, layout and visual.
-        if (isHighDown) {
-            // method, payload, mainType, subType
-            updateDirectly(this, updateMethod, batchItem, 'series');
-        }
-        else if (cptType) {
-            updateDirectly(this, updateMethod, batchItem, cptType.main, cptType.sub);
-        }
-    }, this);
+            prepareAndUpdate: function (this: ECharts, payload: Payload): void {
+                prepare(this);
+                updateMethods.update.call(this, payload);
+            },
 
-    if (updateMethod !== 'none' && !isHighDown && !cptType) {
-        // Still dirty
-        if (this[OPTION_UPDATED]) {
-            // FIXME Pass payload ?
-            prepare(this);
-            updateMethods.update.call(this, payload);
-            this[OPTION_UPDATED] = false;
-        }
-        else {
-            updateMethods[updateMethod].call(this, payload);
-        }
-    }
+            update: function (this: ECharts, payload: Payload): void {
+                // console.profile && console.profile('update');
 
-    // Follow the rule of action batch
-    if (batched) {
-        eventObj = {
-            type: actionInfo.event || payloadType,
-            escapeConnect: escapeConnect,
-            batch: eventObjBatch
-        };
-    }
-    else {
-        eventObj = eventObjBatch[0];
-    }
+                var ecModel = this._model;
+                var api = this._api;
+                var zr = this._zr;
+                var coordSysMgr = this._coordSysMgr;
+                var scheduler = this._scheduler;
 
-    this[IN_MAIN_PROCESS] = false;
+                // update before setOption
+                if (!ecModel) {
+                    return;
+                }
 
-    !silent && this._messageCenter.trigger(eventObj.type, eventObj);
-}
+                scheduler.restoreData(ecModel, payload);
 
-function flushPendingActions(silent) {
-    var pendingActions = this._pendingActions;
-    while (pendingActions.length) {
-        var payload = pendingActions.shift();
-        doDispatchAction.call(this, payload, silent);
-    }
-}
+                scheduler.performSeriesTasks(ecModel);
 
-function triggerUpdatedEvent(silent) {
-    !silent && this.trigger('updated');
-}
+                // TODO
+                // Save total ecModel here for undo/redo (after restoring data and before processing data).
+                // Undo (restoration of total ecModel) can be carried out in 'action' or outside API call.
 
-/**
- * Event `rendered` is triggered when zr
- * rendered. It is useful for realtime
- * snapshot (reflect animation).
- *
- * Event `finished` is triggered when:
- * (1) zrender rendering finished.
- * (2) initial animation finished.
- * (3) progressive rendering finished.
- * (4) no pending action.
- * (5) no delayed setOption needs to be processed.
- */
-function bindRenderedEvent(zr, ecIns) {
-    zr.on('rendered', function () {
-
-        ecIns.trigger('rendered');
-
-        // The `finished` event should not be triggered repeatly,
-        // so it should only be triggered when rendering indeed happend
-        // in zrender. (Consider the case that dipatchAction is keep
-        // triggering when mouse move).
-        if (
-            // Although zr is dirty if initial animation is not finished
-            // and this checking is called on frame, we also check
-            // animation finished for robustness.
-            zr.animation.isFinished()
-            && !ecIns[OPTION_UPDATED]
-            && !ecIns._scheduler.unfinished
-            && !ecIns._pendingActions.length
-        ) {
-            ecIns.trigger('finished');
-        }
-    });
-}
+                // Create new coordinate system each update
+                // In LineView may save the old coordinate system and use it to get the orignal point
+                coordSysMgr.create(ecModel, api);
 
-/**
- * @param {Object} params
- * @param {number} params.seriesIndex
- * @param {Array|TypedArray} params.data
- */
-echartsProto.appendData = function (params) {
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
-    }
+                scheduler.performDataProcessorTasks(ecModel, payload);
 
-    var seriesIndex = params.seriesIndex;
-    var ecModel = this.getModel();
-    var seriesModel = ecModel.getSeriesByIndex(seriesIndex);
+                // Current stream render is not supported in data process. So we can update
+                // stream modes after data processing, where the filtered data is used to
+                // deteming whether use progressive rendering.
+                updateStreamModes(this, ecModel);
 
-    if (__DEV__) {
-        assert(params.data && seriesModel);
-    }
+                // We update stream modes before coordinate system updated, then the modes info
+                // can be fetched when coord sys updating (consider the barGrid extent fix). But
+                // the drawback is the full coord info can not be fetched. Fortunately this full
+                // coord is not requied in stream mode updater currently.
+                coordSysMgr.update(ecModel, api);
 
-    seriesModel.appendData(params);
+                clearColorPalette(ecModel);
+                scheduler.performVisualTasks(ecModel, payload);
 
-    // Note: `appendData` does not support that update extent of coordinate
-    // system, util some scenario require that. In the expected usage of
-    // `appendData`, the initial extent of coordinate system should better
-    // be fixed by axis `min`/`max` setting or initial data, otherwise if
-    // the extent changed while `appendData`, the location of the painted
-    // graphic elements have to be changed, which make the usage of
-    // `appendData` meaningless.
+                render(this, ecModel, api, payload);
 
-    this._scheduler.unfinished = true;
-};
+                // Set background
+                var backgroundColor = ecModel.get('backgroundColor') || 'transparent';
 
-/**
- * Register event
- * @method
- */
-echartsProto.on = createRegisterEventWithLowercaseName('on', false);
-echartsProto.off = createRegisterEventWithLowercaseName('off', false);
-echartsProto.one = createRegisterEventWithLowercaseName('one', false);
+                // In IE8
+                if (!env.canvasSupported) {
+                    var colorArr = colorTool.parse(backgroundColor);
+                    backgroundColor = colorTool.stringify(colorArr, 'rgb');
+                    if (colorArr[3] === 0) {
+                        backgroundColor = 'transparent';
+                    }
+                }
+                else {
+                    zr.setBackgroundColor(backgroundColor);
+                }
 
-/**
- * Prepare view instances of charts and components
- * @param  {module:echarts/model/Global} ecModel
- * @private
- */
-function prepareView(ecIns, type, ecModel, scheduler) {
-    var isComponent = type === 'component';
-    var viewList = isComponent ? ecIns._componentsViews : ecIns._chartsViews;
-    var viewMap = isComponent ? ecIns._componentsMap : ecIns._chartsMap;
-    var zr = ecIns._zr;
-    var api = ecIns._api;
-
-    for (var i = 0; i < viewList.length; i++) {
-        viewList[i].__alive = false;
-    }
+                performPostUpdateFuncs(ecModel, api);
 
-    isComponent
-        ? ecModel.eachComponent(function (componentType, model) {
-            componentType !== 'series' && doPrepare(model);
-        })
-        : ecModel.eachSeries(doPrepare);
-
-    function doPrepare(model) {
-        // Consider: id same and type changed.
-        var viewId = '_ec_' + model.id + '_' + model.type;
-        var view = viewMap[viewId];
-        if (!view) {
-            var classType = parseClassType(model.type);
-            var Clazz = isComponent
-                ? ComponentView.getClass(classType.main, classType.sub)
-                : ChartView.getClass(classType.sub);
+                // console.profile && console.profileEnd('update');
+            },
 
-            if (__DEV__) {
-                assert(Clazz, classType.sub + ' does not exist.');
-            }
+            updateTransform: function (this: ECharts, payload: Payload): void {
+                var ecModel = this._model;
+                var ecIns = this;
+                var api = this._api;
 
-            view = new Clazz();
-            view.init(ecModel, api);
-            viewMap[viewId] = view;
-            viewList.push(view);
-            zr.add(view.group);
-        }
+                // update before setOption
+                if (!ecModel) {
+                    return;
+                }
 
-        model.__viewId = view.__id = viewId;
-        view.__alive = true;
-        view.__model = model;
-        view.group.__ecComponentInfo = {
-            mainType: model.mainType,
-            index: model.componentIndex
-        };
-        !isComponent && scheduler.prepareView(view, model, ecModel, api);
-    }
+                // ChartView.markUpdateMethod(payload, 'updateTransform');
 
-    for (var i = 0; i < viewList.length;) {
-        var view = viewList[i];
-        if (!view.__alive) {
-            !isComponent && view.renderTask.dispose();
-            zr.remove(view.group);
-            view.dispose(ecModel, api);
-            viewList.splice(i, 1);
-            delete viewMap[view.__id];
-            view.__id = view.group.__ecComponentInfo = null;
-        }
-        else {
-            i++;
-        }
-    }
-}
+                var componentDirtyList = [];
+                ecModel.eachComponent(function (componentType, componentModel) {
+                    var componentView = ecIns.getViewOfComponentModel(componentModel);
+                    if (componentView && componentView.__alive) {
+                        if (componentView.updateTransform) {
+                            var result = componentView.updateTransform(componentModel, ecModel, api, payload);
+                            result && result.update && componentDirtyList.push(componentView);
+                        }
+                        else {
+                            componentDirtyList.push(componentView);
+                        }
+                    }
+                });
 
-// /**
-//  * Encode visual infomation from data after data processing
-//  *
-//  * @param {module:echarts/model/Global} ecModel
-//  * @param {object} layout
-//  * @param {boolean} [layoutFilter] `true`: only layout,
-//  *                                 `false`: only not layout,
-//  *                                 `null`/`undefined`: all.
-//  * @param {string} taskBaseTag
-//  * @private
-//  */
-// function startVisualEncoding(ecIns, ecModel, api, payload, layoutFilter) {
-//     each(visualFuncs, function (visual, index) {
-//         var isLayout = visual.isLayout;
-//         if (layoutFilter == null
-//             || (layoutFilter === false && !isLayout)
-//             || (layoutFilter === true && isLayout)
-//         ) {
-//             visual.func(ecModel, api, payload);
-//         }
-//     });
-// }
+                var seriesDirtyMap = zrUtil.createHashMap();
+                ecModel.eachSeries(function (seriesModel) {
+                    var chartView = ecIns._chartsMap[seriesModel.__viewId];
+                    if (chartView.updateTransform) {
+                        var result = chartView.updateTransform(seriesModel, ecModel, api, payload);
+                        result && result.update && seriesDirtyMap.set(seriesModel.uid, 1);
+                    }
+                    else {
+                        seriesDirtyMap.set(seriesModel.uid, 1);
+                    }
+                });
 
-function clearColorPalette(ecModel) {
-    ecModel.clearColorPalette();
-    ecModel.eachSeries(function (seriesModel) {
-        seriesModel.clearColorPalette();
-    });
-}
+                clearColorPalette(ecModel);
+                // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.
+                // this._scheduler.performVisualTasks(ecModel, payload, 'layout', true);
+                this._scheduler.performVisualTasks(
+                    ecModel, payload, {setDirty: true, dirtyMap: seriesDirtyMap}
+                );
 
-function render(ecIns, ecModel, api, payload) {
+                // Currently, not call render of components. Geo render cost a lot.
+                // renderComponents(ecIns, ecModel, api, payload, componentDirtyList);
+                renderSeries(ecIns, ecModel, api, payload, seriesDirtyMap);
 
-    renderComponents(ecIns, ecModel, api, payload);
+                performPostUpdateFuncs(ecModel, this._api);
+            },
 
-    each(ecIns._chartsViews, function (chart) {
-        chart.__alive = false;
-    });
+            updateView: function (this: ECharts, payload: Payload): void {
+                var ecModel = this._model;
 
-    renderSeries(ecIns, ecModel, api, payload);
+                // update before setOption
+                if (!ecModel) {
+                    return;
+                }
 
-    // Remove groups of unrendered charts
-    each(ecIns._chartsViews, function (chart) {
-        if (!chart.__alive) {
-            chart.remove(ecModel, api);
-        }
-    });
-}
+                ChartView.markUpdateMethod(payload, 'updateView');
 
-function renderComponents(ecIns, ecModel, api, payload, dirtyList) {
-    each(dirtyList || ecIns._componentsViews, function (componentView) {
-        var componentModel = componentView.__model;
-        componentView.render(componentModel, ecModel, api, payload);
+                clearColorPalette(ecModel);
 
-        updateZ(componentModel, componentView);
-    });
-}
+                // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.
+                this._scheduler.performVisualTasks(ecModel, payload, {setDirty: true});
 
-/**
- * Render each chart and component
- * @private
- */
-function renderSeries(ecIns, ecModel, api, payload, dirtyMap) {
-    // Render all charts
-    var scheduler = ecIns._scheduler;
-    var unfinished;
-    ecModel.eachSeries(function (seriesModel) {
-        var chartView = ecIns._chartsMap[seriesModel.__viewId];
-        chartView.__alive = true;
-
-        var renderTask = chartView.renderTask;
-        scheduler.updatePayload(renderTask, payload);
-
-        if (dirtyMap && dirtyMap.get(seriesModel.uid)) {
-            renderTask.dirty();
-        }
+                render(this, this._model, this._api, payload);
 
-        unfinished |= renderTask.perform(scheduler.getPerformArgs(renderTask));
+                performPostUpdateFuncs(ecModel, this._api);
+            },
 
-        chartView.group.silent = !!seriesModel.get('silent');
+            updateVisual: function (this: ECharts, payload: Payload): void {
+                updateMethods.update.call(this, payload);
 
-        updateZ(seriesModel, chartView);
+                // var ecModel = this._model;
 
-        updateBlend(seriesModel, chartView);
-    });
-    scheduler.unfinished |= unfinished;
+                // // update before setOption
+                // if (!ecModel) {
+                //     return;
+                // }
 
-    // If use hover layer
-    updateHoverLayerStatus(ecIns, ecModel);
+                // ChartView.markUpdateMethod(payload, 'updateVisual');
 
-    // Add aria
-    aria(ecIns._zr.dom, ecModel);
-}
+                // clearColorPalette(ecModel);
 
-function performPostUpdateFuncs(ecModel, api) {
-    each(postUpdateFuncs, function (func) {
-        func(ecModel, api);
-    });
-}
+                // // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.
+                // this._scheduler.performVisualTasks(ecModel, payload, {visualType: 'visual', setDirty: true});
 
+                // render(this, this._model, this._api, payload);
 
-var MOUSE_EVENT_NAMES = [
-    'click', 'dblclick', 'mouseover', 'mouseout', 'mousemove',
-    'mousedown', 'mouseup', 'globalout', 'contextmenu'
-];
+                // performPostUpdateFuncs(ecModel, this._api);
+            },
 
-/**
- * @private
- */
-echartsProto._initEvents = function () {
-    each(MOUSE_EVENT_NAMES, function (eveName) {
-        var handler = function (e) {
-            var ecModel = this.getModel();
-            var el = e.target;
-            var params;
-            var isGlobalOut = eveName === 'globalout';
-
-            // no e.target when 'globalout'.
-            if (isGlobalOut) {
-                params = {};
-            }
-            else if (el && el.dataIndex != null) {
-                var dataModel = el.dataModel || ecModel.getSeriesByIndex(el.seriesIndex);
-                params = dataModel && dataModel.getDataParams(el.dataIndex, el.dataType, el) || {};
+            updateLayout: function (this: ECharts, payload: Payload): void {
+                updateMethods.update.call(this, payload);
+
+                // var ecModel = this._model;
+
+                // // update before setOption
+                // if (!ecModel) {
+                //     return;
+                // }
+
+                // ChartView.markUpdateMethod(payload, 'updateLayout');
+
+                // // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.
+                // // this._scheduler.performVisualTasks(ecModel, payload, 'layout', true);
+                // this._scheduler.performVisualTasks(ecModel, payload, {setDirty: true});
+
+                // render(this, this._model, this._api, payload);
+
+                // performPostUpdateFuncs(ecModel, this._api);
             }
-            // If element has custom eventData of components
-            else if (el && el.eventData) {
-                params = zrUtil.extend({}, el.eventData);
+        };
+
+        doConvertPixel = function (
+            ecIns: ECharts,
+            methodName: 'convertFromPixel' | 'convertToPixel',
+            finder: ModelFinder,
+            value: any
+        ): any {
+            if (ecIns._disposed) {
+                disposedWarning(ecIns.id);
+                return;
             }
+            var ecModel = ecIns._model;
+            var coordSysList = ecIns._coordSysMgr.getCoordinateSystems();
+            var result;
 
-            // Contract: if params prepared in mouse event,
-            // these properties must be specified:
-            // {
-            //    componentType: string (component main type)
-            //    componentIndex: number
-            // }
-            // Otherwise event query can not work.
-
-            if (params) {
-                var componentType = params.componentType;
-                var componentIndex = params.componentIndex;
-                // Special handling for historic reason: when trigger by
-                // markLine/markPoint/markArea, the componentType is
-                // 'markLine'/'markPoint'/'markArea', but we should better
-                // enable them to be queried by seriesIndex, since their
-                // option is set in each series.
-                if (componentType === 'markLine'
-                    || componentType === 'markPoint'
-                    || componentType === 'markArea'
+            finder = modelUtil.parseFinder(ecModel, finder);
+
+            for (var i = 0; i < coordSysList.length; i++) {
+                var coordSys = coordSysList[i];
+                if (coordSys[methodName]
+                    && (result = coordSys[methodName](ecModel, finder, value)) != null
                 ) {
-                    componentType = 'series';
-                    componentIndex = params.seriesIndex;
-                }
-                var model = componentType && componentIndex != null
-                    && ecModel.getComponent(componentType, componentIndex);
-                var view = model && this[
-                    model.mainType === 'series' ? '_chartsMap' : '_componentsMap'
-                ][model.__viewId];
-
-                if (__DEV__) {
-                    // `event.componentType` and `event[componentTpype + 'Index']` must not
-                    // be missed, otherwise there is no way to distinguish source component.
-                    // See `dataFormat.getDataParams`.
-                    if (!isGlobalOut && !(model && view)) {
-                        console.warn('model or view can not be found by params');
-                    }
+                    return result;
                 }
+            }
+
+            if (__DEV__) {
+                console.warn(
+                    'No coordinate system that supports ' + methodName + ' found by the given finder.'
+                );
+            }
+        };
+
+        updateStreamModes = function (ecIns: ECharts, ecModel: GlobalModel): void {
+            var chartsMap = ecIns._chartsMap;
+            var scheduler = ecIns._scheduler;
+            ecModel.eachSeries(function (seriesModel) {
+                scheduler.updateStreamModes(seriesModel, chartsMap[seriesModel.__viewId]);
+            });
+        };
+
+        doDispatchAction = function (this: ECharts, payload: Payload, silent: boolean): void {
+            var payloadType = payload.type;
+            var escapeConnect = payload.escapeConnect;
+            var actionWrap = actions[payloadType];
+            var actionInfo = actionWrap.actionInfo;
+
+            var cptTypeTmp = (actionInfo.update || 'update').split(':');
+            var updateMethod = cptTypeTmp.pop();
+            var cptType = cptTypeTmp[0] != null && parseClassType(cptTypeTmp[0]);
+
+            this[IN_MAIN_PROCESS] = true;
+
+            var payloads: Payload[] = [payload];
+            var batched = false;
+            // Batch action
+            if (payload.batch) {
+                batched = true;
+                payloads = zrUtil.map<PayloadItem, Payload, unknown>(payload.batch, function (item) {
+                    item = zrUtil.defaults(zrUtil.extend({}, item), payload);
+                    item.batch = null;
+                    return item as Payload;
+                });
+            }
 
-                params.event = e;
-                params.type = eveName;
+            var eventObjBatch: ECEventData[] = [];
+            var eventObj: ECEvent;
+            var isHighDown = payloadType === 'highlight' || payloadType === 'downplay';
+
+            each(payloads, function (batchItem) {
+                // Action can specify the event by return it.
+                eventObj = actionWrap.action(batchItem, this._model, this._api) as ECEvent;
+                // Emit event outside
+                eventObj = eventObj || zrUtil.extend({} as ECEvent, batchItem);
+                // Convert type to eventType
+                eventObj.type = actionInfo.event || eventObj.type;
+                eventObjBatch.push(eventObj);
+
+                // light update does not perform data process, layout and visual.
+                if (isHighDown) {
+                    // method, payload, mainType, subType
+                    updateDirectly(this, updateMethod, batchItem as Payload, 'series');
+                }
+                else if (cptType) {
+                    updateDirectly(this, updateMethod, batchItem as Payload, cptType.main, cptType.sub);
+                }
+            }, this);
+
+            if (updateMethod !== 'none' && !isHighDown && !cptType) {
+                // Still dirty
+                if (this[OPTION_UPDATED]) {
+                    // FIXME Pass payload ?
+                    prepare(this);
+                    updateMethods.update.call(this, payload);
+                    this[OPTION_UPDATED] = false;
+                }
+                else {
+                    updateMethods[updateMethod as keyof typeof updateMethods].call(this, payload);
+                }
+            }
 
-                this._ecEventProcessor.eventInfo = {
-                    targetEl: el,
-                    packedEvent: params,
-                    model: model,
-                    view: view
+            // Follow the rule of action batch
+            if (batched) {
+                eventObj = {
+                    type: actionInfo.event || payloadType,
+                    escapeConnect: escapeConnect,
+                    batch: eventObjBatch
                 };
+            }
+            else {
+                eventObj = eventObjBatch[0] as ECEvent;
+            }
+
+            this[IN_MAIN_PROCESS] = false;
+
+            !silent && this._messageCenter.trigger(eventObj.type, eventObj);
+        };
 
-                this.trigger(eveName, params);
+        flushPendingActions = function (this: ECharts, silent: boolean): void {
+            var pendingActions = this._pendingActions;
+            while (pendingActions.length) {
+                var payload = pendingActions.shift();
+                doDispatchAction.call(this, payload, silent);
             }
         };
-        // Consider that some component (like tooltip, brush, ...)
-        // register zr event handler, but user event handler might
-        // do anything, such as call `setOption` or `dispatchAction`,
-        // which probably update any of the content and probably
-        // cause problem if it is called previous other inner handlers.
-        handler.zrEventfulCallAtLast = true;
-        this._zr.on(eveName, handler, this);
-    }, this);
-
-    each(eventActionMap, function (actionType, eventType) {
-        this._messageCenter.on(eventType, function (event) {
-            this.trigger(eventType, event);
-        }, this);
-    }, this);
-};
 
-/**
- * @return {boolean}
- */
-echartsProto.isDisposed = function () {
-    return this._disposed;
-};
+        triggerUpdatedEvent = function (this: ECharts, silent): void {
+            !silent && this.trigger('updated');
+        };
 
-/**
- * Clear
- */
-echartsProto.clear = function () {
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
-    }
-    this.setOption({ series: [] }, true);
-};
+        /**
+         * Event `rendered` is triggered when zr
+         * rendered. It is useful for realtime
+         * snapshot (reflect animation).
+         *
+         * Event `finished` is triggered when:
+         * (1) zrender rendering finished.
+         * (2) initial animation finished.
+         * (3) progressive rendering finished.
+         * (4) no pending action.
+         * (5) no delayed setOption needs to be processed.
+         */
+        bindRenderedEvent = function (zr: zrender.ZRenderType, ecIns: ECharts): void {
+            zr.on('rendered', function () {
+
+                ecIns.trigger('rendered');
+
+                // The `finished` event should not be triggered repeatly,
+                // so it should only be triggered when rendering indeed happend
+                // in zrender. (Consider the case that dipatchAction is keep
+                // triggering when mouse move).
+                if (
+                    // Although zr is dirty if initial animation is not finished
+                    // and this checking is called on frame, we also check
+                    // animation finished for robustness.
+                    zr.animation.isFinished()
+                    && !ecIns[OPTION_UPDATED]
+                    && !ecIns._scheduler.unfinished
+                    && !ecIns._pendingActions.length
+                ) {
+                    ecIns.trigger('finished');
+                }
+            });
+        };
 
-/**
- * Dispose instance
- */
-echartsProto.dispose = function () {
-    if (this._disposed) {
-        disposedWarning(this.id);
-        return;
-    }
-    this._disposed = true;
+        clearColorPalette = function (ecModel: GlobalModel): void {
+            ecModel.clearColorPalette();
+            ecModel.eachSeries(function (seriesModel) {
+                seriesModel.clearColorPalette();
+            });
+        };
 
-    modelUtil.setAttribute(this.getDom(), DOM_ATTRIBUTE_KEY, '');
+        render = function (ecIns: ECharts, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void {
 
-    var api = this._api;
-    var ecModel = this._model;
+            renderComponents(ecIns, ecModel, api, payload);
 
-    each(this._componentsViews, function (component) {
-        component.dispose(ecModel, api);
-    });
-    each(this._chartsViews, function (chart) {
-        chart.dispose(ecModel, api);
-    });
+            each(ecIns._chartsViews, function (chart: ChartView) {
+                chart.__alive = false;
+            });
 
-    // Dispose after all views disposed
-    this._zr.dispose();
+            renderSeries(ecIns, ecModel, api, payload);
 
-    delete instances[this.id];
-};
+            // Remove groups of unrendered charts
+            each(ecIns._chartsViews, function (chart: ChartView) {
+                if (!chart.__alive) {
+                    chart.remove(ecModel, api);
+                }
+            });
+        };
 
-zrUtil.mixin(ECharts, Eventful);
+        renderComponents = function (
+            ecIns: ECharts, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload, dirtyList?: ComponentView[]
+        ): void {
+            each(dirtyList || ecIns._componentsViews, function (componentView: ComponentView) {
+                var componentModel = componentView.__model;
+                componentView.render(componentModel, ecModel, api, payload);
 
-function disposedWarning(id) {
-    if (__DEV__) {
-        console.warn('Instance ' + id + ' has been disposed');
-    }
-}
+                updateZ(componentModel, componentView);
+            });
+        };
 
-function updateHoverLayerStatus(ecIns, ecModel) {
-    var zr = ecIns._zr;
-    var storage = zr.storage;
-    var elCount = 0;
+        /**
+         * Render each chart and component
+         */
+        renderSeries = function (
+            ecIns: ECharts,
+            ecModel: GlobalModel,
+            api: ExtensionAPI,
+            payload: Payload | 'remain',
+            dirtyMap?: {[uid: string]: any}
+        ): void {
+            // Render all charts
+            var scheduler = ecIns._scheduler;
+            var unfinished: number;
+            ecModel.eachSeries(function (seriesModel) {
+                var chartView = ecIns._chartsMap[seriesModel.__viewId];
+                chartView.__alive = true;
+
+                var renderTask = chartView.renderTask;
+                scheduler.updatePayload(renderTask, payload);
+
+                if (dirtyMap && dirtyMap.get(seriesModel.uid)) {
+                    renderTask.dirty();
+                }
 
-    storage.traverse(function (el) {
-        elCount++;
-    });
+                unfinished |= +renderTask.perform(scheduler.getPerformArgs(renderTask));
 
-    if (elCount > ecModel.get('hoverLayerThreshold') && !env.node) {
-        ecModel.eachSeries(function (seriesModel) {
-            if (seriesModel.preventUsingHoverLayer) {
-                return;
-            }
-            var chartView = ecIns._chartsMap[seriesModel.__viewId];
-            if (chartView.__alive) {
-                chartView.group.traverse(function (el) {
-                    // Don't switch back.
-                    el.useHoverLayer = true;
-                });
-            }
-        });
-    }
-}
+                chartView.group.silent = !!seriesModel.get('silent');
 
-/**
- * Update chart progressive and blend.
- * @param {module:echarts/model/Series|module:echarts/model/Component} model
- * @param {module:echarts/view/Component|module:echarts/view/Chart} view
- */
-function updateBlend(seriesModel, chartView) {
-    var blendMode = seriesModel.get('blendMode') || null;
-    if (__DEV__) {
-        if (!env.canvasSupported && blendMode && blendMode !== 'source-over') {
-            console.warn('Only canvas support blendMode');
-        }
-    }
-    chartView.group.traverse(function (el) {
-        // FIXME marker and other components
-        if (!el.isGroup) {
-            // Only set if blendMode is changed. In case element is incremental and don't wan't to rerender.
-            if (el.style.blend !== blendMode) {
-                el.setStyle('blend', blendMode);
-            }
-        }
-        if (el.eachPendingDisplayable) {
-            el.eachPendingDisplayable(function (displayable) {
-                displayable.setStyle('blend', blendMode);
+                updateZ(seriesModel, chartView);
+
+                updateBlend(seriesModel, chartView);
             });
-        }
-    });
-}
+            scheduler.unfinished |= unfinished;
 
-/**
- * @param {module:echarts/model/Series|module:echarts/model/Component} model
- * @param {module:echarts/view/Component|module:echarts/view/Chart} view
- */
-function updateZ(model, view) {
-    var z = model.get('z');
-    var zlevel = model.get('zlevel');
-    // Set z and zlevel
-    view.group.traverse(function (el) {
-        if (el.type !== 'group') {
-            z != null && (el.z = z);
-            zlevel != null && (el.zlevel = zlevel);
-        }
-    });
-}
+            // If use hover layer
+            updateHoverLayerStatus(ecIns, ecModel);
 
-function createExtensionAPI(ecInstance) {
-    var coordSysMgr = ecInstance._coordSysMgr;
-    return zrUtil.extend(new ExtensionAPI(ecInstance), {
-        // Inject methods
-        getCoordinateSystems: zrUtil.bind(
-            coordSysMgr.getCoordinateSystems, coordSysMgr
-        ),
-        getComponentByElement: function (el) {
-            while (el) {
-                var modelInfo = el.__ecComponentInfo;
-                if (modelInfo != null) {
-                    return ecInstance._model.getComponent(modelInfo.mainType, modelInfo.index);
-                }
-                el = el.parent;
-            }
-        }
-    });
-}
+            // Add aria
+            aria(ecIns._zr.dom, ecModel);
+        };
 
+        performPostUpdateFuncs = function (ecModel: GlobalModel, api: ExtensionAPI): void {
+            each(postUpdateFuncs, function (func) {
+                func(ecModel, api);
+            });
+        };
 
-/**
- * @class
- * Usage of query:
- * `chart.on('click', query, handler);`
- * The `query` can be:
- * + The component type query string, only `mainType` or `mainType.subType`,
- *   like: 'xAxis', 'series', 'xAxis.category' or 'series.line'.
- * + The component query object, like:
- *   `{seriesIndex: 2}`, `{seriesName: 'xx'}`, `{seriesId: 'some'}`,
- *   `{xAxisIndex: 2}`, `{xAxisName: 'xx'}`, `{xAxisId: 'some'}`.
- * + The data query object, like:
- *   `{dataIndex: 123}`, `{dataType: 'link'}`, `{name: 'some'}`.
- * + The other query object (cmponent customized query), like:
- *   `{element: 'some'}` (only available in custom series).
- *
- * Caveat: If a prop in the `query` object is `null/undefined`, it is the
- * same as there is no such prop in the `query` object.
- */
-function EventProcessor() {
-    // These info required: targetEl, packedEvent, model, view
-    this.eventInfo;
-}
-EventProcessor.prototype = {
-    constructor: EventProcessor,
-
-    normalizeQuery: function (query) {
-        var cptQuery = {};
-        var dataQuery = {};
-        var otherQuery = {};
-
-        // `query` is `mainType` or `mainType.subType` of component.
-        if (zrUtil.isString(query)) {
-            var condCptType = parseClassType(query);
-            // `.main` and `.sub` may be ''.
-            cptQuery.mainType = condCptType.main || null;
-            cptQuery.subType = condCptType.sub || null;
-        }
-        // `query` is an object, convert to {mainType, index, name, id}.
-        else {
-            // `xxxIndex`, `xxxName`, `xxxId`, `name`, `dataIndex`, `dataType` is reserved,
-            // can not be used in `compomentModel.filterForExposedEvent`.
-            var suffixes = ['Index', 'Name', 'Id'];
-            var dataKeys = {name: 1, dataIndex: 1, dataType: 1};
-            zrUtil.each(query, function (val, key) {
-                var reserved = false;
-                for (var i = 0; i < suffixes.length; i++) {
-                    var propSuffix = suffixes[i];
-                    var suffixPos = key.lastIndexOf(propSuffix);
-                    if (suffixPos > 0 && suffixPos === key.length - propSuffix.length) {
-                        var mainType = key.slice(0, suffixPos);
-                        // Consider `dataIndex`.
-                        if (mainType !== 'data') {
-                            cptQuery.mainType = mainType;
-                            cptQuery[propSuffix.toLowerCase()] = val;
-                            reserved = true;
-                        }
+        updateHoverLayerStatus = function (ecIns: ECharts, ecModel: GlobalModel): void {
+            var zr = ecIns._zr;
+            var storage = zr.storage;
+            var elCount = 0;
+
+            storage.traverse(function (el) {
+                elCount++;
+            });
+
+            if (elCount > ecModel.get('hoverLayerThreshold') && !env.node) {
+                ecModel.eachSeries(function (seriesModel) {
+                    if (seriesModel.preventUsingHoverLayer) {
+                        return;
+                    }
+                    var chartView = ecIns._chartsMap[seriesModel.__viewId];
+                    if (chartView.__alive) {
+                        chartView.group.traverse(function (el: ECElement) {
+                            // Don't switch back.
+                            el.useHoverLayer = true;
+                        });
+                    }
+                });
+            }
+        };
+
+        /**
+         * Update chart progressive and blend.
+         */
+        updateBlend = function (seriesModel: SeriesModel, chartView: ChartView): void {
+            var blendMode = seriesModel.get('blendMode') || null;
+            if (__DEV__) {
+                if (!env.canvasSupported && blendMode && blendMode !== 'source-over') {
+                    console.warn('Only canvas support blendMode');
+                }
+            }
+            chartView.group.traverse(function (el: Displayable) {
+                // FIXME marker and other components
+                if (!el.isGroup) {
+                    // Only set if blendMode is changed. In case element is incremental and don't wan't to rerender.
+                    if (el.style.blend !== blendMode) {
+                        el.setStyle('blend', blendMode);
                     }
                 }
-                if (dataKeys.hasOwnProperty(key)) {
-                    dataQuery[key] = val;
-                    reserved = true;
+                if ((el as IncrementalDisplayable).eachPendingDisplayable) {
+                    (el as IncrementalDisplayable).eachPendingDisplayable(function (displayable) {
+                        displayable.setStyle('blend', blendMode);
+                    });
                 }
-                if (!reserved) {
-                    otherQuery[key] = val;
+            });
+        };
+
+        updateZ = function (model: ComponentModel, view: ComponentView | ChartView): void {
+            var z = model.get('z');
+            var zlevel = model.get('zlevel');
+            // Set z and zlevel
+            view.group.traverse(function (el: Displayable) {
+                if (el.type !== 'group') {
+                    z != null && (el.z = z);
+                    zlevel != null && (el.zlevel = zlevel);
                 }
             });
-        }
+        };
 
-        return {
-            cptQuery: cptQuery,
-            dataQuery: dataQuery,
-            otherQuery: otherQuery
+        createExtensionAPI = function (ecIns: ECharts): ExtensionAPI {
+            return new (class extends ExtensionAPI {
+                getCoordinateSystems(): CoordinateSystem[] {
+                    return ecIns._coordSysMgr.getCoordinateSystems();
+                }
+                getComponentByElement(el: Element) {
+                    while (el) {
+                        var modelInfo = (el as ViewRootGroup).__ecComponentInfo;
+                        if (modelInfo != null) {
+                            return ecIns._model.getComponent(modelInfo.mainType, modelInfo.index);
+                        }
+                        el = el.parent;
+                    }
+                }
+            })(ecIns);
         };
-    },
 
-    filter: function (eventType, query, args) {
-        // They should be assigned before each trigger call.
-        var eventInfo = this.eventInfo;
+        enableConnect = function (chart: ECharts): void {
 
-        if (!eventInfo) {
-            return true;
-        }
+            function updateConnectedChartsStatus(charts: ECharts[], status: ConnectStatus) {
+                for (var i = 0; i < charts.length; i++) {
+                    var otherChart = charts[i];
+                    otherChart[CONNECT_STATUS_KEY] = status;
+                }
+            }
 
-        var targetEl = eventInfo.targetEl;
-        var packedEvent = eventInfo.packedEvent;
-        var model = eventInfo.model;
-        var view = eventInfo.view;
+            each(eventActionMap, function (actionType, eventType) {
+                chart._messageCenter.on(eventType, function (event) {
+                    if (connectedGroups[chart.group] && chart[CONNECT_STATUS_KEY] !== CONNECT_STATUS_PENDING) {
+                        if (event && event.escapeConnect) {
+                            return;
+                        }
 
-        // For event like 'globalout'.
-        if (!model || !view) {
-            return true;
-        }
+                        var action = chart.makeActionFromEvent(event);
+                        var otherCharts: ECharts[] = [];
+
+                        each(instances, function (otherChart) {
+                            if (otherChart !== chart && otherChart.group === chart.group) {
+                                otherCharts.push(otherChart);
+                            }
+                        });
+
+                        updateConnectedChartsStatus(otherCharts, CONNECT_STATUS_PENDING);
+                        each(otherCharts, function (otherChart) {
+                            if (otherChart[CONNECT_STATUS_KEY] !== CONNECT_STATUS_UPDATING) {
+                                otherChart.dispatchAction(action);
+                            }
+                        });
+                        updateConnectedChartsStatus(otherCharts, CONNECT_STATUS_UPDATED);
+                    }
+                });
+            });
+        };
 
-        var cptQuery = query.cptQuery;
-        var dataQuery = query.dataQuery;
-
-        return check(cptQuery, model, 'mainType')
-            && check(cptQuery, model, 'subType')
-            && check(cptQuery, model, 'index', 'componentIndex')
-            && check(cptQuery, model, 'name')
-            && check(cptQuery, model, 'id')
-            && check(dataQuery, packedEvent, 'name')
-            && check(dataQuery, packedEvent, 'dataIndex')
-            && check(dataQuery, packedEvent, 'dataType')
-            && (!view.filterForExposedEvent || view.filterForExposedEvent(
-                eventType, query.otherQuery, targetEl, packedEvent
-            ));
-
-        function check(query, host, prop, propOnHost) {
-            return query[prop] == null || host[propOnHost || prop] === query[prop];
-        }
-    },
+    })()
+}
 
-    afterTrigger: function () {
-        // Make sure the eventInfo wont be used in next trigger.
-        this.eventInfo = null;
-    }
+
+// ---------------------------------------
+// Internal method names for class ECharts
+// ---------------------------------------
+var prepare: (ecIns: ECharts) => void;
+var prepareView: (ecIns: ECharts, isComponent: boolean) => void;
+var updateDirectly: (
+    ecIns: ECharts, method: string, payload: Payload, mainType: ComponentMainType, subType?: ComponentSubType
+) => void;
+type UpdateMethod = (this: ECharts, payload?: Payload) => void
+var updateMethods: {
+    prepareAndUpdate: UpdateMethod,
+    update: UpdateMethod,
+    updateTransform: UpdateMethod,
+    updateView: UpdateMethod,
+    updateVisual: UpdateMethod,
+    updateLayout: UpdateMethod
 };
+var doConvertPixel: (ecIns: ECharts, methodName: string, finder: ModelFinder, value: any) => any;
+var updateStreamModes: (ecIns: ECharts, ecModel: GlobalModel) => void;
+var doDispatchAction: (this: ECharts, payload: Payload, silent: boolean) => void;
+var flushPendingActions: (this: ECharts, silent: boolean) => void;
+var triggerUpdatedEvent: (this: ECharts, silent: boolean) => void;
+var bindRenderedEvent: (zr: zrender.ZRenderType, ecIns: ECharts) => void;
+var clearColorPalette: (ecModel: GlobalModel) => void;
+var render: (ecIns: ECharts, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload) => void;
+var renderComponents: (
+    ecIns: ECharts, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload, dirtyList?: ComponentView[]
+) => void;
+var renderSeries: (
+    ecIns: ECharts,
+    ecModel: GlobalModel,
+    api: ExtensionAPI,
+    payload: Payload | 'remain',
+    dirtyMap?: {[uid: string]: any}
+) => void;
+var performPostUpdateFuncs: (ecModel: GlobalModel, api: ExtensionAPI) => void;
+var updateHoverLayerStatus: (ecIns: ECharts, ecModel: GlobalModel) => void;
+var updateBlend: (seriesModel: SeriesModel, chartView: ChartView) => void;
+var updateZ: (model: ComponentModel, view: ComponentView | ChartView) => void;
+var createExtensionAPI: (ecIns: ECharts) => ExtensionAPI;
+var enableConnect: (chart: ECharts) => void;
+
+
+
+interface ECharts extends Eventful {}
+zrUtil.tsMixin(ECharts, Eventful);
 
+var echartsProto = ECharts.prototype;
+echartsProto.on = createRegisterEventWithLowercaseECharts('on');
+echartsProto.off = createRegisterEventWithLowercaseECharts('off');
+// echartsProto.one = createRegisterEventWithLowercaseECharts('one');
 
-/**
- * @type {Object} key: actionType.
- * @inner
- */
-var actions = {};
+// /**
+//  * Encode visual infomation from data after data processing
+//  *
+//  * @param {module:echarts/model/Global} ecModel
+//  * @param {object} layout
+//  * @param {boolean} [layoutFilter] `true`: only layout,
+//  *                                 `false`: only not layout,
+//  *                                 `null`/`undefined`: all.
+//  * @param {string} taskBaseTag
+//  * @private
+//  */
+// function startVisualEncoding(ecIns, ecModel, api, payload, layoutFilter) {
+//     each(visualFuncs, function (visual, index) {
+//         var isLayout = visual.isLayout;
+//         if (layoutFilter == null
+//             || (layoutFilter === false && !isLayout)
+//             || (layoutFilter === true && isLayout)
+//         ) {
+//             visual.func(ecModel, api, payload);
+//         }
+//     });
+// }
 
-/**
- * Map eventType to actionType
- * @type {Object}
- */
-var eventActionMap = {};
 
-/**
- * Data processor functions of each stage
- * @type {Array.<Object.<string, Function>>}
- * @inner
- */
-var dataProcessorFuncs = [];
+var MOUSE_EVENT_NAMES = [
+    'click', 'dblclick', 'mouseover', 'mouseout', 'mousemove',
+    'mousedown', 'mouseup', 'globalout', 'contextmenu'
+];
 
-/**
- * @type {Array.<Function>}
- * @inner
- */
-var optionPreprocessorFuncs = [];
+function disposedWarning(id: string): void {
+    if (__DEV__) {
+        console.warn('Instance ' + id + ' has been disposed');
+    }
+}
 
-/**
- * @type {Array.<Function>}
- * @inner
- */
-var postUpdateFuncs = [];
 
-/**
- * Visual encoding functions of each stage
- * @type {Array.<Object.<string, Function>>}
- */
-var visualFuncs = [];
+var actions: {
+    [actionType: string]: {
+        action: ActionHandler,
+        actionInfo: ActionInfo
+    }
+} = {};
 
 /**
- * Theme storage
- * @type {Object.<key, Object>}
- */
-var themeStorage = {};
-/**
- * Loading effects
+ * Map eventType to actionType
  */
-var loadingEffects = {};
+var eventActionMap: {[eventType: string]: string} = {};
 
-var instances = {};
-var connectedGroups = {};
+var dataProcessorFuncs: StageHandler[] = [];
 
-var idBase = new Date() - 0;
-var groupIdBase = new Date() - 0;
-var DOM_ATTRIBUTE_KEY = '_echarts_instance_';
+var optionPreprocessorFuncs: OptionPreprocessor[] = [];
 
-function enableConnect(chart) {
-    var STATUS_PENDING = 0;
-    var STATUS_UPDATING = 1;
-    var STATUS_UPDATED = 2;
-    var STATUS_KEY = '__connectUpdateStatus';
+var postUpdateFuncs: PostUpdater[] = [];
 
-    function updateConnectedChartsStatus(charts, status) {
-        for (var i = 0; i < charts.length; i++) {
-            var otherChart = charts[i];
-            otherChart[STATUS_KEY] = status;
-        }
-    }
+var visualFuncs: StageHandler[] = [];
 
-    each(eventActionMap, function (actionType, eventType) {
-        chart._messageCenter.on(eventType, function (event) {
-            if (connectedGroups[chart.group] && chart[STATUS_KEY] !== STATUS_PENDING) {
-                if (event && event.escapeConnect) {
-                    return;
-                }
+var themeStorage: {[themeName: string]: ThemeOption} = {};
 
-                var action = chart.makeActionFromEvent(event);
-                var otherCharts = [];
+var loadingEffects: {[effectName: string]: LoadingEffectCreator} = {};
 
-                each(instances, function (otherChart) {
-                    if (otherChart !== chart && otherChart.group === chart.group) {
-                        otherCharts.push(otherChart);
-                    }
-                });
+var instances: {[id: string]: ECharts} = {};
+var connectedGroups: {[groupId: string]: boolean} = {};
+
+var idBase: number = +(new Date()) - 0;
+var groupIdBase: number = +(new Date()) - 0;
+var DOM_ATTRIBUTE_KEY = '_echarts_instance_';
 
-                updateConnectedChartsStatus(otherCharts, STATUS_PENDING);
-                each(otherCharts, function (otherChart) {
-                    if (otherChart[STATUS_KEY] !== STATUS_UPDATING) {
-                        otherChart.dispatchAction(action);
-                    }
-                });
-                updateConnectedChartsStatus(otherCharts, STATUS_UPDATED);
-            }
-        });
-    });
-}
 
 /**
- * @param {HTMLElement} dom
- * @param {Object} [theme]
- * @param {Object} opts
- * @param {number} [opts.devicePixelRatio] Use window.devicePixelRatio by default
- * @param {string} [opts.renderer] Can choose 'canvas' or 'svg' to render the chart.
- * @param {number} [opts.width] Use clientWidth of the input `dom` by default.
- *                              Can be 'auto' (the same as null/undefined)
- * @param {number} [opts.height] Use clientHeight of the input `dom` by default.
- *                               Can be 'auto' (the same as null/undefined)
+ * @param opts.devicePixelRatio Use window.devicePixelRatio by default
+ * @param opts.renderer Can choose 'canvas' or 'svg' to render the chart.
+ * @param opts.width Use clientWidth of the input `dom` by default.
+ *        Can be 'auto' (the same as null/undefined)
+ * @param opts.height Use clientHeight of the input `dom` by default.
+ *        Can be 'auto' (the same as null/undefined)
  */
-export function init(dom, theme, opts) {
+export function init(
+    dom: HTMLElement,
+    theme?: string | object,
+    opts?: {
+        renderer?: RendererType,
+        devicePixelRatio?: number,
+        width?: number,
+        height?: number
+    }
+): ECharts {
     if (__DEV__) {
         // Check version
-        if ((zrender.version.replace('.', '') - 0) < (dependencies.zrender.replace('.', '') - 0)) {
+        if (+zrender.version.replace('.', '') < +dependencies.zrender.replace('.', '')) {
             throw new Error(
                 'zrender/src ' + zrender.version
                 + ' is too old for ECharts ' + version
@@ -2088,9 +1954,23 @@ export function init(dom, theme, opts) {
 }
 
 /**
- * @return {string|Array.<module:echarts~ECharts>} groupId
- */
-export function connect(groupId) {
+ * @usage
+ * (A)
+ * ```js
+ * var chart1 = echarts.init(dom1);
+ * var chart2 = echarts.init(dom2);
+ * chart1.group = 'xxx';
+ * chart2.group = 'xxx';
+ * echarts.connect('xxx');
+ * ```
+ * (B)
+ * ```js
+ * var chart1 = echarts.init(dom1);
+ * var chart2 = echarts.init(dom2);
+ * echarts.connect('xxx', [chart1, chart2]);
+ * ```
+ */
+export function connect(groupId: string | ECharts[]): string {
     // Is array of charts
     if (zrUtil.isArray(groupId)) {
         var charts = groupId;
@@ -2103,31 +1983,29 @@ export function connect(groupId) {
         });
         groupId = groupId || ('g_' + groupIdBase++);
         each(charts, function (chart) {
-            chart.group = groupId;
+            chart.group = groupId as string;
         });
     }
-    connectedGroups[groupId] = true;
-    return groupId;
+    connectedGroups[groupId as string] = true;
+    return groupId as string;
 }
 
 /**
- * @DEPRECATED
- * @return {string} groupId
+ * @deprecated
  */
-export function disConnect(groupId) {
+export function disConnect(groupId: string): void {
     connectedGroups[groupId] = false;
 }
 
 /**
- * @return {string} groupId
+ * Alias and backword compat
  */
 export var disconnect = disConnect;
 
 /**
  * Dispose a chart instance
- * @param  {module:echarts~ECharts|HTMLDomElement|string} chart
  */
-export function dispose(chart) {
+export function dispose(chart: ECharts | HTMLElement | string): void {
     if (typeof chart === 'string') {
         chart = instances[chart];
     }
@@ -2140,42 +2018,32 @@ export function dispose(chart) {
     }
 }
 
-/**
- * @param  {HTMLElement} dom
- * @return {echarts~ECharts}
- */
-export function getInstanceByDom(dom) {
+export function getInstanceByDom(dom: HTMLElement): ECharts {
     return instances[modelUtil.getAttribute(dom, DOM_ATTRIBUTE_KEY)];
 }
 
-/**
- * @param {string} key
- * @return {echarts~ECharts}
- */
-export function getInstanceById(key) {
+export function getInstanceById(key: string): ECharts {
     return instances[key];
 }
 
 /**
  * Register theme
  */
-export function registerTheme(name, theme) {
+export function registerTheme(name: string, theme: ThemeOption): void {
     themeStorage[name] = theme;
 }
 
 /**
  * Register option preprocessor
- * @param {Function} preprocessorFunc
  */
-export function registerPreprocessor(preprocessorFunc) {
+export function registerPreprocessor(preprocessorFunc: OptionPreprocessor): void {
     optionPreprocessorFuncs.push(preprocessorFunc);
 }
 
-/**
- * @param {number} [priority=1000]
- * @param {Object|Function} processor
- */
-export function registerProcessor(priority, processor) {
+export function registerProcessor(
+    priority: number | StageHandlerInput | StageHandlerOverallReset,
+    processor?: StageHandlerInput | StageHandlerOverallReset
+): void {
     normalizeRegister(dataProcessorFuncs, priority, processor, PRIORITY_PROCESSOR_FILTER);
 }
 
@@ -2183,12 +2051,12 @@ export function registerProcessor(priority, processor) {
  * Register postUpdater
  * @param {Function} postUpdateFunc
  */
-export function registerPostUpdate(postUpdateFunc) {
+export function registerPostUpdate(postUpdateFunc: PostUpdater): void {
     postUpdateFuncs.push(postUpdateFunc);
 }
 
 /**
- * Usage:
+ * @usage
  * registerAction('someAction', 'someEvent', function () { ... });
  * registerAction('someAction', function () { ... });
  * registerAction(
@@ -2203,36 +2071,44 @@ export function registerPostUpdate(postUpdateFunc) {
  * @param {string} [eventName]
  * @param {Function} action
  */
-export function registerAction(actionInfo, eventName, action) {
+export function registerAction(type: string, eventName: string, action: ActionHandler): void;
+export function registerAction(type: string, action: ActionHandler): void;
+export function registerAction(actionInfo: ActionInfo, action: ActionHandler): void;
+export function registerAction(
+    actionInfo: string | ActionInfo,
+    eventName: string | ActionHandler,
+    action?: ActionHandler
+): void {
     if (typeof eventName === 'function') {
         action = eventName;
         eventName = '';
     }
     var actionType = isObject(actionInfo)
-        ? actionInfo.type
+        ? (actionInfo as ActionInfo).type
         : ([actionInfo, actionInfo = {
             event: eventName
-        }][0]);
+        } as ActionInfo][0]);
 
     // Event name is all lowercase
-    actionInfo.event = (actionInfo.event || actionType).toLowerCase();
-    eventName = actionInfo.event;
+    (actionInfo as ActionInfo).event = (
+        (actionInfo as ActionInfo).event || actionType as string
+    ).toLowerCase();
+    eventName = (actionInfo as ActionInfo).event;
 
     // Validate action type and event name.
-    assert(ACTION_REG.test(actionType) && ACTION_REG.test(eventName));
+    assert(ACTION_REG.test(actionType as string) && ACTION_REG.test(eventName));
 
-    if (!actions[actionType]) {
-        actions[actionType] = {action: action, actionInfo: actionInfo};
+    if (!actions[actionType as string]) {
+        actions[actionType as string] = {action: action, actionInfo: actionInfo as ActionInfo};
     }
-    eventActionMap[eventName] = actionType;
+    eventActionMap[eventName as string] = actionType as string;
 }
 
-/**
- * @param {string} type
- * @param {*} CoordinateSystem
- */
-export function registerCoordinateSystem(type, CoordinateSystem) {
-    CoordinateSystemManager.register(type, CoordinateSystem);
+export function registerCoordinateSystem(
+    type: string,
+    coordSysCreator: CoordinateSystemCreator
+): void {
+    CoordinateSystemManager.register(type, coordSysCreator);
 }
 
 /**
@@ -2240,12 +2116,12 @@ export function registerCoordinateSystem(type, CoordinateSystem) {
  * @param {string} type
  * @return {Array.<string|Object>}
  */
-export function getCoordinateSystemDimensions(type) {
+export function getCoordinateSystemDimensions(type: string): DimensionDefinitionLoose[] {
     var coordSysCreator = CoordinateSystemManager.get(type);
     if (coordSysCreator) {
         return coordSysCreator.getDimensionsInfo
-                ? coordSysCreator.getDimensionsInfo()
-                : coordSysCreator.dimensions.slice();
+            ? coordSysCreator.getDimensionsInfo()
+            : coordSysCreator.dimensions.slice();
     }
 }
 
@@ -2253,28 +2129,30 @@ export function getCoordinateSystemDimensions(type) {
  * Layout is a special stage of visual encoding
  * Most visual encoding like color are common for different chart
  * But each chart has it's own layout algorithm
- *
- * @param {number} [priority=1000]
- * @param {Function} layoutTask
  */
-export function registerLayout(priority, layoutTask) {
+export function registerLayout(
+    priority: number | StageHandlerInput | StageHandlerOverallReset,
+    layoutTask?: StageHandlerInput | StageHandlerOverallReset
+): void {
     normalizeRegister(visualFuncs, priority, layoutTask, PRIORITY_VISUAL_LAYOUT, 'layout');
 }
 
-/**
- * @param {number} [priority=3000]
- * @param {module:echarts/stream/Task} visualTask
- */
-export function registerVisual(priority, visualTask) {
+export function registerVisual(
+    priority: number | StageHandlerInput | StageHandlerOverallReset,
+    visualTask?: StageHandlerInput | StageHandlerOverallReset
+): void {
     normalizeRegister(visualFuncs, priority, visualTask, PRIORITY_VISUAL_CHART, 'visual');
 }
 
-/**
- * @param {Object|Function} fn: {seriesType, createOnAllSeries, performRawSeries, reset}
- */
-function normalizeRegister(targetList, priority, fn, defaultPriority, visualType) {
+function normalizeRegister(
+    targetList: StageHandlerInput[],
+    priority: number | StageHandlerInput | StageHandlerOverallReset,
+    fn: StageHandlerInput | StageHandlerOverallReset,
+    defaultPriority: number,
+    visualType?: VisualType
+): void {
     if (isFunction(priority) || isObject(priority)) {
-        fn = priority;
+        fn = priority as (StageHandlerInput | StageHandlerOverallReset);
         priority = defaultPriority;
     }
 
@@ -2284,7 +2162,7 @@ function normalizeRegister(targetList, priority, fn, defaultPriority, visualType
         }
         // Check duplicate
         each(targetList, function (wrap) {
-            assert(wrap.__raw !== fn);
+            assert((wrap as StageHandler).__raw !== fn);
         });
     }
 
@@ -2293,69 +2171,51 @@ function normalizeRegister(targetList, priority, fn, defaultPriority, visualType
     stageHandler.__prio = priority;
     stageHandler.__raw = fn;
     targetList.push(stageHandler);
-
-    return stageHandler;
 }
 
-/**
- * @param {string} name
- */
-export function registerLoading(name, loadingFx) {
+export function registerLoading(
+    name: string,
+    loadingFx: LoadingEffectCreator
+): void {
     loadingEffects[name] = loadingFx;
 }
 
-/**
- * @param {Object} opts
- * @param {string} [superClass]
- */
-export function extendComponentModel(opts/*, superClass*/) {
+export function extendComponentModel(proto: object): ComponentModel {
     // var Clazz = ComponentModel;
     // if (superClass) {
     //     var classType = parseClassType(superClass);
     //     Clazz = ComponentModel.getClass(classType.main, classType.sub, true);
     // }
-    return ComponentModel.extend(opts);
+    return (ComponentModel as ComponentModelConstructor).extend(proto) as any;
 }
 
-/**
- * @param {Object} opts
- * @param {string} [superClass]
- */
-export function extendComponentView(opts/*, superClass*/) {
+export function extendComponentView(proto: object): ChartView {
     // var Clazz = ComponentView;
     // if (superClass) {
     //     var classType = parseClassType(superClass);
     //     Clazz = ComponentView.getClass(classType.main, classType.sub, true);
     // }
-    return ComponentView.extend(opts);
+    return (ComponentView as ComponentViewConstructor).extend(proto) as any;
 }
 
-/**
- * @param {Object} opts
- * @param {string} [superClass]
- */
-export function extendSeriesModel(opts/*, superClass*/) {
+export function extendSeriesModel(proto: object): SeriesModel {
     // var Clazz = SeriesModel;
     // if (superClass) {
     //     superClass = 'series.' + superClass.replace('series.', '');
     //     var classType = parseClassType(superClass);
     //     Clazz = ComponentModel.getClass(classType.main, classType.sub, true);
     // }
-    return SeriesModel.extend(opts);
+    return (SeriesModel as SeriesModelConstructor).extend(proto) as any;
 }
 
-/**
- * @param {Object} opts
- * @param {string} [superClass]
- */
-export function extendChartView(opts/*, superClass*/) {
+export function extendChartView(proto: object): ChartView {
     // var Clazz = ChartView;
     // if (superClass) {
     //     superClass = superClass.replace('series.', '');
     //     var classType = parseClassType(superClass);
     //     Clazz = ChartView.getClass(classType.main, true);
     // }
-    return ChartView.extend(opts);
+    return (ChartView as ChartViewConstructor).extend(proto) as any;
 }
 
 /**
@@ -2365,7 +2225,6 @@ export function extendChartView(opts/*, superClass*/) {
  *
  * Be careful of using it in the browser.
  *
- * @param {Function} creator
  * @example
  *     var Canvas = require('canvas');
  *     var echarts = require('echarts');
@@ -2374,47 +2233,26 @@ export function extendChartView(opts/*, superClass*/) {
  *         return new Canvas(32, 32);
  *     });
  */
-export function setCanvasCreator(creator) {
+export function setCanvasCreator(creator: () => HTMLCanvasElement): void {
     zrUtil.$override('createCanvas', creator);
 }
 
 /**
- * @param {string} mapName
- * @param {Array.<Object>|Object|string} geoJson
- * @param {Object} [specialAreas]
- *
- * @example GeoJSON
- *     $.get('USA.json', function (geoJson) {
- *         echarts.registerMap('USA', geoJson);
- *         // Or
- *         echarts.registerMap('USA', {
- *             geoJson: geoJson,
- *             specialAreas: {}
- *         })
- *     });
- *
- *     $.get('airport.svg', function (svg) {
- *         echarts.registerMap('airport', {
- *             svg: svg
- *         }
- *     });
- *
- *     echarts.registerMap('eu', [
- *         {svg: eu-topographic.svg},
- *         {geoJSON: eu.json}
- *     ])
+ * The parameters and usage: see `mapDataStorage.registerMap`.
+ * Compatible with previous `echarts.registerMap`.
  */
-export function registerMap(mapName, geoJson, specialAreas) {
+export function registerMap(
+    mapName: string,
+    geoJson: GeoMapDefinition | GeoMapDefinition[] | GeoMapGeoJSONSource,
+    specialAreas?: GeoSpecialAreas
+): void {
     mapDataStorage.registerMap(mapName, geoJson, specialAreas);
 }
 
-/**
- * @param {string} mapName
- * @return {Object}
- */
-export function getMap(mapName) {
+export function getMap(mapName: string) {
     // For backward compatibility, only return the first one.
     var records = mapDataStorage.retrieveMap(mapName);
+    // FIXME support SVG
     return records && records[0] && {
         geoJson: records[0].geoJSON,
         specialAreas: records[0].specialAreas
@@ -2447,3 +2285,5 @@ registerTheme('dark', darkTheme);
 // For backward compatibility, where the namespace `dataTool` will
 // be mounted on `echarts` is the extension `dataTool` is imported.
 export var dataTool = {};
+
+export interface EChartsType extends ECharts {}
diff --git a/src/export.ts b/src/export.ts
index 6ddd62e..8313fc8 100644
--- a/src/export.ts
+++ b/src/export.ts
@@ -58,7 +58,7 @@ zrUtil.each(
         'extend', 'defaults', 'clone', 'merge'
     ],
     function (name) {
-        ecUtil[name] = zrUtil[name];
+        (ecUtil as any)[name] = (zrUtil as any)[name];
     }
 );
 export {ecUtil as util};
@@ -91,7 +91,7 @@ zrUtil.each(
         'BoundingRect'
     ],
     function (name) {
-        graphic[name] = graphicUtil[name];
+        (graphic as any)[name] = (graphicUtil as any)[name];
     }
 );
 export {graphic};
diff --git a/src/loading/default.ts b/src/loading/default.ts
index 13d90d5..3ace478 100644
--- a/src/loading/default.ts
+++ b/src/loading/default.ts
@@ -19,6 +19,8 @@
 
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../util/graphic';
+import { LoadingEffect } from '../util/types';
... 6793 lines suppressed ...


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 04/09: ignore npm and esm product.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit a829cd992c7b9f748aba75504ec294cc303ef51d
Author: 100pah <su...@gmail.com>
AuthorDate: Sat Feb 15 11:28:54 2020 +0800

    ignore npm and esm product.
---
 .gitignore | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4097609..320e95b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -172,10 +172,19 @@ node_modules
 map/tool
 map/raw
 theme/thumb
-/lib
-/esm
 pre-publish-tmp
 todo
 **/*.log
 *.sublime-workspace
-*.sublime-project
\ No newline at end of file
+*.sublime-project
+
+/esm
+/echarts.all.js
+/echarts.simple.js
+/echarts.common.js
+/echarts.blank.js
+/lib
+/index.js
+/index.simple.js
+/index.common.js
+/index.blank.js
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 08/09: fix TS semantic error.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit e9a2af6a22490ff2ead7291e784cbb79908ed6cc
Author: 100pah <su...@gmail.com>
AuthorDate: Mon Feb 17 01:38:58 2020 +0800

    fix TS semantic error.
---
 src/util/model.ts | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/util/model.ts b/src/util/model.ts
index 7f7d33c..ccac59b 100644
--- a/src/util/model.ts
+++ b/src/util/model.ts
@@ -613,18 +613,16 @@ export function getTooltipRenderMode(renderModeOption: TooltipRenderMode | 'auto
 
 /**
  * Group a list by key.
- *
- * @param {Array} array
- * @param {Function} getKey
- *        param {*} Array item
- *        return {string} key
- * @return {Object} Result
- *        {Array}: keys,
- *        {module:zrender/core/util/HashMap} buckets: {key -> Array}
  */
-export function groupData(array, getKey) {
-    var buckets = zrUtil.createHashMap();
-    var keys = [];
+export function groupData<T>(
+    array: T[],
+    getKey: (item: T) => string // return key
+): {
+    keys: string[],
+    buckets: zrUtil.HashMap<T[]> // hasmap key: the key returned by `getKey`.
+} {
+    var buckets = zrUtil.createHashMap<T[]>();
+    var keys = [] as string[];
 
     zrUtil.each(array, function (item) {
         var key = getKey(item);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 01/09: rename source code files from js to ts

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 6dc77e1468e6dc6df376d0b6a27d0c43be1e0416
Author: 100pah <su...@gmail.com>
AuthorDate: Mon Feb 3 12:18:13 2020 +0800

    rename source code files from js to ts
---
 echarts.all.js => echarts.all.ts                                          | 0
 echarts.blank.js => echarts.blank.ts                                      | 0
 echarts.common.js => echarts.common.ts                                    | 0
 echarts.simple.js => echarts.simple.ts                                    | 0
 extension-src/bmap/{BMapCoordSys.js => BMapCoordSys.ts}                   | 0
 extension-src/bmap/{BMapModel.js => BMapModel.ts}                         | 0
 extension-src/bmap/{BMapView.js => BMapView.ts}                           | 0
 extension-src/bmap/{bmap.js => bmap.ts}                                   | 0
 extension-src/dataTool/{gexf.js => gexf.ts}                               | 0
 extension-src/dataTool/{index.js => index.ts}                             | 0
 extension-src/dataTool/{prepareBoxplotData.js => prepareBoxplotData.ts}   | 0
 src/{CoordinateSystem.js => CoordinateSystem.ts}                          | 0
 src/{ExtensionAPI.js => ExtensionAPI.ts}                                  | 0
 src/action/{createDataSelectAction.js => createDataSelectAction.ts}       | 0
 src/action/{geoRoam.js => geoRoam.ts}                                     | 0
 src/action/{roamHelper.js => roamHelper.ts}                               | 0
 src/chart/{bar.js => bar.ts}                                              | 0
 src/chart/bar/{BarSeries.js => BarSeries.ts}                              | 0
 src/chart/bar/{BarView.js => BarView.ts}                                  | 0
 src/chart/bar/{BaseBarSeries.js => BaseBarSeries.ts}                      | 0
 src/chart/bar/{PictorialBarSeries.js => PictorialBarSeries.ts}            | 0
 src/chart/bar/{PictorialBarView.js => PictorialBarView.ts}                | 0
 src/chart/bar/{barItemStyle.js => barItemStyle.ts}                        | 0
 src/chart/bar/{helper.js => helper.ts}                                    | 0
 src/chart/{boxplot.js => boxplot.ts}                                      | 0
 src/chart/boxplot/{BoxplotSeries.js => BoxplotSeries.ts}                  | 0
 src/chart/boxplot/{BoxplotView.js => BoxplotView.ts}                      | 0
 src/chart/boxplot/{boxplotLayout.js => boxplotLayout.ts}                  | 0
 src/chart/boxplot/{boxplotVisual.js => boxplotVisual.ts}                  | 0
 src/chart/{candlestick.js => candlestick.ts}                              | 0
 src/chart/candlestick/{CandlestickSeries.js => CandlestickSeries.ts}      | 0
 src/chart/candlestick/{CandlestickView.js => CandlestickView.ts}          | 0
 src/chart/candlestick/{candlestickLayout.js => candlestickLayout.ts}      | 0
 src/chart/candlestick/{candlestickVisual.js => candlestickVisual.ts}      | 0
 src/chart/candlestick/{preprocessor.js => preprocessor.ts}                | 0
 src/chart/{chord.js => chord.ts}                                          | 0
 src/chart/chord/{ChordSeries.js => ChordSeries.ts}                        | 0
 src/chart/chord/{ChordView.js => ChordView.ts}                            | 0
 src/chart/chord/{Ribbon.js => Ribbon.ts}                                  | 0
 src/chart/chord/{chordCircularLayout.js => chordCircularLayout.ts}        | 0
 src/chart/{custom.js => custom.ts}                                        | 0
 src/chart/{effectScatter.js => effectScatter.ts}                          | 0
 .../effectScatter/{EffectScatterSeries.js => EffectScatterSeries.ts}      | 0
 src/chart/effectScatter/{EffectScatterView.js => EffectScatterView.ts}    | 0
 src/chart/{funnel.js => funnel.ts}                                        | 0
 src/chart/funnel/{FunnelSeries.js => FunnelSeries.ts}                     | 0
 src/chart/funnel/{FunnelView.js => FunnelView.ts}                         | 0
 src/chart/funnel/{funnelLayout.js => funnelLayout.ts}                     | 0
 src/chart/{gauge.js => gauge.ts}                                          | 0
 src/chart/gauge/{GaugeSeries.js => GaugeSeries.ts}                        | 0
 src/chart/gauge/{GaugeView.js => GaugeView.ts}                            | 0
 src/chart/gauge/{PointerPath.js => PointerPath.ts}                        | 0
 src/chart/{graph.js => graph.ts}                                          | 0
 src/chart/graph/{GraphSeries.js => GraphSeries.ts}                        | 0
 src/chart/graph/{GraphView.js => GraphView.ts}                            | 0
 src/chart/graph/{adjustEdge.js => adjustEdge.ts}                          | 0
 src/chart/graph/{backwardCompat.js => backwardCompat.ts}                  | 0
 src/chart/graph/{categoryFilter.js => categoryFilter.ts}                  | 0
 src/chart/graph/{categoryVisual.js => categoryVisual.ts}                  | 0
 src/chart/graph/{circularLayout.js => circularLayout.ts}                  | 0
 src/chart/graph/{circularLayoutHelper.js => circularLayoutHelper.ts}      | 0
 src/chart/graph/{createView.js => createView.ts}                          | 0
 src/chart/graph/{edgeVisual.js => edgeVisual.ts}                          | 0
 src/chart/graph/{forceHelper.js => forceHelper.ts}                        | 0
 src/chart/graph/{forceLayout.js => forceLayout.ts}                        | 0
 src/chart/graph/{graphAction.js => graphAction.ts}                        | 0
 src/chart/graph/{graphHelper.js => graphHelper.ts}                        | 0
 src/chart/graph/{simpleLayout.js => simpleLayout.ts}                      | 0
 src/chart/graph/{simpleLayoutHelper.js => simpleLayoutHelper.ts}          | 0
 src/chart/{heatmap.js => heatmap.ts}                                      | 0
 src/chart/heatmap/{HeatmapLayer.js => HeatmapLayer.ts}                    | 0
 src/chart/heatmap/{HeatmapSeries.js => HeatmapSeries.ts}                  | 0
 src/chart/heatmap/{HeatmapView.js => HeatmapView.ts}                      | 0
 src/chart/helper/{EffectLine.js => EffectLine.ts}                         | 0
 src/chart/helper/{EffectPolyline.js => EffectPolyline.ts}                 | 0
 src/chart/helper/{EffectSymbol.js => EffectSymbol.ts}                     | 0
 src/chart/helper/{LargeLineDraw.js => LargeLineDraw.ts}                   | 0
 src/chart/helper/{LargeSymbolDraw.js => LargeSymbolDraw.ts}               | 0
 src/chart/helper/{Line.js => Line.ts}                                     | 0
 src/chart/helper/{LineDraw.js => LineDraw.ts}                             | 0
 src/chart/helper/{LinePath.js => LinePath.ts}                             | 0
 src/chart/helper/{Polyline.js => Polyline.ts}                             | 0
 src/chart/helper/{Symbol.js => Symbol.ts}                                 | 0
 src/chart/helper/{SymbolDraw.js => SymbolDraw.ts}                         | 0
 .../{createClipPathFromCoordSys.js => createClipPathFromCoordSys.ts}      | 0
 .../helper/{createGraphFromNodeEdge.js => createGraphFromNodeEdge.ts}     | 0
 .../helper/{createGraphFromNodeMatrix.js => createGraphFromNodeMatrix.ts} | 0
 src/chart/helper/{createListFromArray.js => createListFromArray.ts}       | 0
 src/chart/helper/{createListSimply.js => createListSimply.ts}             | 0
 src/chart/helper/{createRenderPlanner.js => createRenderPlanner.ts}       | 0
 .../helper/{focusNodeAdjacencyAction.js => focusNodeAdjacencyAction.ts}   | 0
 src/chart/helper/{labelHelper.js => labelHelper.ts}                       | 0
 src/chart/helper/{treeHelper.js => treeHelper.ts}                         | 0
 src/chart/helper/{whiskerBoxCommon.js => whiskerBoxCommon.ts}             | 0
 src/chart/{line.js => line.ts}                                            | 0
 src/chart/line/{LineSeries.js => LineSeries.ts}                           | 0
 src/chart/line/{LineView.js => LineView.ts}                               | 0
 src/chart/line/{helper.js => helper.ts}                                   | 0
 src/chart/line/{lineAnimationDiff.js => lineAnimationDiff.ts}             | 0
 src/chart/line/{poly.js => poly.ts}                                       | 0
 src/chart/{lines.js => lines.ts}                                          | 0
 src/chart/lines/{LinesSeries.js => LinesSeries.ts}                        | 0
 src/chart/lines/{LinesView.js => LinesView.ts}                            | 0
 src/chart/lines/{linesLayout.js => linesLayout.ts}                        | 0
 src/chart/lines/{linesVisual.js => linesVisual.ts}                        | 0
 src/chart/{map.js => map.ts}                                              | 0
 src/chart/map/{MapSeries.js => MapSeries.ts}                              | 0
 src/chart/map/{MapView.js => MapView.ts}                                  | 0
 src/chart/map/{backwardCompat.js => backwardCompat.ts}                    | 0
 src/chart/map/{mapDataStatistic.js => mapDataStatistic.ts}                | 0
 src/chart/map/{mapSymbolLayout.js => mapSymbolLayout.ts}                  | 0
 src/chart/map/{mapVisual.js => mapVisual.ts}                              | 0
 src/chart/{parallel.js => parallel.ts}                                    | 0
 src/chart/parallel/{ParallelSeries.js => ParallelSeries.ts}               | 0
 src/chart/parallel/{ParallelView.js => ParallelView.ts}                   | 0
 src/chart/parallel/{parallelVisual.js => parallelVisual.ts}               | 0
 src/chart/{pictorialBar.js => pictorialBar.ts}                            | 0
 src/chart/{pie.js => pie.ts}                                              | 0
 src/chart/pie/{PieSeries.js => PieSeries.ts}                              | 0
 src/chart/pie/{PieView.js => PieView.ts}                                  | 0
 src/chart/pie/{labelLayout.js => labelLayout.ts}                          | 0
 src/chart/pie/{pieLayout.js => pieLayout.ts}                              | 0
 src/chart/{radar.js => radar.ts}                                          | 0
 src/chart/radar/{RadarSeries.js => RadarSeries.ts}                        | 0
 src/chart/radar/{RadarView.js => RadarView.ts}                            | 0
 src/chart/radar/{backwardCompat.js => backwardCompat.ts}                  | 0
 src/chart/radar/{radarLayout.js => radarLayout.ts}                        | 0
 src/chart/{sankey.js => sankey.ts}                                        | 0
 src/chart/sankey/{SankeySeries.js => SankeySeries.ts}                     | 0
 src/chart/sankey/{SankeyView.js => SankeyView.ts}                         | 0
 src/chart/sankey/{sankeyAction.js => sankeyAction.ts}                     | 0
 src/chart/sankey/{sankeyLayout.js => sankeyLayout.ts}                     | 0
 src/chart/sankey/{sankeyVisual.js => sankeyVisual.ts}                     | 0
 src/chart/{scatter.js => scatter.ts}                                      | 0
 src/chart/scatter/{ScatterSeries.js => ScatterSeries.ts}                  | 0
 src/chart/scatter/{ScatterView.js => ScatterView.ts}                      | 0
 src/chart/{sunburst.js => sunburst.ts}                                    | 0
 src/chart/sunburst/{SunburstPiece.js => SunburstPiece.ts}                 | 0
 src/chart/sunburst/{SunburstSeries.js => SunburstSeries.ts}               | 0
 src/chart/sunburst/{SunburstView.js => SunburstView.ts}                   | 0
 src/chart/sunburst/{sunburstAction.js => sunburstAction.ts}               | 0
 src/chart/sunburst/{sunburstLayout.js => sunburstLayout.ts}               | 0
 src/chart/{themeRiver.js => themeRiver.ts}                                | 0
 src/chart/themeRiver/{ThemeRiverSeries.js => ThemeRiverSeries.ts}         | 0
 src/chart/themeRiver/{ThemeRiverView.js => ThemeRiverView.ts}             | 0
 src/chart/themeRiver/{themeRiverLayout.js => themeRiverLayout.ts}         | 0
 src/chart/themeRiver/{themeRiverVisual.js => themeRiverVisual.ts}         | 0
 src/chart/{tree.js => tree.ts}                                            | 0
 src/chart/tree/{TreeSeries.js => TreeSeries.ts}                           | 0
 src/chart/tree/{TreeView.js => TreeView.ts}                               | 0
 src/chart/tree/{layoutHelper.js => layoutHelper.ts}                       | 0
 src/chart/tree/{traversalHelper.js => traversalHelper.ts}                 | 0
 src/chart/tree/{treeAction.js => treeAction.ts}                           | 0
 src/chart/tree/{treeLayout.js => treeLayout.ts}                           | 0
 src/chart/{treemap.js => treemap.ts}                                      | 0
 src/chart/treemap/{Breadcrumb.js => Breadcrumb.ts}                        | 0
 src/chart/treemap/{TreemapSeries.js => TreemapSeries.ts}                  | 0
 src/chart/treemap/{TreemapView.js => TreemapView.ts}                      | 0
 src/chart/treemap/{helper.js => helper.ts}                                | 0
 src/chart/treemap/{treemapAction.js => treemapAction.ts}                  | 0
 src/chart/treemap/{treemapLayout.js => treemapLayout.ts}                  | 0
 src/chart/treemap/{treemapVisual.js => treemapVisual.ts}                  | 0
 src/component/{angleAxis.js => angleAxis.ts}                              | 0
 src/component/{axis.js => axis.ts}                                        | 0
 src/component/axis/{AngleAxisView.js => AngleAxisView.ts}                 | 0
 src/component/axis/{AxisBuilder.js => AxisBuilder.ts}                     | 0
 src/component/axis/{AxisView.js => AxisView.ts}                           | 0
 src/component/axis/{CartesianAxisView.js => CartesianAxisView.ts}         | 0
 src/component/axis/{ParallelAxisView.js => ParallelAxisView.ts}           | 0
 src/component/axis/{RadiusAxisView.js => RadiusAxisView.ts}               | 0
 src/component/axis/{SingleAxisView.js => SingleAxisView.ts}               | 0
 src/component/axis/{axisSplitHelper.js => axisSplitHelper.ts}             | 0
 src/component/axis/{parallelAxisAction.js => parallelAxisAction.ts}       | 0
 src/component/{axisPointer.js => axisPointer.ts}                          | 0
 src/component/axisPointer/{AxisPointerModel.js => AxisPointerModel.ts}    | 0
 src/component/axisPointer/{AxisPointerView.js => AxisPointerView.ts}      | 0
 src/component/axisPointer/{BaseAxisPointer.js => BaseAxisPointer.ts}      | 0
 .../axisPointer/{CartesianAxisPointer.js => CartesianAxisPointer.ts}      | 0
 src/component/axisPointer/{PolarAxisPointer.js => PolarAxisPointer.ts}    | 0
 src/component/axisPointer/{SingleAxisPointer.js => SingleAxisPointer.ts}  | 0
 src/component/axisPointer/{axisTrigger.js => axisTrigger.ts}              | 0
 .../axisPointer/{findPointFromSeries.js => findPointFromSeries.ts}        | 0
 src/component/axisPointer/{globalListener.js => globalListener.ts}        | 0
 src/component/axisPointer/{modelHelper.js => modelHelper.ts}              | 0
 src/component/axisPointer/{viewHelper.js => viewHelper.ts}                | 0
 src/component/{brush.js => brush.ts}                                      | 0
 src/component/brush/{BrushModel.js => BrushModel.ts}                      | 0
 src/component/brush/{BrushView.js => BrushView.ts}                        | 0
 src/component/brush/{brushAction.js => brushAction.ts}                    | 0
 src/component/brush/{preprocessor.js => preprocessor.ts}                  | 0
 src/component/brush/{selector.js => selector.ts}                          | 0
 src/component/brush/{visualEncoding.js => visualEncoding.ts}              | 0
 src/component/{calendar.js => calendar.ts}                                | 0
 src/component/calendar/{CalendarView.js => CalendarView.ts}               | 0
 src/component/{dataZoom.js => dataZoom.ts}                                | 0
 src/component/dataZoom/{AxisProxy.js => AxisProxy.ts}                     | 0
 src/component/dataZoom/{DataZoomModel.js => DataZoomModel.ts}             | 0
 src/component/dataZoom/{DataZoomView.js => DataZoomView.ts}               | 0
 src/component/dataZoom/{InsideZoomModel.js => InsideZoomModel.ts}         | 0
 src/component/dataZoom/{InsideZoomView.js => InsideZoomView.ts}           | 0
 src/component/dataZoom/{SelectZoomModel.js => SelectZoomModel.ts}         | 0
 src/component/dataZoom/{SelectZoomView.js => SelectZoomView.ts}           | 0
 src/component/dataZoom/{SliderZoomModel.js => SliderZoomModel.ts}         | 0
 src/component/dataZoom/{SliderZoomView.js => SliderZoomView.ts}           | 0
 src/component/dataZoom/{dataZoomAction.js => dataZoomAction.ts}           | 0
 src/component/dataZoom/{dataZoomProcessor.js => dataZoomProcessor.ts}     | 0
 src/component/dataZoom/{helper.js => helper.ts}                           | 0
 src/component/dataZoom/{history.js => history.ts}                         | 0
 src/component/dataZoom/{roams.js => roams.ts}                             | 0
 src/component/dataZoom/{typeDefaulter.js => typeDefaulter.ts}             | 0
 src/component/{dataZoomInside.js => dataZoomInside.ts}                    | 0
 src/component/{dataZoomSelect.js => dataZoomSelect.ts}                    | 0
 src/component/{dataZoomSlider.js => dataZoomSlider.ts}                    | 0
 src/component/{dataset.js => dataset.ts}                                  | 0
 src/component/{geo.js => geo.ts}                                          | 0
 src/component/geo/{GeoView.js => GeoView.ts}                              | 0
 src/component/{graphic.js => graphic.ts}                                  | 0
 src/component/{grid.js => grid.ts}                                        | 0
 src/component/{gridSimple.js => gridSimple.ts}                            | 0
 src/component/helper/{BrushController.js => BrushController.ts}           | 0
 src/component/helper/{BrushTargetManager.js => BrushTargetManager.ts}     | 0
 src/component/helper/{MapDraw.js => MapDraw.ts}                           | 0
 src/component/helper/{RoamController.js => RoamController.ts}             | 0
 src/component/helper/{brushHelper.js => brushHelper.ts}                   | 0
 src/component/helper/{cursorHelper.js => cursorHelper.ts}                 | 0
 src/component/helper/{interactionMutex.js => interactionMutex.ts}         | 0
 src/component/helper/{listComponent.js => listComponent.ts}               | 0
 src/component/helper/{roamHelper.js => roamHelper.ts}                     | 0
 src/component/helper/{selectableMixin.js => selectableMixin.ts}           | 0
 src/component/helper/{sliderMove.js => sliderMove.ts}                     | 0
 src/component/{legend.js => legend.ts}                                    | 0
 src/component/legend/{LegendModel.js => LegendModel.ts}                   | 0
 src/component/legend/{LegendView.js => LegendView.ts}                     | 0
 .../legend/{ScrollableLegendModel.js => ScrollableLegendModel.ts}         | 0
 src/component/legend/{ScrollableLegendView.js => ScrollableLegendView.ts} | 0
 src/component/legend/{legendAction.js => legendAction.ts}                 | 0
 src/component/legend/{legendFilter.js => legendFilter.ts}                 | 0
 .../legend/{scrollableLegendAction.js => scrollableLegendAction.ts}       | 0
 src/component/{legendScroll.js => legendScroll.ts}                        | 0
 src/component/{markArea.js => markArea.ts}                                | 0
 src/component/{markLine.js => markLine.ts}                                | 0
 src/component/{markPoint.js => markPoint.ts}                              | 0
 src/component/marker/{MarkAreaModel.js => MarkAreaModel.ts}               | 0
 src/component/marker/{MarkAreaView.js => MarkAreaView.ts}                 | 0
 src/component/marker/{MarkLineModel.js => MarkLineModel.ts}               | 0
 src/component/marker/{MarkLineView.js => MarkLineView.ts}                 | 0
 src/component/marker/{MarkPointModel.js => MarkPointModel.ts}             | 0
 src/component/marker/{MarkPointView.js => MarkPointView.ts}               | 0
 src/component/marker/{MarkerModel.js => MarkerModel.ts}                   | 0
 src/component/marker/{MarkerView.js => MarkerView.ts}                     | 0
 src/component/marker/{markerHelper.js => markerHelper.ts}                 | 0
 src/component/{parallel.js => parallel.ts}                                | 0
 src/component/{parallelAxis.js => parallelAxis.ts}                        | 0
 src/component/{polar.js => polar.ts}                                      | 0
 src/component/{radar.js => radar.ts}                                      | 0
 src/component/radar/{RadarView.js => RadarView.ts}                        | 0
 src/component/{radiusAxis.js => radiusAxis.ts}                            | 0
 src/component/{singleAxis.js => singleAxis.ts}                            | 0
 src/component/{timeline.js => timeline.ts}                                | 0
 src/component/timeline/{SliderTimelineModel.js => SliderTimelineModel.ts} | 0
 src/component/timeline/{SliderTimelineView.js => SliderTimelineView.ts}   | 0
 src/component/timeline/{TimelineAxis.js => TimelineAxis.ts}               | 0
 src/component/timeline/{TimelineModel.js => TimelineModel.ts}             | 0
 src/component/timeline/{TimelineView.js => TimelineView.ts}               | 0
 src/component/timeline/{preprocessor.js => preprocessor.ts}               | 0
 src/component/timeline/{timelineAction.js => timelineAction.ts}           | 0
 src/component/timeline/{typeDefaulter.js => typeDefaulter.ts}             | 0
 src/component/{title.js => title.ts}                                      | 0
 src/component/{toolbox.js => toolbox.ts}                                  | 0
 src/component/toolbox/{ToolboxModel.js => ToolboxModel.ts}                | 0
 src/component/toolbox/{ToolboxView.js => ToolboxView.ts}                  | 0
 src/component/toolbox/feature/{Brush.js => Brush.ts}                      | 0
 src/component/toolbox/feature/{DataView.js => DataView.ts}                | 0
 src/component/toolbox/feature/{DataZoom.js => DataZoom.ts}                | 0
 src/component/toolbox/feature/{MagicType.js => MagicType.ts}              | 0
 src/component/toolbox/feature/{Restore.js => Restore.ts}                  | 0
 src/component/toolbox/feature/{SaveAsImage.js => SaveAsImage.ts}          | 0
 src/component/toolbox/{featureManager.js => featureManager.ts}            | 0
 src/component/{tooltip.js => tooltip.ts}                                  | 0
 src/component/tooltip/{TooltipContent.js => TooltipContent.ts}            | 0
 src/component/tooltip/{TooltipModel.js => TooltipModel.ts}                | 0
 src/component/tooltip/{TooltipRichContent.js => TooltipRichContent.ts}    | 0
 src/component/tooltip/{TooltipView.js => TooltipView.ts}                  | 0
 src/component/{visualMap.js => visualMap.ts}                              | 0
 src/component/visualMap/{ContinuousModel.js => ContinuousModel.ts}        | 0
 src/component/visualMap/{ContinuousView.js => ContinuousView.ts}          | 0
 src/component/visualMap/{PiecewiseModel.js => PiecewiseModel.ts}          | 0
 src/component/visualMap/{PiecewiseView.js => PiecewiseView.ts}            | 0
 src/component/visualMap/{VisualMapModel.js => VisualMapModel.ts}          | 0
 src/component/visualMap/{VisualMapView.js => VisualMapView.ts}            | 0
 src/component/visualMap/{helper.js => helper.ts}                          | 0
 src/component/visualMap/{preprocessor.js => preprocessor.ts}              | 0
 src/component/visualMap/{typeDefaulter.js => typeDefaulter.ts}            | 0
 src/component/visualMap/{visualEncoding.js => visualEncoding.ts}          | 0
 src/component/visualMap/{visualMapAction.js => visualMapAction.ts}        | 0
 src/component/{visualMapContinuous.js => visualMapContinuous.ts}          | 0
 src/component/{visualMapPiecewise.js => visualMapPiecewise.ts}            | 0
 src/{config.js => config.ts}                                              | 0
 src/coord/{Axis.js => Axis.ts}                                            | 0
 src/coord/{View.js => View.ts}                                            | 0
 src/coord/{axisDefault.js => axisDefault.ts}                              | 0
 src/coord/{axisHelper.js => axisHelper.ts}                                | 0
 src/coord/{axisModelCommonMixin.js => axisModelCommonMixin.ts}            | 0
 src/coord/{axisModelCreator.js => axisModelCreator.ts}                    | 0
 src/coord/{axisTickLabelBuilder.js => axisTickLabelBuilder.ts}            | 0
 src/coord/calendar/{Calendar.js => Calendar.ts}                           | 0
 src/coord/calendar/{CalendarModel.js => CalendarModel.ts}                 | 0
 src/coord/calendar/{prepareCustom.js => prepareCustom.ts}                 | 0
 src/coord/cartesian/{Axis2D.js => Axis2D.ts}                              | 0
 src/coord/cartesian/{AxisModel.js => AxisModel.ts}                        | 0
 src/coord/cartesian/{Cartesian.js => Cartesian.ts}                        | 0
 src/coord/cartesian/{Cartesian2D.js => Cartesian2D.ts}                    | 0
 src/coord/cartesian/{Grid.js => Grid.ts}                                  | 0
 src/coord/cartesian/{GridModel.js => GridModel.ts}                        | 0
 src/coord/cartesian/{cartesianAxisHelper.js => cartesianAxisHelper.ts}    | 0
 src/coord/cartesian/{prepareCustom.js => prepareCustom.ts}                | 0
 src/coord/geo/{Geo.js => Geo.ts}                                          | 0
 src/coord/geo/{GeoModel.js => GeoModel.ts}                                | 0
 src/coord/geo/{Region.js => Region.ts}                                    | 0
 src/coord/geo/fix/{diaoyuIsland.js => diaoyuIsland.ts}                    | 0
 src/coord/geo/fix/{geoCoord.js => geoCoord.ts}                            | 0
 src/coord/geo/fix/{nanhai.js => nanhai.ts}                                | 0
 src/coord/geo/fix/{textCoord.js => textCoord.ts}                          | 0
 src/coord/geo/{geoCreator.js => geoCreator.ts}                            | 0
 src/coord/geo/{geoJSONLoader.js => geoJSONLoader.ts}                      | 0
 src/coord/geo/{geoSVGLoader.js => geoSVGLoader.ts}                        | 0
 src/coord/geo/{geoSourceManager.js => geoSourceManager.ts}                | 0
 src/coord/geo/{mapDataStorage.js => mapDataStorage.ts}                    | 0
 src/coord/geo/{parseGeoJson.js => parseGeoJson.ts}                        | 0
 src/coord/geo/{prepareCustom.js => prepareCustom.ts}                      | 0
 src/coord/parallel/{AxisModel.js => AxisModel.ts}                         | 0
 src/coord/parallel/{Parallel.js => Parallel.ts}                           | 0
 src/coord/parallel/{ParallelAxis.js => ParallelAxis.ts}                   | 0
 src/coord/parallel/{ParallelModel.js => ParallelModel.ts}                 | 0
 src/coord/parallel/{parallelCreator.js => parallelCreator.ts}             | 0
 src/coord/parallel/{parallelPreprocessor.js => parallelPreprocessor.ts}   | 0
 src/coord/polar/{AngleAxis.js => AngleAxis.ts}                            | 0
 src/coord/polar/{AxisModel.js => AxisModel.ts}                            | 0
 src/coord/polar/{Polar.js => Polar.ts}                                    | 0
 src/coord/polar/{PolarModel.js => PolarModel.ts}                          | 0
 src/coord/polar/{RadiusAxis.js => RadiusAxis.ts}                          | 0
 src/coord/polar/{polarCreator.js => polarCreator.ts}                      | 0
 src/coord/polar/{prepareCustom.js => prepareCustom.ts}                    | 0
 src/coord/radar/{IndicatorAxis.js => IndicatorAxis.ts}                    | 0
 src/coord/radar/{Radar.js => Radar.ts}                                    | 0
 src/coord/radar/{RadarModel.js => RadarModel.ts}                          | 0
 src/coord/single/{AxisModel.js => AxisModel.ts}                           | 0
 src/coord/single/{Single.js => Single.ts}                                 | 0
 src/coord/single/{SingleAxis.js => SingleAxis.ts}                         | 0
 src/coord/single/{prepareCustom.js => prepareCustom.ts}                   | 0
 src/coord/single/{singleAxisHelper.js => singleAxisHelper.ts}             | 0
 src/coord/single/{singleCreator.js => singleCreator.ts}                   | 0
 src/data/{DataDiffer.js => DataDiffer.ts}                                 | 0
 src/data/{DataDimensionInfo.js => DataDimensionInfo.ts}                   | 0
 src/data/{Graph.js => Graph.ts}                                           | 0
 src/data/{List.js => List.ts}                                             | 0
 src/data/{OrdinalMeta.js => OrdinalMeta.ts}                               | 0
 src/data/{Source.js => Source.ts}                                         | 0
 src/data/{Tree.js => Tree.ts}                                             | 0
 src/data/helper/{completeDimensions.js => completeDimensions.ts}          | 0
 src/data/helper/{createDimensions.js => createDimensions.ts}              | 0
 src/data/helper/{dataProvider.js => dataProvider.ts}                      | 0
 src/data/helper/{dataStackHelper.js => dataStackHelper.ts}                | 0
 src/data/helper/{dimensionHelper.js => dimensionHelper.ts}                | 0
 src/data/helper/{linkList.js => linkList.ts}                              | 0
 src/data/helper/{sourceHelper.js => sourceHelper.ts}                      | 0
 src/data/helper/{sourceType.js => sourceType.ts}                          | 0
 src/{echarts.js => echarts.ts}                                            | 0
 src/{export.js => export.ts}                                              | 0
 src/{helper.js => helper.ts}                                              | 0
 src/{lang.js => lang.ts}                                                  | 0
 src/{langEN.js => langEN.ts}                                              | 0
 src/{langES.js => langES.ts}                                              | 0
 src/{langFI.js => langFI.ts}                                              | 0
 src/{langTH.js => langTH.ts}                                              | 0
 src/layout/{barGrid.js => barGrid.ts}                                     | 0
 src/layout/{barPolar.js => barPolar.ts}                                   | 0
 src/layout/{points.js => points.ts}                                       | 0
 src/loading/{default.js => default.ts}                                    | 0
 src/model/{Component.js => Component.ts}                                  | 0
 src/model/{Global.js => Global.ts}                                        | 0
 src/model/{Model.js => Model.ts}                                          | 0
 src/model/{OptionManager.js => OptionManager.ts}                          | 0
 src/model/{Series.js => Series.ts}                                        | 0
 src/model/{globalDefault.js => globalDefault.ts}                          | 0
 src/model/mixin/{areaStyle.js => areaStyle.ts}                            | 0
 src/model/mixin/{boxLayout.js => boxLayout.ts}                            | 0
 src/model/mixin/{colorPalette.js => colorPalette.ts}                      | 0
 src/model/mixin/{dataFormat.js => dataFormat.ts}                          | 0
 src/model/mixin/{itemStyle.js => itemStyle.ts}                            | 0
 src/model/mixin/{lineStyle.js => lineStyle.ts}                            | 0
 src/model/mixin/{makeStyleMapper.js => makeStyleMapper.ts}                | 0
 src/model/mixin/{textStyle.js => textStyle.ts}                            | 0
 src/model/{referHelper.js => referHelper.ts}                              | 0
 src/preprocessor/{backwardCompat.js => backwardCompat.ts}                 | 0
 src/preprocessor/helper/{compatStyle.js => compatStyle.ts}                | 0
 src/processor/{dataFilter.js => dataFilter.ts}                            | 0
 src/processor/{dataSample.js => dataSample.ts}                            | 0
 src/processor/{dataStack.js => dataStack.ts}                              | 0
 src/scale/{Interval.js => Interval.ts}                                    | 0
 src/scale/{Log.js => Log.ts}                                              | 0
 src/scale/{Ordinal.js => Ordinal.ts}                                      | 0
 src/scale/{Scale.js => Scale.ts}                                          | 0
 src/scale/{Time.js => Time.ts}                                            | 0
 src/scale/{helper.js => helper.ts}                                        | 0
 src/stream/{Scheduler.js => Scheduler.ts}                                 | 0
 src/stream/{task.js => task.ts}                                           | 0
 src/theme/{dark.js => dark.ts}                                            | 0
 src/theme/{light.js => light.ts}                                          | 0
 src/util/{KDTree.js => KDTree.ts}                                         | 0
 src/util/{animation.js => animation.ts}                                   | 0
 src/util/{clazz.js => clazz.ts}                                           | 0
 src/util/{component.js => component.ts}                                   | 0
 src/util/{format.js => format.ts}                                         | 0
 src/util/{graphic.js => graphic.ts}                                       | 0
 src/util/{layout.js => layout.ts}                                         | 0
 src/util/{model.js => model.ts}                                           | 0
 src/util/{number.js => number.ts}                                         | 0
 src/util/{quickSelect.js => quickSelect.ts}                               | 0
 src/util/shape/{sausage.js => sausage.ts}                                 | 0
 src/util/{symbol.js => symbol.ts}                                         | 0
 src/util/{throttle.js => throttle.ts}                                     | 0
 src/view/{Chart.js => Chart.ts}                                           | 0
 src/view/{Component.js => Component.ts}                                   | 0
 src/visual/{LegendVisualProvider.js => LegendVisualProvider.ts}           | 0
 src/visual/{VisualMapping.js => VisualMapping.ts}                         | 0
 src/visual/{aria.js => aria.ts}                                           | 0
 src/visual/{dataColor.js => dataColor.ts}                                 | 0
 src/visual/{seriesColor.js => seriesColor.ts}                             | 0
 src/visual/{symbol.js => symbol.ts}                                       | 0
 src/visual/{visualDefault.js => visualDefault.ts}                         | 0
 src/visual/{visualSolution.js => visualSolution.ts}                       | 0
 432 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/echarts.all.js b/echarts.all.ts
similarity index 100%
rename from echarts.all.js
rename to echarts.all.ts
diff --git a/echarts.blank.js b/echarts.blank.ts
similarity index 100%
rename from echarts.blank.js
rename to echarts.blank.ts
diff --git a/echarts.common.js b/echarts.common.ts
similarity index 100%
rename from echarts.common.js
rename to echarts.common.ts
diff --git a/echarts.simple.js b/echarts.simple.ts
similarity index 100%
rename from echarts.simple.js
rename to echarts.simple.ts
diff --git a/extension-src/bmap/BMapCoordSys.js b/extension-src/bmap/BMapCoordSys.ts
similarity index 100%
rename from extension-src/bmap/BMapCoordSys.js
rename to extension-src/bmap/BMapCoordSys.ts
diff --git a/extension-src/bmap/BMapModel.js b/extension-src/bmap/BMapModel.ts
similarity index 100%
rename from extension-src/bmap/BMapModel.js
rename to extension-src/bmap/BMapModel.ts
diff --git a/extension-src/bmap/BMapView.js b/extension-src/bmap/BMapView.ts
similarity index 100%
rename from extension-src/bmap/BMapView.js
rename to extension-src/bmap/BMapView.ts
diff --git a/extension-src/bmap/bmap.js b/extension-src/bmap/bmap.ts
similarity index 100%
rename from extension-src/bmap/bmap.js
rename to extension-src/bmap/bmap.ts
diff --git a/extension-src/dataTool/gexf.js b/extension-src/dataTool/gexf.ts
similarity index 100%
rename from extension-src/dataTool/gexf.js
rename to extension-src/dataTool/gexf.ts
diff --git a/extension-src/dataTool/index.js b/extension-src/dataTool/index.ts
similarity index 100%
rename from extension-src/dataTool/index.js
rename to extension-src/dataTool/index.ts
diff --git a/extension-src/dataTool/prepareBoxplotData.js b/extension-src/dataTool/prepareBoxplotData.ts
similarity index 100%
rename from extension-src/dataTool/prepareBoxplotData.js
rename to extension-src/dataTool/prepareBoxplotData.ts
diff --git a/src/CoordinateSystem.js b/src/CoordinateSystem.ts
similarity index 100%
rename from src/CoordinateSystem.js
rename to src/CoordinateSystem.ts
diff --git a/src/ExtensionAPI.js b/src/ExtensionAPI.ts
similarity index 100%
rename from src/ExtensionAPI.js
rename to src/ExtensionAPI.ts
diff --git a/src/action/createDataSelectAction.js b/src/action/createDataSelectAction.ts
similarity index 100%
rename from src/action/createDataSelectAction.js
rename to src/action/createDataSelectAction.ts
diff --git a/src/action/geoRoam.js b/src/action/geoRoam.ts
similarity index 100%
rename from src/action/geoRoam.js
rename to src/action/geoRoam.ts
diff --git a/src/action/roamHelper.js b/src/action/roamHelper.ts
similarity index 100%
rename from src/action/roamHelper.js
rename to src/action/roamHelper.ts
diff --git a/src/chart/bar.js b/src/chart/bar.ts
similarity index 100%
rename from src/chart/bar.js
rename to src/chart/bar.ts
diff --git a/src/chart/bar/BarSeries.js b/src/chart/bar/BarSeries.ts
similarity index 100%
rename from src/chart/bar/BarSeries.js
rename to src/chart/bar/BarSeries.ts
diff --git a/src/chart/bar/BarView.js b/src/chart/bar/BarView.ts
similarity index 100%
rename from src/chart/bar/BarView.js
rename to src/chart/bar/BarView.ts
diff --git a/src/chart/bar/BaseBarSeries.js b/src/chart/bar/BaseBarSeries.ts
similarity index 100%
rename from src/chart/bar/BaseBarSeries.js
rename to src/chart/bar/BaseBarSeries.ts
diff --git a/src/chart/bar/PictorialBarSeries.js b/src/chart/bar/PictorialBarSeries.ts
similarity index 100%
rename from src/chart/bar/PictorialBarSeries.js
rename to src/chart/bar/PictorialBarSeries.ts
diff --git a/src/chart/bar/PictorialBarView.js b/src/chart/bar/PictorialBarView.ts
similarity index 100%
rename from src/chart/bar/PictorialBarView.js
rename to src/chart/bar/PictorialBarView.ts
diff --git a/src/chart/bar/barItemStyle.js b/src/chart/bar/barItemStyle.ts
similarity index 100%
rename from src/chart/bar/barItemStyle.js
rename to src/chart/bar/barItemStyle.ts
diff --git a/src/chart/bar/helper.js b/src/chart/bar/helper.ts
similarity index 100%
rename from src/chart/bar/helper.js
rename to src/chart/bar/helper.ts
diff --git a/src/chart/boxplot.js b/src/chart/boxplot.ts
similarity index 100%
rename from src/chart/boxplot.js
rename to src/chart/boxplot.ts
diff --git a/src/chart/boxplot/BoxplotSeries.js b/src/chart/boxplot/BoxplotSeries.ts
similarity index 100%
rename from src/chart/boxplot/BoxplotSeries.js
rename to src/chart/boxplot/BoxplotSeries.ts
diff --git a/src/chart/boxplot/BoxplotView.js b/src/chart/boxplot/BoxplotView.ts
similarity index 100%
rename from src/chart/boxplot/BoxplotView.js
rename to src/chart/boxplot/BoxplotView.ts
diff --git a/src/chart/boxplot/boxplotLayout.js b/src/chart/boxplot/boxplotLayout.ts
similarity index 100%
rename from src/chart/boxplot/boxplotLayout.js
rename to src/chart/boxplot/boxplotLayout.ts
diff --git a/src/chart/boxplot/boxplotVisual.js b/src/chart/boxplot/boxplotVisual.ts
similarity index 100%
rename from src/chart/boxplot/boxplotVisual.js
rename to src/chart/boxplot/boxplotVisual.ts
diff --git a/src/chart/candlestick.js b/src/chart/candlestick.ts
similarity index 100%
rename from src/chart/candlestick.js
rename to src/chart/candlestick.ts
diff --git a/src/chart/candlestick/CandlestickSeries.js b/src/chart/candlestick/CandlestickSeries.ts
similarity index 100%
rename from src/chart/candlestick/CandlestickSeries.js
rename to src/chart/candlestick/CandlestickSeries.ts
diff --git a/src/chart/candlestick/CandlestickView.js b/src/chart/candlestick/CandlestickView.ts
similarity index 100%
rename from src/chart/candlestick/CandlestickView.js
rename to src/chart/candlestick/CandlestickView.ts
diff --git a/src/chart/candlestick/candlestickLayout.js b/src/chart/candlestick/candlestickLayout.ts
similarity index 100%
rename from src/chart/candlestick/candlestickLayout.js
rename to src/chart/candlestick/candlestickLayout.ts
diff --git a/src/chart/candlestick/candlestickVisual.js b/src/chart/candlestick/candlestickVisual.ts
similarity index 100%
rename from src/chart/candlestick/candlestickVisual.js
rename to src/chart/candlestick/candlestickVisual.ts
diff --git a/src/chart/candlestick/preprocessor.js b/src/chart/candlestick/preprocessor.ts
similarity index 100%
rename from src/chart/candlestick/preprocessor.js
rename to src/chart/candlestick/preprocessor.ts
diff --git a/src/chart/chord.js b/src/chart/chord.ts
similarity index 100%
rename from src/chart/chord.js
rename to src/chart/chord.ts
diff --git a/src/chart/chord/ChordSeries.js b/src/chart/chord/ChordSeries.ts
similarity index 100%
rename from src/chart/chord/ChordSeries.js
rename to src/chart/chord/ChordSeries.ts
diff --git a/src/chart/chord/ChordView.js b/src/chart/chord/ChordView.ts
similarity index 100%
rename from src/chart/chord/ChordView.js
rename to src/chart/chord/ChordView.ts
diff --git a/src/chart/chord/Ribbon.js b/src/chart/chord/Ribbon.ts
similarity index 100%
rename from src/chart/chord/Ribbon.js
rename to src/chart/chord/Ribbon.ts
diff --git a/src/chart/chord/chordCircularLayout.js b/src/chart/chord/chordCircularLayout.ts
similarity index 100%
rename from src/chart/chord/chordCircularLayout.js
rename to src/chart/chord/chordCircularLayout.ts
diff --git a/src/chart/custom.js b/src/chart/custom.ts
similarity index 100%
rename from src/chart/custom.js
rename to src/chart/custom.ts
diff --git a/src/chart/effectScatter.js b/src/chart/effectScatter.ts
similarity index 100%
rename from src/chart/effectScatter.js
rename to src/chart/effectScatter.ts
diff --git a/src/chart/effectScatter/EffectScatterSeries.js b/src/chart/effectScatter/EffectScatterSeries.ts
similarity index 100%
rename from src/chart/effectScatter/EffectScatterSeries.js
rename to src/chart/effectScatter/EffectScatterSeries.ts
diff --git a/src/chart/effectScatter/EffectScatterView.js b/src/chart/effectScatter/EffectScatterView.ts
similarity index 100%
rename from src/chart/effectScatter/EffectScatterView.js
rename to src/chart/effectScatter/EffectScatterView.ts
diff --git a/src/chart/funnel.js b/src/chart/funnel.ts
similarity index 100%
rename from src/chart/funnel.js
rename to src/chart/funnel.ts
diff --git a/src/chart/funnel/FunnelSeries.js b/src/chart/funnel/FunnelSeries.ts
similarity index 100%
rename from src/chart/funnel/FunnelSeries.js
rename to src/chart/funnel/FunnelSeries.ts
diff --git a/src/chart/funnel/FunnelView.js b/src/chart/funnel/FunnelView.ts
similarity index 100%
rename from src/chart/funnel/FunnelView.js
rename to src/chart/funnel/FunnelView.ts
diff --git a/src/chart/funnel/funnelLayout.js b/src/chart/funnel/funnelLayout.ts
similarity index 100%
rename from src/chart/funnel/funnelLayout.js
rename to src/chart/funnel/funnelLayout.ts
diff --git a/src/chart/gauge.js b/src/chart/gauge.ts
similarity index 100%
rename from src/chart/gauge.js
rename to src/chart/gauge.ts
diff --git a/src/chart/gauge/GaugeSeries.js b/src/chart/gauge/GaugeSeries.ts
similarity index 100%
rename from src/chart/gauge/GaugeSeries.js
rename to src/chart/gauge/GaugeSeries.ts
diff --git a/src/chart/gauge/GaugeView.js b/src/chart/gauge/GaugeView.ts
similarity index 100%
rename from src/chart/gauge/GaugeView.js
rename to src/chart/gauge/GaugeView.ts
diff --git a/src/chart/gauge/PointerPath.js b/src/chart/gauge/PointerPath.ts
similarity index 100%
rename from src/chart/gauge/PointerPath.js
rename to src/chart/gauge/PointerPath.ts
diff --git a/src/chart/graph.js b/src/chart/graph.ts
similarity index 100%
rename from src/chart/graph.js
rename to src/chart/graph.ts
diff --git a/src/chart/graph/GraphSeries.js b/src/chart/graph/GraphSeries.ts
similarity index 100%
rename from src/chart/graph/GraphSeries.js
rename to src/chart/graph/GraphSeries.ts
diff --git a/src/chart/graph/GraphView.js b/src/chart/graph/GraphView.ts
similarity index 100%
rename from src/chart/graph/GraphView.js
rename to src/chart/graph/GraphView.ts
diff --git a/src/chart/graph/adjustEdge.js b/src/chart/graph/adjustEdge.ts
similarity index 100%
rename from src/chart/graph/adjustEdge.js
rename to src/chart/graph/adjustEdge.ts
diff --git a/src/chart/graph/backwardCompat.js b/src/chart/graph/backwardCompat.ts
similarity index 100%
rename from src/chart/graph/backwardCompat.js
rename to src/chart/graph/backwardCompat.ts
diff --git a/src/chart/graph/categoryFilter.js b/src/chart/graph/categoryFilter.ts
similarity index 100%
rename from src/chart/graph/categoryFilter.js
rename to src/chart/graph/categoryFilter.ts
diff --git a/src/chart/graph/categoryVisual.js b/src/chart/graph/categoryVisual.ts
similarity index 100%
rename from src/chart/graph/categoryVisual.js
rename to src/chart/graph/categoryVisual.ts
diff --git a/src/chart/graph/circularLayout.js b/src/chart/graph/circularLayout.ts
similarity index 100%
rename from src/chart/graph/circularLayout.js
rename to src/chart/graph/circularLayout.ts
diff --git a/src/chart/graph/circularLayoutHelper.js b/src/chart/graph/circularLayoutHelper.ts
similarity index 100%
rename from src/chart/graph/circularLayoutHelper.js
rename to src/chart/graph/circularLayoutHelper.ts
diff --git a/src/chart/graph/createView.js b/src/chart/graph/createView.ts
similarity index 100%
rename from src/chart/graph/createView.js
rename to src/chart/graph/createView.ts
diff --git a/src/chart/graph/edgeVisual.js b/src/chart/graph/edgeVisual.ts
similarity index 100%
rename from src/chart/graph/edgeVisual.js
rename to src/chart/graph/edgeVisual.ts
diff --git a/src/chart/graph/forceHelper.js b/src/chart/graph/forceHelper.ts
similarity index 100%
rename from src/chart/graph/forceHelper.js
rename to src/chart/graph/forceHelper.ts
diff --git a/src/chart/graph/forceLayout.js b/src/chart/graph/forceLayout.ts
similarity index 100%
rename from src/chart/graph/forceLayout.js
rename to src/chart/graph/forceLayout.ts
diff --git a/src/chart/graph/graphAction.js b/src/chart/graph/graphAction.ts
similarity index 100%
rename from src/chart/graph/graphAction.js
rename to src/chart/graph/graphAction.ts
diff --git a/src/chart/graph/graphHelper.js b/src/chart/graph/graphHelper.ts
similarity index 100%
rename from src/chart/graph/graphHelper.js
rename to src/chart/graph/graphHelper.ts
diff --git a/src/chart/graph/simpleLayout.js b/src/chart/graph/simpleLayout.ts
similarity index 100%
rename from src/chart/graph/simpleLayout.js
rename to src/chart/graph/simpleLayout.ts
diff --git a/src/chart/graph/simpleLayoutHelper.js b/src/chart/graph/simpleLayoutHelper.ts
similarity index 100%
rename from src/chart/graph/simpleLayoutHelper.js
rename to src/chart/graph/simpleLayoutHelper.ts
diff --git a/src/chart/heatmap.js b/src/chart/heatmap.ts
similarity index 100%
rename from src/chart/heatmap.js
rename to src/chart/heatmap.ts
diff --git a/src/chart/heatmap/HeatmapLayer.js b/src/chart/heatmap/HeatmapLayer.ts
similarity index 100%
rename from src/chart/heatmap/HeatmapLayer.js
rename to src/chart/heatmap/HeatmapLayer.ts
diff --git a/src/chart/heatmap/HeatmapSeries.js b/src/chart/heatmap/HeatmapSeries.ts
similarity index 100%
rename from src/chart/heatmap/HeatmapSeries.js
rename to src/chart/heatmap/HeatmapSeries.ts
diff --git a/src/chart/heatmap/HeatmapView.js b/src/chart/heatmap/HeatmapView.ts
similarity index 100%
rename from src/chart/heatmap/HeatmapView.js
rename to src/chart/heatmap/HeatmapView.ts
diff --git a/src/chart/helper/EffectLine.js b/src/chart/helper/EffectLine.ts
similarity index 100%
rename from src/chart/helper/EffectLine.js
rename to src/chart/helper/EffectLine.ts
diff --git a/src/chart/helper/EffectPolyline.js b/src/chart/helper/EffectPolyline.ts
similarity index 100%
rename from src/chart/helper/EffectPolyline.js
rename to src/chart/helper/EffectPolyline.ts
diff --git a/src/chart/helper/EffectSymbol.js b/src/chart/helper/EffectSymbol.ts
similarity index 100%
rename from src/chart/helper/EffectSymbol.js
rename to src/chart/helper/EffectSymbol.ts
diff --git a/src/chart/helper/LargeLineDraw.js b/src/chart/helper/LargeLineDraw.ts
similarity index 100%
rename from src/chart/helper/LargeLineDraw.js
rename to src/chart/helper/LargeLineDraw.ts
diff --git a/src/chart/helper/LargeSymbolDraw.js b/src/chart/helper/LargeSymbolDraw.ts
similarity index 100%
rename from src/chart/helper/LargeSymbolDraw.js
rename to src/chart/helper/LargeSymbolDraw.ts
diff --git a/src/chart/helper/Line.js b/src/chart/helper/Line.ts
similarity index 100%
rename from src/chart/helper/Line.js
rename to src/chart/helper/Line.ts
diff --git a/src/chart/helper/LineDraw.js b/src/chart/helper/LineDraw.ts
similarity index 100%
rename from src/chart/helper/LineDraw.js
rename to src/chart/helper/LineDraw.ts
diff --git a/src/chart/helper/LinePath.js b/src/chart/helper/LinePath.ts
similarity index 100%
rename from src/chart/helper/LinePath.js
rename to src/chart/helper/LinePath.ts
diff --git a/src/chart/helper/Polyline.js b/src/chart/helper/Polyline.ts
similarity index 100%
rename from src/chart/helper/Polyline.js
rename to src/chart/helper/Polyline.ts
diff --git a/src/chart/helper/Symbol.js b/src/chart/helper/Symbol.ts
similarity index 100%
rename from src/chart/helper/Symbol.js
rename to src/chart/helper/Symbol.ts
diff --git a/src/chart/helper/SymbolDraw.js b/src/chart/helper/SymbolDraw.ts
similarity index 100%
rename from src/chart/helper/SymbolDraw.js
rename to src/chart/helper/SymbolDraw.ts
diff --git a/src/chart/helper/createClipPathFromCoordSys.js b/src/chart/helper/createClipPathFromCoordSys.ts
similarity index 100%
rename from src/chart/helper/createClipPathFromCoordSys.js
rename to src/chart/helper/createClipPathFromCoordSys.ts
diff --git a/src/chart/helper/createGraphFromNodeEdge.js b/src/chart/helper/createGraphFromNodeEdge.ts
similarity index 100%
rename from src/chart/helper/createGraphFromNodeEdge.js
rename to src/chart/helper/createGraphFromNodeEdge.ts
diff --git a/src/chart/helper/createGraphFromNodeMatrix.js b/src/chart/helper/createGraphFromNodeMatrix.ts
similarity index 100%
rename from src/chart/helper/createGraphFromNodeMatrix.js
rename to src/chart/helper/createGraphFromNodeMatrix.ts
diff --git a/src/chart/helper/createListFromArray.js b/src/chart/helper/createListFromArray.ts
similarity index 100%
rename from src/chart/helper/createListFromArray.js
rename to src/chart/helper/createListFromArray.ts
diff --git a/src/chart/helper/createListSimply.js b/src/chart/helper/createListSimply.ts
similarity index 100%
rename from src/chart/helper/createListSimply.js
rename to src/chart/helper/createListSimply.ts
diff --git a/src/chart/helper/createRenderPlanner.js b/src/chart/helper/createRenderPlanner.ts
similarity index 100%
rename from src/chart/helper/createRenderPlanner.js
rename to src/chart/helper/createRenderPlanner.ts
diff --git a/src/chart/helper/focusNodeAdjacencyAction.js b/src/chart/helper/focusNodeAdjacencyAction.ts
similarity index 100%
rename from src/chart/helper/focusNodeAdjacencyAction.js
rename to src/chart/helper/focusNodeAdjacencyAction.ts
diff --git a/src/chart/helper/labelHelper.js b/src/chart/helper/labelHelper.ts
similarity index 100%
rename from src/chart/helper/labelHelper.js
rename to src/chart/helper/labelHelper.ts
diff --git a/src/chart/helper/treeHelper.js b/src/chart/helper/treeHelper.ts
similarity index 100%
rename from src/chart/helper/treeHelper.js
rename to src/chart/helper/treeHelper.ts
diff --git a/src/chart/helper/whiskerBoxCommon.js b/src/chart/helper/whiskerBoxCommon.ts
similarity index 100%
rename from src/chart/helper/whiskerBoxCommon.js
rename to src/chart/helper/whiskerBoxCommon.ts
diff --git a/src/chart/line.js b/src/chart/line.ts
similarity index 100%
rename from src/chart/line.js
rename to src/chart/line.ts
diff --git a/src/chart/line/LineSeries.js b/src/chart/line/LineSeries.ts
similarity index 100%
rename from src/chart/line/LineSeries.js
rename to src/chart/line/LineSeries.ts
diff --git a/src/chart/line/LineView.js b/src/chart/line/LineView.ts
similarity index 100%
rename from src/chart/line/LineView.js
rename to src/chart/line/LineView.ts
diff --git a/src/chart/line/helper.js b/src/chart/line/helper.ts
similarity index 100%
rename from src/chart/line/helper.js
rename to src/chart/line/helper.ts
diff --git a/src/chart/line/lineAnimationDiff.js b/src/chart/line/lineAnimationDiff.ts
similarity index 100%
rename from src/chart/line/lineAnimationDiff.js
rename to src/chart/line/lineAnimationDiff.ts
diff --git a/src/chart/line/poly.js b/src/chart/line/poly.ts
similarity index 100%
rename from src/chart/line/poly.js
rename to src/chart/line/poly.ts
diff --git a/src/chart/lines.js b/src/chart/lines.ts
similarity index 100%
rename from src/chart/lines.js
rename to src/chart/lines.ts
diff --git a/src/chart/lines/LinesSeries.js b/src/chart/lines/LinesSeries.ts
similarity index 100%
rename from src/chart/lines/LinesSeries.js
rename to src/chart/lines/LinesSeries.ts
diff --git a/src/chart/lines/LinesView.js b/src/chart/lines/LinesView.ts
similarity index 100%
rename from src/chart/lines/LinesView.js
rename to src/chart/lines/LinesView.ts
diff --git a/src/chart/lines/linesLayout.js b/src/chart/lines/linesLayout.ts
similarity index 100%
rename from src/chart/lines/linesLayout.js
rename to src/chart/lines/linesLayout.ts
diff --git a/src/chart/lines/linesVisual.js b/src/chart/lines/linesVisual.ts
similarity index 100%
rename from src/chart/lines/linesVisual.js
rename to src/chart/lines/linesVisual.ts
diff --git a/src/chart/map.js b/src/chart/map.ts
similarity index 100%
rename from src/chart/map.js
rename to src/chart/map.ts
diff --git a/src/chart/map/MapSeries.js b/src/chart/map/MapSeries.ts
similarity index 100%
rename from src/chart/map/MapSeries.js
rename to src/chart/map/MapSeries.ts
diff --git a/src/chart/map/MapView.js b/src/chart/map/MapView.ts
similarity index 100%
rename from src/chart/map/MapView.js
rename to src/chart/map/MapView.ts
diff --git a/src/chart/map/backwardCompat.js b/src/chart/map/backwardCompat.ts
similarity index 100%
rename from src/chart/map/backwardCompat.js
rename to src/chart/map/backwardCompat.ts
diff --git a/src/chart/map/mapDataStatistic.js b/src/chart/map/mapDataStatistic.ts
similarity index 100%
rename from src/chart/map/mapDataStatistic.js
rename to src/chart/map/mapDataStatistic.ts
diff --git a/src/chart/map/mapSymbolLayout.js b/src/chart/map/mapSymbolLayout.ts
similarity index 100%
rename from src/chart/map/mapSymbolLayout.js
rename to src/chart/map/mapSymbolLayout.ts
diff --git a/src/chart/map/mapVisual.js b/src/chart/map/mapVisual.ts
similarity index 100%
rename from src/chart/map/mapVisual.js
rename to src/chart/map/mapVisual.ts
diff --git a/src/chart/parallel.js b/src/chart/parallel.ts
similarity index 100%
rename from src/chart/parallel.js
rename to src/chart/parallel.ts
diff --git a/src/chart/parallel/ParallelSeries.js b/src/chart/parallel/ParallelSeries.ts
similarity index 100%
rename from src/chart/parallel/ParallelSeries.js
rename to src/chart/parallel/ParallelSeries.ts
diff --git a/src/chart/parallel/ParallelView.js b/src/chart/parallel/ParallelView.ts
similarity index 100%
rename from src/chart/parallel/ParallelView.js
rename to src/chart/parallel/ParallelView.ts
diff --git a/src/chart/parallel/parallelVisual.js b/src/chart/parallel/parallelVisual.ts
similarity index 100%
rename from src/chart/parallel/parallelVisual.js
rename to src/chart/parallel/parallelVisual.ts
diff --git a/src/chart/pictorialBar.js b/src/chart/pictorialBar.ts
similarity index 100%
rename from src/chart/pictorialBar.js
rename to src/chart/pictorialBar.ts
diff --git a/src/chart/pie.js b/src/chart/pie.ts
similarity index 100%
rename from src/chart/pie.js
rename to src/chart/pie.ts
diff --git a/src/chart/pie/PieSeries.js b/src/chart/pie/PieSeries.ts
similarity index 100%
rename from src/chart/pie/PieSeries.js
rename to src/chart/pie/PieSeries.ts
diff --git a/src/chart/pie/PieView.js b/src/chart/pie/PieView.ts
similarity index 100%
rename from src/chart/pie/PieView.js
rename to src/chart/pie/PieView.ts
diff --git a/src/chart/pie/labelLayout.js b/src/chart/pie/labelLayout.ts
similarity index 100%
rename from src/chart/pie/labelLayout.js
rename to src/chart/pie/labelLayout.ts
diff --git a/src/chart/pie/pieLayout.js b/src/chart/pie/pieLayout.ts
similarity index 100%
rename from src/chart/pie/pieLayout.js
rename to src/chart/pie/pieLayout.ts
diff --git a/src/chart/radar.js b/src/chart/radar.ts
similarity index 100%
rename from src/chart/radar.js
rename to src/chart/radar.ts
diff --git a/src/chart/radar/RadarSeries.js b/src/chart/radar/RadarSeries.ts
similarity index 100%
rename from src/chart/radar/RadarSeries.js
rename to src/chart/radar/RadarSeries.ts
diff --git a/src/chart/radar/RadarView.js b/src/chart/radar/RadarView.ts
similarity index 100%
rename from src/chart/radar/RadarView.js
rename to src/chart/radar/RadarView.ts
diff --git a/src/chart/radar/backwardCompat.js b/src/chart/radar/backwardCompat.ts
similarity index 100%
rename from src/chart/radar/backwardCompat.js
rename to src/chart/radar/backwardCompat.ts
diff --git a/src/chart/radar/radarLayout.js b/src/chart/radar/radarLayout.ts
similarity index 100%
rename from src/chart/radar/radarLayout.js
rename to src/chart/radar/radarLayout.ts
diff --git a/src/chart/sankey.js b/src/chart/sankey.ts
similarity index 100%
rename from src/chart/sankey.js
rename to src/chart/sankey.ts
diff --git a/src/chart/sankey/SankeySeries.js b/src/chart/sankey/SankeySeries.ts
similarity index 100%
rename from src/chart/sankey/SankeySeries.js
rename to src/chart/sankey/SankeySeries.ts
diff --git a/src/chart/sankey/SankeyView.js b/src/chart/sankey/SankeyView.ts
similarity index 100%
rename from src/chart/sankey/SankeyView.js
rename to src/chart/sankey/SankeyView.ts
diff --git a/src/chart/sankey/sankeyAction.js b/src/chart/sankey/sankeyAction.ts
similarity index 100%
rename from src/chart/sankey/sankeyAction.js
rename to src/chart/sankey/sankeyAction.ts
diff --git a/src/chart/sankey/sankeyLayout.js b/src/chart/sankey/sankeyLayout.ts
similarity index 100%
rename from src/chart/sankey/sankeyLayout.js
rename to src/chart/sankey/sankeyLayout.ts
diff --git a/src/chart/sankey/sankeyVisual.js b/src/chart/sankey/sankeyVisual.ts
similarity index 100%
rename from src/chart/sankey/sankeyVisual.js
rename to src/chart/sankey/sankeyVisual.ts
diff --git a/src/chart/scatter.js b/src/chart/scatter.ts
similarity index 100%
rename from src/chart/scatter.js
rename to src/chart/scatter.ts
diff --git a/src/chart/scatter/ScatterSeries.js b/src/chart/scatter/ScatterSeries.ts
similarity index 100%
rename from src/chart/scatter/ScatterSeries.js
rename to src/chart/scatter/ScatterSeries.ts
diff --git a/src/chart/scatter/ScatterView.js b/src/chart/scatter/ScatterView.ts
similarity index 100%
rename from src/chart/scatter/ScatterView.js
rename to src/chart/scatter/ScatterView.ts
diff --git a/src/chart/sunburst.js b/src/chart/sunburst.ts
similarity index 100%
rename from src/chart/sunburst.js
rename to src/chart/sunburst.ts
diff --git a/src/chart/sunburst/SunburstPiece.js b/src/chart/sunburst/SunburstPiece.ts
similarity index 100%
rename from src/chart/sunburst/SunburstPiece.js
rename to src/chart/sunburst/SunburstPiece.ts
diff --git a/src/chart/sunburst/SunburstSeries.js b/src/chart/sunburst/SunburstSeries.ts
similarity index 100%
rename from src/chart/sunburst/SunburstSeries.js
rename to src/chart/sunburst/SunburstSeries.ts
diff --git a/src/chart/sunburst/SunburstView.js b/src/chart/sunburst/SunburstView.ts
similarity index 100%
rename from src/chart/sunburst/SunburstView.js
rename to src/chart/sunburst/SunburstView.ts
diff --git a/src/chart/sunburst/sunburstAction.js b/src/chart/sunburst/sunburstAction.ts
similarity index 100%
rename from src/chart/sunburst/sunburstAction.js
rename to src/chart/sunburst/sunburstAction.ts
diff --git a/src/chart/sunburst/sunburstLayout.js b/src/chart/sunburst/sunburstLayout.ts
similarity index 100%
rename from src/chart/sunburst/sunburstLayout.js
rename to src/chart/sunburst/sunburstLayout.ts
diff --git a/src/chart/themeRiver.js b/src/chart/themeRiver.ts
similarity index 100%
rename from src/chart/themeRiver.js
rename to src/chart/themeRiver.ts
diff --git a/src/chart/themeRiver/ThemeRiverSeries.js b/src/chart/themeRiver/ThemeRiverSeries.ts
similarity index 100%
rename from src/chart/themeRiver/ThemeRiverSeries.js
rename to src/chart/themeRiver/ThemeRiverSeries.ts
diff --git a/src/chart/themeRiver/ThemeRiverView.js b/src/chart/themeRiver/ThemeRiverView.ts
similarity index 100%
rename from src/chart/themeRiver/ThemeRiverView.js
rename to src/chart/themeRiver/ThemeRiverView.ts
diff --git a/src/chart/themeRiver/themeRiverLayout.js b/src/chart/themeRiver/themeRiverLayout.ts
similarity index 100%
rename from src/chart/themeRiver/themeRiverLayout.js
rename to src/chart/themeRiver/themeRiverLayout.ts
diff --git a/src/chart/themeRiver/themeRiverVisual.js b/src/chart/themeRiver/themeRiverVisual.ts
similarity index 100%
rename from src/chart/themeRiver/themeRiverVisual.js
rename to src/chart/themeRiver/themeRiverVisual.ts
diff --git a/src/chart/tree.js b/src/chart/tree.ts
similarity index 100%
rename from src/chart/tree.js
rename to src/chart/tree.ts
diff --git a/src/chart/tree/TreeSeries.js b/src/chart/tree/TreeSeries.ts
similarity index 100%
rename from src/chart/tree/TreeSeries.js
rename to src/chart/tree/TreeSeries.ts
diff --git a/src/chart/tree/TreeView.js b/src/chart/tree/TreeView.ts
similarity index 100%
rename from src/chart/tree/TreeView.js
rename to src/chart/tree/TreeView.ts
diff --git a/src/chart/tree/layoutHelper.js b/src/chart/tree/layoutHelper.ts
similarity index 100%
rename from src/chart/tree/layoutHelper.js
rename to src/chart/tree/layoutHelper.ts
diff --git a/src/chart/tree/traversalHelper.js b/src/chart/tree/traversalHelper.ts
similarity index 100%
rename from src/chart/tree/traversalHelper.js
rename to src/chart/tree/traversalHelper.ts
diff --git a/src/chart/tree/treeAction.js b/src/chart/tree/treeAction.ts
similarity index 100%
rename from src/chart/tree/treeAction.js
rename to src/chart/tree/treeAction.ts
diff --git a/src/chart/tree/treeLayout.js b/src/chart/tree/treeLayout.ts
similarity index 100%
rename from src/chart/tree/treeLayout.js
rename to src/chart/tree/treeLayout.ts
diff --git a/src/chart/treemap.js b/src/chart/treemap.ts
similarity index 100%
rename from src/chart/treemap.js
rename to src/chart/treemap.ts
diff --git a/src/chart/treemap/Breadcrumb.js b/src/chart/treemap/Breadcrumb.ts
similarity index 100%
rename from src/chart/treemap/Breadcrumb.js
rename to src/chart/treemap/Breadcrumb.ts
diff --git a/src/chart/treemap/TreemapSeries.js b/src/chart/treemap/TreemapSeries.ts
similarity index 100%
rename from src/chart/treemap/TreemapSeries.js
rename to src/chart/treemap/TreemapSeries.ts
diff --git a/src/chart/treemap/TreemapView.js b/src/chart/treemap/TreemapView.ts
similarity index 100%
rename from src/chart/treemap/TreemapView.js
rename to src/chart/treemap/TreemapView.ts
diff --git a/src/chart/treemap/helper.js b/src/chart/treemap/helper.ts
similarity index 100%
rename from src/chart/treemap/helper.js
rename to src/chart/treemap/helper.ts
diff --git a/src/chart/treemap/treemapAction.js b/src/chart/treemap/treemapAction.ts
similarity index 100%
rename from src/chart/treemap/treemapAction.js
rename to src/chart/treemap/treemapAction.ts
diff --git a/src/chart/treemap/treemapLayout.js b/src/chart/treemap/treemapLayout.ts
similarity index 100%
rename from src/chart/treemap/treemapLayout.js
rename to src/chart/treemap/treemapLayout.ts
diff --git a/src/chart/treemap/treemapVisual.js b/src/chart/treemap/treemapVisual.ts
similarity index 100%
rename from src/chart/treemap/treemapVisual.js
rename to src/chart/treemap/treemapVisual.ts
diff --git a/src/component/angleAxis.js b/src/component/angleAxis.ts
similarity index 100%
rename from src/component/angleAxis.js
rename to src/component/angleAxis.ts
diff --git a/src/component/axis.js b/src/component/axis.ts
similarity index 100%
rename from src/component/axis.js
rename to src/component/axis.ts
diff --git a/src/component/axis/AngleAxisView.js b/src/component/axis/AngleAxisView.ts
similarity index 100%
rename from src/component/axis/AngleAxisView.js
rename to src/component/axis/AngleAxisView.ts
diff --git a/src/component/axis/AxisBuilder.js b/src/component/axis/AxisBuilder.ts
similarity index 100%
rename from src/component/axis/AxisBuilder.js
rename to src/component/axis/AxisBuilder.ts
diff --git a/src/component/axis/AxisView.js b/src/component/axis/AxisView.ts
similarity index 100%
rename from src/component/axis/AxisView.js
rename to src/component/axis/AxisView.ts
diff --git a/src/component/axis/CartesianAxisView.js b/src/component/axis/CartesianAxisView.ts
similarity index 100%
rename from src/component/axis/CartesianAxisView.js
rename to src/component/axis/CartesianAxisView.ts
diff --git a/src/component/axis/ParallelAxisView.js b/src/component/axis/ParallelAxisView.ts
similarity index 100%
rename from src/component/axis/ParallelAxisView.js
rename to src/component/axis/ParallelAxisView.ts
diff --git a/src/component/axis/RadiusAxisView.js b/src/component/axis/RadiusAxisView.ts
similarity index 100%
rename from src/component/axis/RadiusAxisView.js
rename to src/component/axis/RadiusAxisView.ts
diff --git a/src/component/axis/SingleAxisView.js b/src/component/axis/SingleAxisView.ts
similarity index 100%
rename from src/component/axis/SingleAxisView.js
rename to src/component/axis/SingleAxisView.ts
diff --git a/src/component/axis/axisSplitHelper.js b/src/component/axis/axisSplitHelper.ts
similarity index 100%
rename from src/component/axis/axisSplitHelper.js
rename to src/component/axis/axisSplitHelper.ts
diff --git a/src/component/axis/parallelAxisAction.js b/src/component/axis/parallelAxisAction.ts
similarity index 100%
rename from src/component/axis/parallelAxisAction.js
rename to src/component/axis/parallelAxisAction.ts
diff --git a/src/component/axisPointer.js b/src/component/axisPointer.ts
similarity index 100%
rename from src/component/axisPointer.js
rename to src/component/axisPointer.ts
diff --git a/src/component/axisPointer/AxisPointerModel.js b/src/component/axisPointer/AxisPointerModel.ts
similarity index 100%
rename from src/component/axisPointer/AxisPointerModel.js
rename to src/component/axisPointer/AxisPointerModel.ts
diff --git a/src/component/axisPointer/AxisPointerView.js b/src/component/axisPointer/AxisPointerView.ts
similarity index 100%
rename from src/component/axisPointer/AxisPointerView.js
rename to src/component/axisPointer/AxisPointerView.ts
diff --git a/src/component/axisPointer/BaseAxisPointer.js b/src/component/axisPointer/BaseAxisPointer.ts
similarity index 100%
rename from src/component/axisPointer/BaseAxisPointer.js
rename to src/component/axisPointer/BaseAxisPointer.ts
diff --git a/src/component/axisPointer/CartesianAxisPointer.js b/src/component/axisPointer/CartesianAxisPointer.ts
similarity index 100%
rename from src/component/axisPointer/CartesianAxisPointer.js
rename to src/component/axisPointer/CartesianAxisPointer.ts
diff --git a/src/component/axisPointer/PolarAxisPointer.js b/src/component/axisPointer/PolarAxisPointer.ts
similarity index 100%
rename from src/component/axisPointer/PolarAxisPointer.js
rename to src/component/axisPointer/PolarAxisPointer.ts
diff --git a/src/component/axisPointer/SingleAxisPointer.js b/src/component/axisPointer/SingleAxisPointer.ts
similarity index 100%
rename from src/component/axisPointer/SingleAxisPointer.js
rename to src/component/axisPointer/SingleAxisPointer.ts
diff --git a/src/component/axisPointer/axisTrigger.js b/src/component/axisPointer/axisTrigger.ts
similarity index 100%
rename from src/component/axisPointer/axisTrigger.js
rename to src/component/axisPointer/axisTrigger.ts
diff --git a/src/component/axisPointer/findPointFromSeries.js b/src/component/axisPointer/findPointFromSeries.ts
similarity index 100%
rename from src/component/axisPointer/findPointFromSeries.js
rename to src/component/axisPointer/findPointFromSeries.ts
diff --git a/src/component/axisPointer/globalListener.js b/src/component/axisPointer/globalListener.ts
similarity index 100%
rename from src/component/axisPointer/globalListener.js
rename to src/component/axisPointer/globalListener.ts
diff --git a/src/component/axisPointer/modelHelper.js b/src/component/axisPointer/modelHelper.ts
similarity index 100%
rename from src/component/axisPointer/modelHelper.js
rename to src/component/axisPointer/modelHelper.ts
diff --git a/src/component/axisPointer/viewHelper.js b/src/component/axisPointer/viewHelper.ts
similarity index 100%
rename from src/component/axisPointer/viewHelper.js
rename to src/component/axisPointer/viewHelper.ts
diff --git a/src/component/brush.js b/src/component/brush.ts
similarity index 100%
rename from src/component/brush.js
rename to src/component/brush.ts
diff --git a/src/component/brush/BrushModel.js b/src/component/brush/BrushModel.ts
similarity index 100%
rename from src/component/brush/BrushModel.js
rename to src/component/brush/BrushModel.ts
diff --git a/src/component/brush/BrushView.js b/src/component/brush/BrushView.ts
similarity index 100%
rename from src/component/brush/BrushView.js
rename to src/component/brush/BrushView.ts
diff --git a/src/component/brush/brushAction.js b/src/component/brush/brushAction.ts
similarity index 100%
rename from src/component/brush/brushAction.js
rename to src/component/brush/brushAction.ts
diff --git a/src/component/brush/preprocessor.js b/src/component/brush/preprocessor.ts
similarity index 100%
rename from src/component/brush/preprocessor.js
rename to src/component/brush/preprocessor.ts
diff --git a/src/component/brush/selector.js b/src/component/brush/selector.ts
similarity index 100%
rename from src/component/brush/selector.js
rename to src/component/brush/selector.ts
diff --git a/src/component/brush/visualEncoding.js b/src/component/brush/visualEncoding.ts
similarity index 100%
rename from src/component/brush/visualEncoding.js
rename to src/component/brush/visualEncoding.ts
diff --git a/src/component/calendar.js b/src/component/calendar.ts
similarity index 100%
rename from src/component/calendar.js
rename to src/component/calendar.ts
diff --git a/src/component/calendar/CalendarView.js b/src/component/calendar/CalendarView.ts
similarity index 100%
rename from src/component/calendar/CalendarView.js
rename to src/component/calendar/CalendarView.ts
diff --git a/src/component/dataZoom.js b/src/component/dataZoom.ts
similarity index 100%
rename from src/component/dataZoom.js
rename to src/component/dataZoom.ts
diff --git a/src/component/dataZoom/AxisProxy.js b/src/component/dataZoom/AxisProxy.ts
similarity index 100%
rename from src/component/dataZoom/AxisProxy.js
rename to src/component/dataZoom/AxisProxy.ts
diff --git a/src/component/dataZoom/DataZoomModel.js b/src/component/dataZoom/DataZoomModel.ts
similarity index 100%
rename from src/component/dataZoom/DataZoomModel.js
rename to src/component/dataZoom/DataZoomModel.ts
diff --git a/src/component/dataZoom/DataZoomView.js b/src/component/dataZoom/DataZoomView.ts
similarity index 100%
rename from src/component/dataZoom/DataZoomView.js
rename to src/component/dataZoom/DataZoomView.ts
diff --git a/src/component/dataZoom/InsideZoomModel.js b/src/component/dataZoom/InsideZoomModel.ts
similarity index 100%
rename from src/component/dataZoom/InsideZoomModel.js
rename to src/component/dataZoom/InsideZoomModel.ts
diff --git a/src/component/dataZoom/InsideZoomView.js b/src/component/dataZoom/InsideZoomView.ts
similarity index 100%
rename from src/component/dataZoom/InsideZoomView.js
rename to src/component/dataZoom/InsideZoomView.ts
diff --git a/src/component/dataZoom/SelectZoomModel.js b/src/component/dataZoom/SelectZoomModel.ts
similarity index 100%
rename from src/component/dataZoom/SelectZoomModel.js
rename to src/component/dataZoom/SelectZoomModel.ts
diff --git a/src/component/dataZoom/SelectZoomView.js b/src/component/dataZoom/SelectZoomView.ts
similarity index 100%
rename from src/component/dataZoom/SelectZoomView.js
rename to src/component/dataZoom/SelectZoomView.ts
diff --git a/src/component/dataZoom/SliderZoomModel.js b/src/component/dataZoom/SliderZoomModel.ts
similarity index 100%
rename from src/component/dataZoom/SliderZoomModel.js
rename to src/component/dataZoom/SliderZoomModel.ts
diff --git a/src/component/dataZoom/SliderZoomView.js b/src/component/dataZoom/SliderZoomView.ts
similarity index 100%
rename from src/component/dataZoom/SliderZoomView.js
rename to src/component/dataZoom/SliderZoomView.ts
diff --git a/src/component/dataZoom/dataZoomAction.js b/src/component/dataZoom/dataZoomAction.ts
similarity index 100%
rename from src/component/dataZoom/dataZoomAction.js
rename to src/component/dataZoom/dataZoomAction.ts
diff --git a/src/component/dataZoom/dataZoomProcessor.js b/src/component/dataZoom/dataZoomProcessor.ts
similarity index 100%
rename from src/component/dataZoom/dataZoomProcessor.js
rename to src/component/dataZoom/dataZoomProcessor.ts
diff --git a/src/component/dataZoom/helper.js b/src/component/dataZoom/helper.ts
similarity index 100%
rename from src/component/dataZoom/helper.js
rename to src/component/dataZoom/helper.ts
diff --git a/src/component/dataZoom/history.js b/src/component/dataZoom/history.ts
similarity index 100%
rename from src/component/dataZoom/history.js
rename to src/component/dataZoom/history.ts
diff --git a/src/component/dataZoom/roams.js b/src/component/dataZoom/roams.ts
similarity index 100%
rename from src/component/dataZoom/roams.js
rename to src/component/dataZoom/roams.ts
diff --git a/src/component/dataZoom/typeDefaulter.js b/src/component/dataZoom/typeDefaulter.ts
similarity index 100%
rename from src/component/dataZoom/typeDefaulter.js
rename to src/component/dataZoom/typeDefaulter.ts
diff --git a/src/component/dataZoomInside.js b/src/component/dataZoomInside.ts
similarity index 100%
rename from src/component/dataZoomInside.js
rename to src/component/dataZoomInside.ts
diff --git a/src/component/dataZoomSelect.js b/src/component/dataZoomSelect.ts
similarity index 100%
rename from src/component/dataZoomSelect.js
rename to src/component/dataZoomSelect.ts
diff --git a/src/component/dataZoomSlider.js b/src/component/dataZoomSlider.ts
similarity index 100%
rename from src/component/dataZoomSlider.js
rename to src/component/dataZoomSlider.ts
diff --git a/src/component/dataset.js b/src/component/dataset.ts
similarity index 100%
rename from src/component/dataset.js
rename to src/component/dataset.ts
diff --git a/src/component/geo.js b/src/component/geo.ts
similarity index 100%
rename from src/component/geo.js
rename to src/component/geo.ts
diff --git a/src/component/geo/GeoView.js b/src/component/geo/GeoView.ts
similarity index 100%
rename from src/component/geo/GeoView.js
rename to src/component/geo/GeoView.ts
diff --git a/src/component/graphic.js b/src/component/graphic.ts
similarity index 100%
rename from src/component/graphic.js
rename to src/component/graphic.ts
diff --git a/src/component/grid.js b/src/component/grid.ts
similarity index 100%
rename from src/component/grid.js
rename to src/component/grid.ts
diff --git a/src/component/gridSimple.js b/src/component/gridSimple.ts
similarity index 100%
rename from src/component/gridSimple.js
rename to src/component/gridSimple.ts
diff --git a/src/component/helper/BrushController.js b/src/component/helper/BrushController.ts
similarity index 100%
rename from src/component/helper/BrushController.js
rename to src/component/helper/BrushController.ts
diff --git a/src/component/helper/BrushTargetManager.js b/src/component/helper/BrushTargetManager.ts
similarity index 100%
rename from src/component/helper/BrushTargetManager.js
rename to src/component/helper/BrushTargetManager.ts
diff --git a/src/component/helper/MapDraw.js b/src/component/helper/MapDraw.ts
similarity index 100%
rename from src/component/helper/MapDraw.js
rename to src/component/helper/MapDraw.ts
diff --git a/src/component/helper/RoamController.js b/src/component/helper/RoamController.ts
similarity index 100%
rename from src/component/helper/RoamController.js
rename to src/component/helper/RoamController.ts
diff --git a/src/component/helper/brushHelper.js b/src/component/helper/brushHelper.ts
similarity index 100%
rename from src/component/helper/brushHelper.js
rename to src/component/helper/brushHelper.ts
diff --git a/src/component/helper/cursorHelper.js b/src/component/helper/cursorHelper.ts
similarity index 100%
rename from src/component/helper/cursorHelper.js
rename to src/component/helper/cursorHelper.ts
diff --git a/src/component/helper/interactionMutex.js b/src/component/helper/interactionMutex.ts
similarity index 100%
rename from src/component/helper/interactionMutex.js
rename to src/component/helper/interactionMutex.ts
diff --git a/src/component/helper/listComponent.js b/src/component/helper/listComponent.ts
similarity index 100%
rename from src/component/helper/listComponent.js
rename to src/component/helper/listComponent.ts
diff --git a/src/component/helper/roamHelper.js b/src/component/helper/roamHelper.ts
similarity index 100%
rename from src/component/helper/roamHelper.js
rename to src/component/helper/roamHelper.ts
diff --git a/src/component/helper/selectableMixin.js b/src/component/helper/selectableMixin.ts
similarity index 100%
rename from src/component/helper/selectableMixin.js
rename to src/component/helper/selectableMixin.ts
diff --git a/src/component/helper/sliderMove.js b/src/component/helper/sliderMove.ts
similarity index 100%
rename from src/component/helper/sliderMove.js
rename to src/component/helper/sliderMove.ts
diff --git a/src/component/legend.js b/src/component/legend.ts
similarity index 100%
rename from src/component/legend.js
rename to src/component/legend.ts
diff --git a/src/component/legend/LegendModel.js b/src/component/legend/LegendModel.ts
similarity index 100%
rename from src/component/legend/LegendModel.js
rename to src/component/legend/LegendModel.ts
diff --git a/src/component/legend/LegendView.js b/src/component/legend/LegendView.ts
similarity index 100%
rename from src/component/legend/LegendView.js
rename to src/component/legend/LegendView.ts
diff --git a/src/component/legend/ScrollableLegendModel.js b/src/component/legend/ScrollableLegendModel.ts
similarity index 100%
rename from src/component/legend/ScrollableLegendModel.js
rename to src/component/legend/ScrollableLegendModel.ts
diff --git a/src/component/legend/ScrollableLegendView.js b/src/component/legend/ScrollableLegendView.ts
similarity index 100%
rename from src/component/legend/ScrollableLegendView.js
rename to src/component/legend/ScrollableLegendView.ts
diff --git a/src/component/legend/legendAction.js b/src/component/legend/legendAction.ts
similarity index 100%
rename from src/component/legend/legendAction.js
rename to src/component/legend/legendAction.ts
diff --git a/src/component/legend/legendFilter.js b/src/component/legend/legendFilter.ts
similarity index 100%
rename from src/component/legend/legendFilter.js
rename to src/component/legend/legendFilter.ts
diff --git a/src/component/legend/scrollableLegendAction.js b/src/component/legend/scrollableLegendAction.ts
similarity index 100%
rename from src/component/legend/scrollableLegendAction.js
rename to src/component/legend/scrollableLegendAction.ts
diff --git a/src/component/legendScroll.js b/src/component/legendScroll.ts
similarity index 100%
rename from src/component/legendScroll.js
rename to src/component/legendScroll.ts
diff --git a/src/component/markArea.js b/src/component/markArea.ts
similarity index 100%
rename from src/component/markArea.js
rename to src/component/markArea.ts
diff --git a/src/component/markLine.js b/src/component/markLine.ts
similarity index 100%
rename from src/component/markLine.js
rename to src/component/markLine.ts
diff --git a/src/component/markPoint.js b/src/component/markPoint.ts
similarity index 100%
rename from src/component/markPoint.js
rename to src/component/markPoint.ts
diff --git a/src/component/marker/MarkAreaModel.js b/src/component/marker/MarkAreaModel.ts
similarity index 100%
rename from src/component/marker/MarkAreaModel.js
rename to src/component/marker/MarkAreaModel.ts
diff --git a/src/component/marker/MarkAreaView.js b/src/component/marker/MarkAreaView.ts
similarity index 100%
rename from src/component/marker/MarkAreaView.js
rename to src/component/marker/MarkAreaView.ts
diff --git a/src/component/marker/MarkLineModel.js b/src/component/marker/MarkLineModel.ts
similarity index 100%
rename from src/component/marker/MarkLineModel.js
rename to src/component/marker/MarkLineModel.ts
diff --git a/src/component/marker/MarkLineView.js b/src/component/marker/MarkLineView.ts
similarity index 100%
rename from src/component/marker/MarkLineView.js
rename to src/component/marker/MarkLineView.ts
diff --git a/src/component/marker/MarkPointModel.js b/src/component/marker/MarkPointModel.ts
similarity index 100%
rename from src/component/marker/MarkPointModel.js
rename to src/component/marker/MarkPointModel.ts
diff --git a/src/component/marker/MarkPointView.js b/src/component/marker/MarkPointView.ts
similarity index 100%
rename from src/component/marker/MarkPointView.js
rename to src/component/marker/MarkPointView.ts
diff --git a/src/component/marker/MarkerModel.js b/src/component/marker/MarkerModel.ts
similarity index 100%
rename from src/component/marker/MarkerModel.js
rename to src/component/marker/MarkerModel.ts
diff --git a/src/component/marker/MarkerView.js b/src/component/marker/MarkerView.ts
similarity index 100%
rename from src/component/marker/MarkerView.js
rename to src/component/marker/MarkerView.ts
diff --git a/src/component/marker/markerHelper.js b/src/component/marker/markerHelper.ts
similarity index 100%
rename from src/component/marker/markerHelper.js
rename to src/component/marker/markerHelper.ts
diff --git a/src/component/parallel.js b/src/component/parallel.ts
similarity index 100%
rename from src/component/parallel.js
rename to src/component/parallel.ts
diff --git a/src/component/parallelAxis.js b/src/component/parallelAxis.ts
similarity index 100%
rename from src/component/parallelAxis.js
rename to src/component/parallelAxis.ts
diff --git a/src/component/polar.js b/src/component/polar.ts
similarity index 100%
rename from src/component/polar.js
rename to src/component/polar.ts
diff --git a/src/component/radar.js b/src/component/radar.ts
similarity index 100%
rename from src/component/radar.js
rename to src/component/radar.ts
diff --git a/src/component/radar/RadarView.js b/src/component/radar/RadarView.ts
similarity index 100%
rename from src/component/radar/RadarView.js
rename to src/component/radar/RadarView.ts
diff --git a/src/component/radiusAxis.js b/src/component/radiusAxis.ts
similarity index 100%
rename from src/component/radiusAxis.js
rename to src/component/radiusAxis.ts
diff --git a/src/component/singleAxis.js b/src/component/singleAxis.ts
similarity index 100%
rename from src/component/singleAxis.js
rename to src/component/singleAxis.ts
diff --git a/src/component/timeline.js b/src/component/timeline.ts
similarity index 100%
rename from src/component/timeline.js
rename to src/component/timeline.ts
diff --git a/src/component/timeline/SliderTimelineModel.js b/src/component/timeline/SliderTimelineModel.ts
similarity index 100%
rename from src/component/timeline/SliderTimelineModel.js
rename to src/component/timeline/SliderTimelineModel.ts
diff --git a/src/component/timeline/SliderTimelineView.js b/src/component/timeline/SliderTimelineView.ts
similarity index 100%
rename from src/component/timeline/SliderTimelineView.js
rename to src/component/timeline/SliderTimelineView.ts
diff --git a/src/component/timeline/TimelineAxis.js b/src/component/timeline/TimelineAxis.ts
similarity index 100%
rename from src/component/timeline/TimelineAxis.js
rename to src/component/timeline/TimelineAxis.ts
diff --git a/src/component/timeline/TimelineModel.js b/src/component/timeline/TimelineModel.ts
similarity index 100%
rename from src/component/timeline/TimelineModel.js
rename to src/component/timeline/TimelineModel.ts
diff --git a/src/component/timeline/TimelineView.js b/src/component/timeline/TimelineView.ts
similarity index 100%
rename from src/component/timeline/TimelineView.js
rename to src/component/timeline/TimelineView.ts
diff --git a/src/component/timeline/preprocessor.js b/src/component/timeline/preprocessor.ts
similarity index 100%
rename from src/component/timeline/preprocessor.js
rename to src/component/timeline/preprocessor.ts
diff --git a/src/component/timeline/timelineAction.js b/src/component/timeline/timelineAction.ts
similarity index 100%
rename from src/component/timeline/timelineAction.js
rename to src/component/timeline/timelineAction.ts
diff --git a/src/component/timeline/typeDefaulter.js b/src/component/timeline/typeDefaulter.ts
similarity index 100%
rename from src/component/timeline/typeDefaulter.js
rename to src/component/timeline/typeDefaulter.ts
diff --git a/src/component/title.js b/src/component/title.ts
similarity index 100%
rename from src/component/title.js
rename to src/component/title.ts
diff --git a/src/component/toolbox.js b/src/component/toolbox.ts
similarity index 100%
rename from src/component/toolbox.js
rename to src/component/toolbox.ts
diff --git a/src/component/toolbox/ToolboxModel.js b/src/component/toolbox/ToolboxModel.ts
similarity index 100%
rename from src/component/toolbox/ToolboxModel.js
rename to src/component/toolbox/ToolboxModel.ts
diff --git a/src/component/toolbox/ToolboxView.js b/src/component/toolbox/ToolboxView.ts
similarity index 100%
rename from src/component/toolbox/ToolboxView.js
rename to src/component/toolbox/ToolboxView.ts
diff --git a/src/component/toolbox/feature/Brush.js b/src/component/toolbox/feature/Brush.ts
similarity index 100%
rename from src/component/toolbox/feature/Brush.js
rename to src/component/toolbox/feature/Brush.ts
diff --git a/src/component/toolbox/feature/DataView.js b/src/component/toolbox/feature/DataView.ts
similarity index 100%
rename from src/component/toolbox/feature/DataView.js
rename to src/component/toolbox/feature/DataView.ts
diff --git a/src/component/toolbox/feature/DataZoom.js b/src/component/toolbox/feature/DataZoom.ts
similarity index 100%
rename from src/component/toolbox/feature/DataZoom.js
rename to src/component/toolbox/feature/DataZoom.ts
diff --git a/src/component/toolbox/feature/MagicType.js b/src/component/toolbox/feature/MagicType.ts
similarity index 100%
rename from src/component/toolbox/feature/MagicType.js
rename to src/component/toolbox/feature/MagicType.ts
diff --git a/src/component/toolbox/feature/Restore.js b/src/component/toolbox/feature/Restore.ts
similarity index 100%
rename from src/component/toolbox/feature/Restore.js
rename to src/component/toolbox/feature/Restore.ts
diff --git a/src/component/toolbox/feature/SaveAsImage.js b/src/component/toolbox/feature/SaveAsImage.ts
similarity index 100%
rename from src/component/toolbox/feature/SaveAsImage.js
rename to src/component/toolbox/feature/SaveAsImage.ts
diff --git a/src/component/toolbox/featureManager.js b/src/component/toolbox/featureManager.ts
similarity index 100%
rename from src/component/toolbox/featureManager.js
rename to src/component/toolbox/featureManager.ts
diff --git a/src/component/tooltip.js b/src/component/tooltip.ts
similarity index 100%
rename from src/component/tooltip.js
rename to src/component/tooltip.ts
diff --git a/src/component/tooltip/TooltipContent.js b/src/component/tooltip/TooltipContent.ts
similarity index 100%
rename from src/component/tooltip/TooltipContent.js
rename to src/component/tooltip/TooltipContent.ts
diff --git a/src/component/tooltip/TooltipModel.js b/src/component/tooltip/TooltipModel.ts
similarity index 100%
rename from src/component/tooltip/TooltipModel.js
rename to src/component/tooltip/TooltipModel.ts
diff --git a/src/component/tooltip/TooltipRichContent.js b/src/component/tooltip/TooltipRichContent.ts
similarity index 100%
rename from src/component/tooltip/TooltipRichContent.js
rename to src/component/tooltip/TooltipRichContent.ts
diff --git a/src/component/tooltip/TooltipView.js b/src/component/tooltip/TooltipView.ts
similarity index 100%
rename from src/component/tooltip/TooltipView.js
rename to src/component/tooltip/TooltipView.ts
diff --git a/src/component/visualMap.js b/src/component/visualMap.ts
similarity index 100%
rename from src/component/visualMap.js
rename to src/component/visualMap.ts
diff --git a/src/component/visualMap/ContinuousModel.js b/src/component/visualMap/ContinuousModel.ts
similarity index 100%
rename from src/component/visualMap/ContinuousModel.js
rename to src/component/visualMap/ContinuousModel.ts
diff --git a/src/component/visualMap/ContinuousView.js b/src/component/visualMap/ContinuousView.ts
similarity index 100%
rename from src/component/visualMap/ContinuousView.js
rename to src/component/visualMap/ContinuousView.ts
diff --git a/src/component/visualMap/PiecewiseModel.js b/src/component/visualMap/PiecewiseModel.ts
similarity index 100%
rename from src/component/visualMap/PiecewiseModel.js
rename to src/component/visualMap/PiecewiseModel.ts
diff --git a/src/component/visualMap/PiecewiseView.js b/src/component/visualMap/PiecewiseView.ts
similarity index 100%
rename from src/component/visualMap/PiecewiseView.js
rename to src/component/visualMap/PiecewiseView.ts
diff --git a/src/component/visualMap/VisualMapModel.js b/src/component/visualMap/VisualMapModel.ts
similarity index 100%
rename from src/component/visualMap/VisualMapModel.js
rename to src/component/visualMap/VisualMapModel.ts
diff --git a/src/component/visualMap/VisualMapView.js b/src/component/visualMap/VisualMapView.ts
similarity index 100%
rename from src/component/visualMap/VisualMapView.js
rename to src/component/visualMap/VisualMapView.ts
diff --git a/src/component/visualMap/helper.js b/src/component/visualMap/helper.ts
similarity index 100%
rename from src/component/visualMap/helper.js
rename to src/component/visualMap/helper.ts
diff --git a/src/component/visualMap/preprocessor.js b/src/component/visualMap/preprocessor.ts
similarity index 100%
rename from src/component/visualMap/preprocessor.js
rename to src/component/visualMap/preprocessor.ts
diff --git a/src/component/visualMap/typeDefaulter.js b/src/component/visualMap/typeDefaulter.ts
similarity index 100%
rename from src/component/visualMap/typeDefaulter.js
rename to src/component/visualMap/typeDefaulter.ts
diff --git a/src/component/visualMap/visualEncoding.js b/src/component/visualMap/visualEncoding.ts
similarity index 100%
rename from src/component/visualMap/visualEncoding.js
rename to src/component/visualMap/visualEncoding.ts
diff --git a/src/component/visualMap/visualMapAction.js b/src/component/visualMap/visualMapAction.ts
similarity index 100%
rename from src/component/visualMap/visualMapAction.js
rename to src/component/visualMap/visualMapAction.ts
diff --git a/src/component/visualMapContinuous.js b/src/component/visualMapContinuous.ts
similarity index 100%
rename from src/component/visualMapContinuous.js
rename to src/component/visualMapContinuous.ts
diff --git a/src/component/visualMapPiecewise.js b/src/component/visualMapPiecewise.ts
similarity index 100%
rename from src/component/visualMapPiecewise.js
rename to src/component/visualMapPiecewise.ts
diff --git a/src/config.js b/src/config.ts
similarity index 100%
rename from src/config.js
rename to src/config.ts
diff --git a/src/coord/Axis.js b/src/coord/Axis.ts
similarity index 100%
rename from src/coord/Axis.js
rename to src/coord/Axis.ts
diff --git a/src/coord/View.js b/src/coord/View.ts
similarity index 100%
rename from src/coord/View.js
rename to src/coord/View.ts
diff --git a/src/coord/axisDefault.js b/src/coord/axisDefault.ts
similarity index 100%
rename from src/coord/axisDefault.js
rename to src/coord/axisDefault.ts
diff --git a/src/coord/axisHelper.js b/src/coord/axisHelper.ts
similarity index 100%
rename from src/coord/axisHelper.js
rename to src/coord/axisHelper.ts
diff --git a/src/coord/axisModelCommonMixin.js b/src/coord/axisModelCommonMixin.ts
similarity index 100%
rename from src/coord/axisModelCommonMixin.js
rename to src/coord/axisModelCommonMixin.ts
diff --git a/src/coord/axisModelCreator.js b/src/coord/axisModelCreator.ts
similarity index 100%
rename from src/coord/axisModelCreator.js
rename to src/coord/axisModelCreator.ts
diff --git a/src/coord/axisTickLabelBuilder.js b/src/coord/axisTickLabelBuilder.ts
similarity index 100%
rename from src/coord/axisTickLabelBuilder.js
rename to src/coord/axisTickLabelBuilder.ts
diff --git a/src/coord/calendar/Calendar.js b/src/coord/calendar/Calendar.ts
similarity index 100%
rename from src/coord/calendar/Calendar.js
rename to src/coord/calendar/Calendar.ts
diff --git a/src/coord/calendar/CalendarModel.js b/src/coord/calendar/CalendarModel.ts
similarity index 100%
rename from src/coord/calendar/CalendarModel.js
rename to src/coord/calendar/CalendarModel.ts
diff --git a/src/coord/calendar/prepareCustom.js b/src/coord/calendar/prepareCustom.ts
similarity index 100%
rename from src/coord/calendar/prepareCustom.js
rename to src/coord/calendar/prepareCustom.ts
diff --git a/src/coord/cartesian/Axis2D.js b/src/coord/cartesian/Axis2D.ts
similarity index 100%
rename from src/coord/cartesian/Axis2D.js
rename to src/coord/cartesian/Axis2D.ts
diff --git a/src/coord/cartesian/AxisModel.js b/src/coord/cartesian/AxisModel.ts
similarity index 100%
rename from src/coord/cartesian/AxisModel.js
rename to src/coord/cartesian/AxisModel.ts
diff --git a/src/coord/cartesian/Cartesian.js b/src/coord/cartesian/Cartesian.ts
similarity index 100%
rename from src/coord/cartesian/Cartesian.js
rename to src/coord/cartesian/Cartesian.ts
diff --git a/src/coord/cartesian/Cartesian2D.js b/src/coord/cartesian/Cartesian2D.ts
similarity index 100%
rename from src/coord/cartesian/Cartesian2D.js
rename to src/coord/cartesian/Cartesian2D.ts
diff --git a/src/coord/cartesian/Grid.js b/src/coord/cartesian/Grid.ts
similarity index 100%
rename from src/coord/cartesian/Grid.js
rename to src/coord/cartesian/Grid.ts
diff --git a/src/coord/cartesian/GridModel.js b/src/coord/cartesian/GridModel.ts
similarity index 100%
rename from src/coord/cartesian/GridModel.js
rename to src/coord/cartesian/GridModel.ts
diff --git a/src/coord/cartesian/cartesianAxisHelper.js b/src/coord/cartesian/cartesianAxisHelper.ts
similarity index 100%
rename from src/coord/cartesian/cartesianAxisHelper.js
rename to src/coord/cartesian/cartesianAxisHelper.ts
diff --git a/src/coord/cartesian/prepareCustom.js b/src/coord/cartesian/prepareCustom.ts
similarity index 100%
rename from src/coord/cartesian/prepareCustom.js
rename to src/coord/cartesian/prepareCustom.ts
diff --git a/src/coord/geo/Geo.js b/src/coord/geo/Geo.ts
similarity index 100%
rename from src/coord/geo/Geo.js
rename to src/coord/geo/Geo.ts
diff --git a/src/coord/geo/GeoModel.js b/src/coord/geo/GeoModel.ts
similarity index 100%
rename from src/coord/geo/GeoModel.js
rename to src/coord/geo/GeoModel.ts
diff --git a/src/coord/geo/Region.js b/src/coord/geo/Region.ts
similarity index 100%
rename from src/coord/geo/Region.js
rename to src/coord/geo/Region.ts
diff --git a/src/coord/geo/fix/diaoyuIsland.js b/src/coord/geo/fix/diaoyuIsland.ts
similarity index 100%
rename from src/coord/geo/fix/diaoyuIsland.js
rename to src/coord/geo/fix/diaoyuIsland.ts
diff --git a/src/coord/geo/fix/geoCoord.js b/src/coord/geo/fix/geoCoord.ts
similarity index 100%
rename from src/coord/geo/fix/geoCoord.js
rename to src/coord/geo/fix/geoCoord.ts
diff --git a/src/coord/geo/fix/nanhai.js b/src/coord/geo/fix/nanhai.ts
similarity index 100%
rename from src/coord/geo/fix/nanhai.js
rename to src/coord/geo/fix/nanhai.ts
diff --git a/src/coord/geo/fix/textCoord.js b/src/coord/geo/fix/textCoord.ts
similarity index 100%
rename from src/coord/geo/fix/textCoord.js
rename to src/coord/geo/fix/textCoord.ts
diff --git a/src/coord/geo/geoCreator.js b/src/coord/geo/geoCreator.ts
similarity index 100%
rename from src/coord/geo/geoCreator.js
rename to src/coord/geo/geoCreator.ts
diff --git a/src/coord/geo/geoJSONLoader.js b/src/coord/geo/geoJSONLoader.ts
similarity index 100%
rename from src/coord/geo/geoJSONLoader.js
rename to src/coord/geo/geoJSONLoader.ts
diff --git a/src/coord/geo/geoSVGLoader.js b/src/coord/geo/geoSVGLoader.ts
similarity index 100%
rename from src/coord/geo/geoSVGLoader.js
rename to src/coord/geo/geoSVGLoader.ts
diff --git a/src/coord/geo/geoSourceManager.js b/src/coord/geo/geoSourceManager.ts
similarity index 100%
rename from src/coord/geo/geoSourceManager.js
rename to src/coord/geo/geoSourceManager.ts
diff --git a/src/coord/geo/mapDataStorage.js b/src/coord/geo/mapDataStorage.ts
similarity index 100%
rename from src/coord/geo/mapDataStorage.js
rename to src/coord/geo/mapDataStorage.ts
diff --git a/src/coord/geo/parseGeoJson.js b/src/coord/geo/parseGeoJson.ts
similarity index 100%
rename from src/coord/geo/parseGeoJson.js
rename to src/coord/geo/parseGeoJson.ts
diff --git a/src/coord/geo/prepareCustom.js b/src/coord/geo/prepareCustom.ts
similarity index 100%
rename from src/coord/geo/prepareCustom.js
rename to src/coord/geo/prepareCustom.ts
diff --git a/src/coord/parallel/AxisModel.js b/src/coord/parallel/AxisModel.ts
similarity index 100%
rename from src/coord/parallel/AxisModel.js
rename to src/coord/parallel/AxisModel.ts
diff --git a/src/coord/parallel/Parallel.js b/src/coord/parallel/Parallel.ts
similarity index 100%
rename from src/coord/parallel/Parallel.js
rename to src/coord/parallel/Parallel.ts
diff --git a/src/coord/parallel/ParallelAxis.js b/src/coord/parallel/ParallelAxis.ts
similarity index 100%
rename from src/coord/parallel/ParallelAxis.js
rename to src/coord/parallel/ParallelAxis.ts
diff --git a/src/coord/parallel/ParallelModel.js b/src/coord/parallel/ParallelModel.ts
similarity index 100%
rename from src/coord/parallel/ParallelModel.js
rename to src/coord/parallel/ParallelModel.ts
diff --git a/src/coord/parallel/parallelCreator.js b/src/coord/parallel/parallelCreator.ts
similarity index 100%
rename from src/coord/parallel/parallelCreator.js
rename to src/coord/parallel/parallelCreator.ts
diff --git a/src/coord/parallel/parallelPreprocessor.js b/src/coord/parallel/parallelPreprocessor.ts
similarity index 100%
rename from src/coord/parallel/parallelPreprocessor.js
rename to src/coord/parallel/parallelPreprocessor.ts
diff --git a/src/coord/polar/AngleAxis.js b/src/coord/polar/AngleAxis.ts
similarity index 100%
rename from src/coord/polar/AngleAxis.js
rename to src/coord/polar/AngleAxis.ts
diff --git a/src/coord/polar/AxisModel.js b/src/coord/polar/AxisModel.ts
similarity index 100%
rename from src/coord/polar/AxisModel.js
rename to src/coord/polar/AxisModel.ts
diff --git a/src/coord/polar/Polar.js b/src/coord/polar/Polar.ts
similarity index 100%
rename from src/coord/polar/Polar.js
rename to src/coord/polar/Polar.ts
diff --git a/src/coord/polar/PolarModel.js b/src/coord/polar/PolarModel.ts
similarity index 100%
rename from src/coord/polar/PolarModel.js
rename to src/coord/polar/PolarModel.ts
diff --git a/src/coord/polar/RadiusAxis.js b/src/coord/polar/RadiusAxis.ts
similarity index 100%
rename from src/coord/polar/RadiusAxis.js
rename to src/coord/polar/RadiusAxis.ts
diff --git a/src/coord/polar/polarCreator.js b/src/coord/polar/polarCreator.ts
similarity index 100%
rename from src/coord/polar/polarCreator.js
rename to src/coord/polar/polarCreator.ts
diff --git a/src/coord/polar/prepareCustom.js b/src/coord/polar/prepareCustom.ts
similarity index 100%
rename from src/coord/polar/prepareCustom.js
rename to src/coord/polar/prepareCustom.ts
diff --git a/src/coord/radar/IndicatorAxis.js b/src/coord/radar/IndicatorAxis.ts
similarity index 100%
rename from src/coord/radar/IndicatorAxis.js
rename to src/coord/radar/IndicatorAxis.ts
diff --git a/src/coord/radar/Radar.js b/src/coord/radar/Radar.ts
similarity index 100%
rename from src/coord/radar/Radar.js
rename to src/coord/radar/Radar.ts
diff --git a/src/coord/radar/RadarModel.js b/src/coord/radar/RadarModel.ts
similarity index 100%
rename from src/coord/radar/RadarModel.js
rename to src/coord/radar/RadarModel.ts
diff --git a/src/coord/single/AxisModel.js b/src/coord/single/AxisModel.ts
similarity index 100%
rename from src/coord/single/AxisModel.js
rename to src/coord/single/AxisModel.ts
diff --git a/src/coord/single/Single.js b/src/coord/single/Single.ts
similarity index 100%
rename from src/coord/single/Single.js
rename to src/coord/single/Single.ts
diff --git a/src/coord/single/SingleAxis.js b/src/coord/single/SingleAxis.ts
similarity index 100%
rename from src/coord/single/SingleAxis.js
rename to src/coord/single/SingleAxis.ts
diff --git a/src/coord/single/prepareCustom.js b/src/coord/single/prepareCustom.ts
similarity index 100%
rename from src/coord/single/prepareCustom.js
rename to src/coord/single/prepareCustom.ts
diff --git a/src/coord/single/singleAxisHelper.js b/src/coord/single/singleAxisHelper.ts
similarity index 100%
rename from src/coord/single/singleAxisHelper.js
rename to src/coord/single/singleAxisHelper.ts
diff --git a/src/coord/single/singleCreator.js b/src/coord/single/singleCreator.ts
similarity index 100%
rename from src/coord/single/singleCreator.js
rename to src/coord/single/singleCreator.ts
diff --git a/src/data/DataDiffer.js b/src/data/DataDiffer.ts
similarity index 100%
rename from src/data/DataDiffer.js
rename to src/data/DataDiffer.ts
diff --git a/src/data/DataDimensionInfo.js b/src/data/DataDimensionInfo.ts
similarity index 100%
rename from src/data/DataDimensionInfo.js
rename to src/data/DataDimensionInfo.ts
diff --git a/src/data/Graph.js b/src/data/Graph.ts
similarity index 100%
rename from src/data/Graph.js
rename to src/data/Graph.ts
diff --git a/src/data/List.js b/src/data/List.ts
similarity index 100%
rename from src/data/List.js
rename to src/data/List.ts
diff --git a/src/data/OrdinalMeta.js b/src/data/OrdinalMeta.ts
similarity index 100%
rename from src/data/OrdinalMeta.js
rename to src/data/OrdinalMeta.ts
diff --git a/src/data/Source.js b/src/data/Source.ts
similarity index 100%
rename from src/data/Source.js
rename to src/data/Source.ts
diff --git a/src/data/Tree.js b/src/data/Tree.ts
similarity index 100%
rename from src/data/Tree.js
rename to src/data/Tree.ts
diff --git a/src/data/helper/completeDimensions.js b/src/data/helper/completeDimensions.ts
similarity index 100%
rename from src/data/helper/completeDimensions.js
rename to src/data/helper/completeDimensions.ts
diff --git a/src/data/helper/createDimensions.js b/src/data/helper/createDimensions.ts
similarity index 100%
rename from src/data/helper/createDimensions.js
rename to src/data/helper/createDimensions.ts
diff --git a/src/data/helper/dataProvider.js b/src/data/helper/dataProvider.ts
similarity index 100%
rename from src/data/helper/dataProvider.js
rename to src/data/helper/dataProvider.ts
diff --git a/src/data/helper/dataStackHelper.js b/src/data/helper/dataStackHelper.ts
similarity index 100%
rename from src/data/helper/dataStackHelper.js
rename to src/data/helper/dataStackHelper.ts
diff --git a/src/data/helper/dimensionHelper.js b/src/data/helper/dimensionHelper.ts
similarity index 100%
rename from src/data/helper/dimensionHelper.js
rename to src/data/helper/dimensionHelper.ts
diff --git a/src/data/helper/linkList.js b/src/data/helper/linkList.ts
similarity index 100%
rename from src/data/helper/linkList.js
rename to src/data/helper/linkList.ts
diff --git a/src/data/helper/sourceHelper.js b/src/data/helper/sourceHelper.ts
similarity index 100%
rename from src/data/helper/sourceHelper.js
rename to src/data/helper/sourceHelper.ts
diff --git a/src/data/helper/sourceType.js b/src/data/helper/sourceType.ts
similarity index 100%
rename from src/data/helper/sourceType.js
rename to src/data/helper/sourceType.ts
diff --git a/src/echarts.js b/src/echarts.ts
similarity index 100%
rename from src/echarts.js
rename to src/echarts.ts
diff --git a/src/export.js b/src/export.ts
similarity index 100%
rename from src/export.js
rename to src/export.ts
diff --git a/src/helper.js b/src/helper.ts
similarity index 100%
rename from src/helper.js
rename to src/helper.ts
diff --git a/src/lang.js b/src/lang.ts
similarity index 100%
rename from src/lang.js
rename to src/lang.ts
diff --git a/src/langEN.js b/src/langEN.ts
similarity index 100%
rename from src/langEN.js
rename to src/langEN.ts
diff --git a/src/langES.js b/src/langES.ts
similarity index 100%
rename from src/langES.js
rename to src/langES.ts
diff --git a/src/langFI.js b/src/langFI.ts
similarity index 100%
rename from src/langFI.js
rename to src/langFI.ts
diff --git a/src/langTH.js b/src/langTH.ts
similarity index 100%
rename from src/langTH.js
rename to src/langTH.ts
diff --git a/src/layout/barGrid.js b/src/layout/barGrid.ts
similarity index 100%
rename from src/layout/barGrid.js
rename to src/layout/barGrid.ts
diff --git a/src/layout/barPolar.js b/src/layout/barPolar.ts
similarity index 100%
rename from src/layout/barPolar.js
rename to src/layout/barPolar.ts
diff --git a/src/layout/points.js b/src/layout/points.ts
similarity index 100%
rename from src/layout/points.js
rename to src/layout/points.ts
diff --git a/src/loading/default.js b/src/loading/default.ts
similarity index 100%
rename from src/loading/default.js
rename to src/loading/default.ts
diff --git a/src/model/Component.js b/src/model/Component.ts
similarity index 100%
rename from src/model/Component.js
rename to src/model/Component.ts
diff --git a/src/model/Global.js b/src/model/Global.ts
similarity index 100%
rename from src/model/Global.js
rename to src/model/Global.ts
diff --git a/src/model/Model.js b/src/model/Model.ts
similarity index 100%
rename from src/model/Model.js
rename to src/model/Model.ts
diff --git a/src/model/OptionManager.js b/src/model/OptionManager.ts
similarity index 100%
rename from src/model/OptionManager.js
rename to src/model/OptionManager.ts
diff --git a/src/model/Series.js b/src/model/Series.ts
similarity index 100%
rename from src/model/Series.js
rename to src/model/Series.ts
diff --git a/src/model/globalDefault.js b/src/model/globalDefault.ts
similarity index 100%
rename from src/model/globalDefault.js
rename to src/model/globalDefault.ts
diff --git a/src/model/mixin/areaStyle.js b/src/model/mixin/areaStyle.ts
similarity index 100%
rename from src/model/mixin/areaStyle.js
rename to src/model/mixin/areaStyle.ts
diff --git a/src/model/mixin/boxLayout.js b/src/model/mixin/boxLayout.ts
similarity index 100%
rename from src/model/mixin/boxLayout.js
rename to src/model/mixin/boxLayout.ts
diff --git a/src/model/mixin/colorPalette.js b/src/model/mixin/colorPalette.ts
similarity index 100%
rename from src/model/mixin/colorPalette.js
rename to src/model/mixin/colorPalette.ts
diff --git a/src/model/mixin/dataFormat.js b/src/model/mixin/dataFormat.ts
similarity index 100%
rename from src/model/mixin/dataFormat.js
rename to src/model/mixin/dataFormat.ts
diff --git a/src/model/mixin/itemStyle.js b/src/model/mixin/itemStyle.ts
similarity index 100%
rename from src/model/mixin/itemStyle.js
rename to src/model/mixin/itemStyle.ts
diff --git a/src/model/mixin/lineStyle.js b/src/model/mixin/lineStyle.ts
similarity index 100%
rename from src/model/mixin/lineStyle.js
rename to src/model/mixin/lineStyle.ts
diff --git a/src/model/mixin/makeStyleMapper.js b/src/model/mixin/makeStyleMapper.ts
similarity index 100%
rename from src/model/mixin/makeStyleMapper.js
rename to src/model/mixin/makeStyleMapper.ts
diff --git a/src/model/mixin/textStyle.js b/src/model/mixin/textStyle.ts
similarity index 100%
rename from src/model/mixin/textStyle.js
rename to src/model/mixin/textStyle.ts
diff --git a/src/model/referHelper.js b/src/model/referHelper.ts
similarity index 100%
rename from src/model/referHelper.js
rename to src/model/referHelper.ts
diff --git a/src/preprocessor/backwardCompat.js b/src/preprocessor/backwardCompat.ts
similarity index 100%
rename from src/preprocessor/backwardCompat.js
rename to src/preprocessor/backwardCompat.ts
diff --git a/src/preprocessor/helper/compatStyle.js b/src/preprocessor/helper/compatStyle.ts
similarity index 100%
rename from src/preprocessor/helper/compatStyle.js
rename to src/preprocessor/helper/compatStyle.ts
diff --git a/src/processor/dataFilter.js b/src/processor/dataFilter.ts
similarity index 100%
rename from src/processor/dataFilter.js
rename to src/processor/dataFilter.ts
diff --git a/src/processor/dataSample.js b/src/processor/dataSample.ts
similarity index 100%
rename from src/processor/dataSample.js
rename to src/processor/dataSample.ts
diff --git a/src/processor/dataStack.js b/src/processor/dataStack.ts
similarity index 100%
rename from src/processor/dataStack.js
rename to src/processor/dataStack.ts
diff --git a/src/scale/Interval.js b/src/scale/Interval.ts
similarity index 100%
rename from src/scale/Interval.js
rename to src/scale/Interval.ts
diff --git a/src/scale/Log.js b/src/scale/Log.ts
similarity index 100%
rename from src/scale/Log.js
rename to src/scale/Log.ts
diff --git a/src/scale/Ordinal.js b/src/scale/Ordinal.ts
similarity index 100%
rename from src/scale/Ordinal.js
rename to src/scale/Ordinal.ts
diff --git a/src/scale/Scale.js b/src/scale/Scale.ts
similarity index 100%
rename from src/scale/Scale.js
rename to src/scale/Scale.ts
diff --git a/src/scale/Time.js b/src/scale/Time.ts
similarity index 100%
rename from src/scale/Time.js
rename to src/scale/Time.ts
diff --git a/src/scale/helper.js b/src/scale/helper.ts
similarity index 100%
rename from src/scale/helper.js
rename to src/scale/helper.ts
diff --git a/src/stream/Scheduler.js b/src/stream/Scheduler.ts
similarity index 100%
rename from src/stream/Scheduler.js
rename to src/stream/Scheduler.ts
diff --git a/src/stream/task.js b/src/stream/task.ts
similarity index 100%
rename from src/stream/task.js
rename to src/stream/task.ts
diff --git a/src/theme/dark.js b/src/theme/dark.ts
similarity index 100%
rename from src/theme/dark.js
rename to src/theme/dark.ts
diff --git a/src/theme/light.js b/src/theme/light.ts
similarity index 100%
rename from src/theme/light.js
rename to src/theme/light.ts
diff --git a/src/util/KDTree.js b/src/util/KDTree.ts
similarity index 100%
rename from src/util/KDTree.js
rename to src/util/KDTree.ts
diff --git a/src/util/animation.js b/src/util/animation.ts
similarity index 100%
rename from src/util/animation.js
rename to src/util/animation.ts
diff --git a/src/util/clazz.js b/src/util/clazz.ts
similarity index 100%
rename from src/util/clazz.js
rename to src/util/clazz.ts
diff --git a/src/util/component.js b/src/util/component.ts
similarity index 100%
rename from src/util/component.js
rename to src/util/component.ts
diff --git a/src/util/format.js b/src/util/format.ts
similarity index 100%
rename from src/util/format.js
rename to src/util/format.ts
diff --git a/src/util/graphic.js b/src/util/graphic.ts
similarity index 100%
rename from src/util/graphic.js
rename to src/util/graphic.ts
diff --git a/src/util/layout.js b/src/util/layout.ts
similarity index 100%
rename from src/util/layout.js
rename to src/util/layout.ts
diff --git a/src/util/model.js b/src/util/model.ts
similarity index 100%
rename from src/util/model.js
rename to src/util/model.ts
diff --git a/src/util/number.js b/src/util/number.ts
similarity index 100%
rename from src/util/number.js
rename to src/util/number.ts
diff --git a/src/util/quickSelect.js b/src/util/quickSelect.ts
similarity index 100%
rename from src/util/quickSelect.js
rename to src/util/quickSelect.ts
diff --git a/src/util/shape/sausage.js b/src/util/shape/sausage.ts
similarity index 100%
rename from src/util/shape/sausage.js
rename to src/util/shape/sausage.ts
diff --git a/src/util/symbol.js b/src/util/symbol.ts
similarity index 100%
rename from src/util/symbol.js
rename to src/util/symbol.ts
diff --git a/src/util/throttle.js b/src/util/throttle.ts
similarity index 100%
rename from src/util/throttle.js
rename to src/util/throttle.ts
diff --git a/src/view/Chart.js b/src/view/Chart.ts
similarity index 100%
rename from src/view/Chart.js
rename to src/view/Chart.ts
diff --git a/src/view/Component.js b/src/view/Component.ts
similarity index 100%
rename from src/view/Component.js
rename to src/view/Component.ts
diff --git a/src/visual/LegendVisualProvider.js b/src/visual/LegendVisualProvider.ts
similarity index 100%
rename from src/visual/LegendVisualProvider.js
rename to src/visual/LegendVisualProvider.ts
diff --git a/src/visual/VisualMapping.js b/src/visual/VisualMapping.ts
similarity index 100%
rename from src/visual/VisualMapping.js
rename to src/visual/VisualMapping.ts
diff --git a/src/visual/aria.js b/src/visual/aria.ts
similarity index 100%
rename from src/visual/aria.js
rename to src/visual/aria.ts
diff --git a/src/visual/dataColor.js b/src/visual/dataColor.ts
similarity index 100%
rename from src/visual/dataColor.js
rename to src/visual/dataColor.ts
diff --git a/src/visual/seriesColor.js b/src/visual/seriesColor.ts
similarity index 100%
rename from src/visual/seriesColor.js
rename to src/visual/seriesColor.ts
diff --git a/src/visual/symbol.js b/src/visual/symbol.ts
similarity index 100%
rename from src/visual/symbol.js
rename to src/visual/symbol.ts
diff --git a/src/visual/visualDefault.js b/src/visual/visualDefault.ts
similarity index 100%
rename from src/visual/visualDefault.js
rename to src/visual/visualDefault.ts
diff --git a/src/visual/visualSolution.js b/src/visual/visualSolution.ts
similarity index 100%
rename from src/visual/visualSolution.js
rename to src/visual/visualSolution.ts


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 09/09: migrate PieSeries and PieView as an example.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 4ee8ee674c5563eafda559d5cdbb8cfbfb75e8bf
Author: 100pah <su...@gmail.com>
AuthorDate: Mon Feb 17 05:27:13 2020 +0800

    migrate PieSeries and PieView as an example.
---
 src/chart/helper/createListSimply.ts    |  15 +-
 src/chart/map/MapSeries.ts              |   4 +-
 src/chart/pie/PieSeries.ts              |  75 +++--
 src/chart/pie/PieView.ts                | 490 +++++++++++++++++---------------
 src/component/helper/selectableMixin.ts |  77 +++--
 src/coord/geo/GeoModel.ts               |   4 +-
 src/data/List.ts                        |  12 +-
 src/data/helper/createDimensions.ts     |  41 ++-
 src/data/helper/dimensionHelper.ts      |  12 +-
 src/echarts.ts                          |  10 +-
 src/model/Component.ts                  |  12 +-
 src/model/Global.ts                     |   2 +-
 src/model/Model.ts                      |  10 +-
 src/model/Series.ts                     |  14 +-
 src/model/mixin/colorPalette.ts         |   4 +-
 src/model/mixin/dataFormat.ts           |  36 +--
 src/model/mixin/itemStyle.ts            |  20 +-
 src/model/mixin/lineStyle.ts            |  20 +-
 src/model/mixin/makeStyleMapper.ts      |   2 +-
 src/util/clazz.ts                       |  27 +-
 src/util/graphic.ts                     |   8 +-
 src/util/model.ts                       |   4 +-
 src/util/types.ts                       |  49 +++-
 src/view/Chart.ts                       |   7 +-
 src/view/Component.ts                   |   1 +
 src/visual/LegendVisualProvider.ts      |   1 -
 26 files changed, 538 insertions(+), 419 deletions(-)

diff --git a/src/chart/helper/createListSimply.ts b/src/chart/helper/createListSimply.ts
index c3f7be2..92c6612 100644
--- a/src/chart/helper/createListSimply.ts
+++ b/src/chart/helper/createListSimply.ts
@@ -19,9 +19,10 @@
 
 // @ts-nocheck
 
-import createDimensions from '../../data/helper/createDimensions';
+import createDimensions, {CreateDimensionsParams} from '../../data/helper/createDimensions';
 import List from '../../data/List';
 import {extend, isArray} from 'zrender/src/core/util';
+import SeriesModel from '../../model/Series';
 
 /**
  * [Usage]:
@@ -32,14 +33,12 @@ import {extend, isArray} from 'zrender/src/core/util';
  *     coordDimensions: ['value'],
  *     dimensionsCount: 5
  * });
- *
- * @param {module:echarts/model/Series} seriesModel
- * @param {Object|Array.<string|Object>} opt opt or coordDimensions
- *        The options in opt, see `echarts/data/helper/createDimensions`
- * @param {Array.<string>} [nameList]
- * @return {module:echarts/data/List}
  */
-export default function (seriesModel, opt, nameList) {
+export default function (
+    seriesModel: SeriesModel,
+    opt: CreateDimensionsParams | CreateDimensionsParams['coordDimensions'],
+    nameList?: string[]
+): List {
     opt = isArray(opt) && {coordDimensions: opt} || extend({}, opt);
 
     var source = seriesModel.getSource();
diff --git a/src/chart/map/MapSeries.ts b/src/chart/map/MapSeries.ts
index 6bc864b..a1f4b8c 100644
--- a/src/chart/map/MapSeries.ts
+++ b/src/chart/map/MapSeries.ts
@@ -23,7 +23,7 @@ import * as zrUtil from 'zrender/src/core/util';
 import createListSimply from '../helper/createListSimply';
 import SeriesModel from '../../model/Series';
 import {encodeHTML, addCommas} from '../../util/format';
-import dataSelectableMixin from '../../component/helper/selectableMixin';
+import {DataSelectableMixin} from '../../component/helper/selectableMixin';
 import {retrieveRawAttr} from '../../data/helper/dataProvider';
 import geoSourceManager from '../../coord/geo/geoSourceManager';
 import {makeSeriesEncodeForNameBased} from '../../data/helper/sourceHelper';
@@ -263,6 +263,6 @@ var MapSeries = SeriesModel.extend({
 
 });
 
-zrUtil.mixin(MapSeries, dataSelectableMixin);
+zrUtil.mixin(MapSeries, DataSelectableMixin.prototype);
 
 export default MapSeries;
\ No newline at end of file
diff --git a/src/chart/pie/PieSeries.ts b/src/chart/pie/PieSeries.ts
index 1a1697b..8d44523 100644
--- a/src/chart/pie/PieSeries.ts
+++ b/src/chart/pie/PieSeries.ts
@@ -17,26 +17,32 @@
 * under the License.
 */
 
-// @ts-nocheck
-
-import * as echarts from '../../echarts';
 import createListSimply from '../helper/createListSimply';
 import * as zrUtil from 'zrender/src/core/util';
 import * as modelUtil from '../../util/model';
 import {getPercentWithPrecision} from '../../util/number';
-import dataSelectableMixin from '../../component/helper/selectableMixin';
+import {DataSelectableMixin, SelectableTarget} from '../../component/helper/selectableMixin';
 import {retrieveRawAttr} from '../../data/helper/dataProvider';
 import {makeSeriesEncodeForNameBased} from '../../data/helper/sourceHelper';
 import LegendVisualProvider from '../../visual/LegendVisualProvider';
+import SeriesModel from '../../model/Series';
+import { SeriesOption, DataParamsUserOutput, ParsedDataValue } from '../../util/types';
+import List from '../../data/List';
 
+export interface PieOption extends SeriesOption {
+    // FIXME:TS need more. [k: string]: any should be removed finally.
+    [k: string]: any
+}
 
-var PieSeries = echarts.extendSeriesModel({
+class PieSeries extends SeriesModel {
 
-    type: 'series.pie',
+    static type = 'series.pie';
 
-    // Overwrite
-    init: function (option) {
-        PieSeries.superApply(this, 'init', arguments);
+    /**
+     * @overwrite
+     */
+    init(option: PieOption): void {
+        super.init.apply(this, arguments as any);
 
         // Enable legend selection for each data item
         // Use a function instead of direct access because data reference may changed
@@ -47,23 +53,28 @@ var PieSeries = echarts.extendSeriesModel({
         this.updateSelectedMap(this._createSelectableList());
 
         this._defaultLabelLine(option);
-    },
+    }
 
-    // Overwrite
-    mergeOption: function (newOption) {
-        PieSeries.superCall(this, 'mergeOption', newOption);
+    /**
+     * @overwrite
+     */
+    mergeOption(): void {
+        super.mergeOption.apply(this, arguments as any);
 
         this.updateSelectedMap(this._createSelectableList());
-    },
+    }
 
-    getInitialData: function (option, ecModel) {
+    /**
+     * @overwrite
+     */
+    getInitialData(): List {
         return createListSimply(this, {
             coordDimensions: ['value'],
             encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)
         });
-    },
+    }
 
-    _createSelectableList: function () {
+    private _createSelectableList(): SelectableTarget[] {
         var data = this.getRawData();
         var valueDim = data.mapDimension('value');
         var targetList = [];
@@ -75,15 +86,17 @@ var PieSeries = echarts.extendSeriesModel({
             });
         }
         return targetList;
-    },
+    }
 
-    // Overwrite
-    getDataParams: function (dataIndex) {
+    /**
+     * @overwrite
+     */
+    getDataParams(dataIndex: number): DataParamsUserOutput {
         var data = this.getData();
-        var params = PieSeries.superCall(this, 'getDataParams', dataIndex);
+        var params = super.getDataParams(dataIndex);
         // FIXME toFixed?
 
-        var valueList = [];
+        var valueList = [] as ParsedDataValue[];
         data.each(data.mapDimension('value'), function (value) {
             valueList.push(value);
         });
@@ -96,9 +109,9 @@ var PieSeries = echarts.extendSeriesModel({
 
         params.$vars.push('percent');
         return params;
-    },
+    }
 
-    _defaultLabelLine: function (option) {
+    private _defaultLabelLine(option: PieOption): void {
         // Extend labelLine emphasis
         modelUtil.defaultEmphasis(option, 'labelLine', ['show']);
 
@@ -109,9 +122,9 @@ var PieSeries = echarts.extendSeriesModel({
             && option.label.show;
         labelLineEmphasisOpt.show = labelLineEmphasisOpt.show
             && option.emphasis.label.show;
-    },
+    }
 
-    defaultOption: {
+    static defaultOption: PieOption = {
         zlevel: 0,
         z: 2,
         legendHoverLink: true,
@@ -201,8 +214,12 @@ var PieSeries = echarts.extendSeriesModel({
 
         animationEasing: 'cubicOut'
     }
-});
 
-zrUtil.mixin(PieSeries, dataSelectableMixin);
+}
+
+interface PieSeries extends DataSelectableMixin {}
+zrUtil.tsMixin(PieSeries, DataSelectableMixin);
+
+SeriesModel.registerClass(PieSeries);
 
-export default PieSeries;
\ No newline at end of file
+export default PieSeries;
diff --git a/src/chart/pie/PieView.ts b/src/chart/pie/PieView.ts
index 68d1f92..1d9c350 100644
--- a/src/chart/pie/PieView.ts
+++ b/src/chart/pie/PieView.ts
@@ -17,18 +17,26 @@
 * under the License.
 */
 
-// @ts-nocheck
 
 import * as zrUtil from 'zrender/src/core/util';
 import * as graphic from '../../util/graphic';
 import ChartView from '../../view/Chart';
-
-/**
- * @param {module:echarts/model/Series} seriesModel
- * @param {boolean} hasAnimation
- * @inner
- */
-function updateDataSelected(uid, seriesModel, hasAnimation, api) {
+import SeriesModel from '../../model/Series';
+import GlobalModel from '../../model/Global';
+import ExtensionAPI from '../../ExtensionAPI';
+import { Payload, DisplayState } from '../../util/types';
+import List from '../../data/List';
+import PieSeries from './PieSeries';
+import { Dictionary } from 'zrender/src/core/types';
+import Element from 'zrender/src/Element';
+
+function updateDataSelected(
+    this: PiePiece,
+    uid: string,
+    seriesModel: PieSeries,
+    hasAnimation: boolean,
+    api: ExtensionAPI
+): void {
     var data = seriesModel.getData();
     var dataIndex = this.dataIndex;
     var name = data.getName(dataIndex);
@@ -52,15 +60,13 @@ function updateDataSelected(uid, seriesModel, hasAnimation, api) {
     });
 }
 
-/**
- * @param {module:zrender/graphic/Sector} el
- * @param {Object} layout
- * @param {boolean} isSelected
- * @param {number} selectedOffset
- * @param {boolean} hasAnimation
- * @inner
- */
-function toggleItemSelected(el, layout, isSelected, selectedOffset, hasAnimation) {
+function toggleItemSelected(
+    el: Element,
+    layout: Dictionary<any>, // FIXME:TS make a type.
+    isSelected: boolean,
+    selectedOffset: number,
+    hasAnimation: boolean
+): void {
     var midAngle = (layout.startAngle + layout.endAngle) / 2;
 
     var dx = Math.cos(midAngle);
@@ -71,6 +77,7 @@ function toggleItemSelected(el, layout, isSelected, selectedOffset, hasAnimation
 
     hasAnimation
         // animateTo will stop revious animation like update transition
+        // @ts-ignore FIXME:TS zr?
         ? el.animate()
             .when(200, {
                 position: position
@@ -79,251 +86,273 @@ function toggleItemSelected(el, layout, isSelected, selectedOffset, hasAnimation
         : el.attr('position', position);
 }
 
+type PieceElementExtension = {
+    hoverIgnore?: boolean,
+    normalIgnore?: boolean,
+    ignore?: boolean
+};
+
 /**
  * Piece of pie including Sector, Label, LabelLine
- * @constructor
- * @extends {module:zrender/graphic/Group}
  */
-function PiePiece(data, idx) {
-
-    graphic.Group.call(this);
-
-    var sector = new graphic.Sector({
-        z2: 2
-    });
-    var polyline = new graphic.Polyline();
-    var text = new graphic.Text();
-    this.add(sector);
-    this.add(polyline);
-    this.add(text);
-
-    this.updateData(data, idx, true);
-}
+class PiePiece extends graphic.Group {
 
-var piePieceProto = PiePiece.prototype;
+    // FIXME:TS add a type in `util/graphic.ts` for `highDownOnUpdate`.
+    highDownOnUpdate: any;
+    dataIndex: number;
 
-piePieceProto.updateData = function (data, idx, firstCreate) {
+    constructor(data: List, idx: number) {
+        super();
 
-    var sector = this.childAt(0);
-    var labelLine = this.childAt(1);
-    var labelText = this.childAt(2);
+        // @ts-ignore FIXME:TS modify zr?
+        var sector = new graphic.Sector({
+            z2: 2
+        });
+        var polyline = new graphic.Polyline();
+        var text = new graphic.Text();
+        this.add(sector);
+        this.add(polyline);
+        this.add(text);
 
-    var seriesModel = data.hostModel;
-    var itemModel = data.getItemModel(idx);
-    var layout = data.getItemLayout(idx);
-    var sectorShape = zrUtil.extend({}, layout);
-    sectorShape.label = null;
+        this.updateData(data, idx, true);
+    }
 
-    var animationTypeUpdate = seriesModel.getShallow('animationTypeUpdate');
+    updateData(data: List, idx: number, firstCreate?: boolean): void {
+        var sector = this.childAt(0) as graphic.Sector;
+        var labelLine = this.childAt(1) as PieceElementExtension;
+        var labelText = this.childAt(2) as PieceElementExtension;
 
-    if (firstCreate) {
-        sector.setShape(sectorShape);
+        var seriesModel = data.hostModel as PieSeries;
+        var itemModel = data.getItemModel(idx);
+        var layout = data.getItemLayout(idx);
+        var sectorShape = zrUtil.extend({}, layout);
+        // @ts-ignore FIXME:TS label?
+        sectorShape.label = null;
 
-        var animationType = seriesModel.getShallow('animationType');
-        if (animationType === 'scale') {
-            sector.shape.r = layout.r0;
-            graphic.initProps(sector, {
-                shape: {
-                    r: layout.r
-                }
-            }, seriesModel, idx);
-        }
-        // Expansion
-        else {
-            sector.shape.endAngle = layout.startAngle;
-            graphic.updateProps(sector, {
-                shape: {
-                    endAngle: layout.endAngle
-                }
-            }, seriesModel, idx);
-        }
+        var animationTypeUpdate = seriesModel.getShallow('animationTypeUpdate');
 
-    }
-    else {
-        if (animationTypeUpdate === 'expansion') {
-            // Sectors are set to be target shape and an overlaying clipPath is used for animation
+        if (firstCreate) {
             sector.setShape(sectorShape);
-        }
-        else {
-            // Transition animation from the old shape
-            graphic.updateProps(sector, {
-                shape: sectorShape
-            }, seriesModel, idx);
-        }
-    }
-
-    // Update common style
-    var visualColor = data.getItemVisual(idx, 'color');
 
-    sector.useStyle(
-        zrUtil.defaults(
-            {
-                lineJoin: 'bevel',
-                fill: visualColor
-            },
-            itemModel.getModel('itemStyle').getItemStyle()
-        )
-    );
-    sector.hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();
-
-    var cursorStyle = itemModel.getShallow('cursor');
-    cursorStyle && sector.attr('cursor', cursorStyle);
-
-    // Toggle selected
-    toggleItemSelected(
-        this,
-        data.getItemLayout(idx),
-        seriesModel.isSelected(data.getName(idx)),
-        seriesModel.get('selectedOffset'),
-        seriesModel.get('animation')
-    );
-
-    // Label and text animation should be applied only for transition type animation when update
-    var withAnimation = !firstCreate && animationTypeUpdate === 'transition';
-    this._updateLabel(data, idx, withAnimation);
-
-    this.highDownOnUpdate = (itemModel.get('hoverAnimation') && seriesModel.isAnimationEnabled())
-        ? function (fromState, toState) {
-            if (toState === 'emphasis') {
-                labelLine.ignore = labelLine.hoverIgnore;
-                labelText.ignore = labelText.hoverIgnore;
-
-                // Sector may has animation of updating data. Force to move to the last frame
-                // Or it may stopped on the wrong shape
-                sector.stopAnimation(true);
-                sector.animateTo({
+            var animationType = seriesModel.getShallow('animationType');
+            if (animationType === 'scale') {
+                sector.shape.r = layout.r0;
+                graphic.initProps(sector, {
                     shape: {
-                        r: layout.r + seriesModel.get('hoverOffset')
+                        r: layout.r
                     }
-                }, 300, 'elasticOut');
+                }, seriesModel, idx);
             }
+            // Expansion
             else {
-                labelLine.ignore = labelLine.normalIgnore;
-                labelText.ignore = labelText.normalIgnore;
-
-                sector.stopAnimation(true);
-                sector.animateTo({
+                sector.shape.endAngle = layout.startAngle;
+                graphic.updateProps(sector, {
                     shape: {
-                        r: layout.r
+                        endAngle: layout.endAngle
                     }
-                }, 300, 'elasticOut');
+                }, seriesModel, idx);
+            }
+
+        }
+        else {
+            if (animationTypeUpdate === 'expansion') {
+                // Sectors are set to be target shape and an overlaying clipPath is used for animation
+                sector.setShape(sectorShape);
+            }
+            else {
+                // Transition animation from the old shape
+                graphic.updateProps(sector, {
+                    shape: sectorShape
+                }, seriesModel, idx);
             }
         }
-        : null;
 
-    graphic.setHoverStyle(this);
-};
+        // Update common style
+        var visualColor = data.getItemVisual(idx, 'color');
+
+        sector.useStyle(
+            zrUtil.defaults(
+                {
+                    lineJoin: 'bevel',
+                    fill: visualColor
+                },
+                itemModel.getModel('itemStyle').getItemStyle()
+            )
+        );
+        // @ts-ignore FIXME:TS make a type in util/graphic.ts to support `hoverStyle`.
+        sector.hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();
 
-piePieceProto._updateLabel = function (data, idx, withAnimation) {
+        var cursorStyle = itemModel.getShallow('cursor');
+        // @ts-ignore FIXME:TS update zr.
+        cursorStyle && sector.attr('cursor', cursorStyle);
 
-    var labelLine = this.childAt(1);
-    var labelText = this.childAt(2);
+        // Toggle selected
+        toggleItemSelected(
+            this,
+            data.getItemLayout(idx),
+            seriesModel.isSelected(data.getName(idx)),
+            seriesModel.get('selectedOffset'),
+            seriesModel.get('animation')
+        );
 
-    var seriesModel = data.hostModel;
-    var itemModel = data.getItemModel(idx);
-    var layout = data.getItemLayout(idx);
-    var labelLayout = layout.label;
-    var visualColor = data.getItemVisual(idx, 'color');
+        // Label and text animation should be applied only for transition type animation when update
+        var withAnimation = !firstCreate && animationTypeUpdate === 'transition';
+        this._updateLabel(data, idx, withAnimation);
+
+        this.highDownOnUpdate = (itemModel.get('hoverAnimation') && seriesModel.isAnimationEnabled())
+            ? function (fromState: DisplayState, toState: DisplayState): void {
+                if (toState === 'emphasis') {
+                    labelLine.ignore = labelLine.hoverIgnore;
+                    labelText.ignore = labelText.hoverIgnore;
+
+                    // Sector may has animation of updating data. Force to move to the last frame
+                    // Or it may stopped on the wrong shape
+                    sector.stopAnimation(true);
+                    sector.animateTo({
+                        shape: {
+                            r: layout.r + seriesModel.get('hoverOffset')
+                        }
+                    // @ts-ignore FIXME:TS modify zr
+                    }, 300, 'elasticOut');
+                }
+                else {
+                    labelLine.ignore = labelLine.normalIgnore;
+                    labelText.ignore = labelText.normalIgnore;
+
+                    sector.stopAnimation(true);
+                    sector.animateTo({
+                        shape: {
+                            r: layout.r
+                        }
+                    // @ts-ignore FIXME:TS modify zr
+                    }, 300, 'elasticOut');
+                }
+            }
+            : null;
 
-    if (!labelLayout || isNaN(labelLayout.x) || isNaN(labelLayout.y)) {
-        labelText.ignore = labelText.normalIgnore = labelText.hoverIgnore =
-        labelLine.ignore = labelLine.normalIgnore = labelLine.hoverIgnore = true;
-        return;
+        graphic.setHoverStyle(this);
     }
 
-    var targetLineShape = {
-        points: labelLayout.linePoints || [
-            [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y]
-        ]
-    };
-    var targetTextStyle = {
-        x: labelLayout.x,
-        y: labelLayout.y
-    };
-    if (withAnimation) {
-        graphic.updateProps(labelLine, {
-            shape: targetLineShape
-        }, seriesModel, idx);
-
-        graphic.updateProps(labelText, {
-            style: targetTextStyle
-        }, seriesModel, idx);
-    }
-    else {
-        labelLine.attr({
-            shape: targetLineShape
-        });
-        labelText.attr({
-            style: targetTextStyle
-        });
-    }
+    private _updateLabel(data: List, idx: number, withAnimation: boolean): void {
 
-    labelText.attr({
-        rotation: labelLayout.rotation,
-        origin: [labelLayout.x, labelLayout.y],
-        z2: 10
-    });
+        var labelLine = this.childAt(1) as (PieceElementExtension & graphic.Line);
+        var labelText = this.childAt(2) as (PieceElementExtension & graphic.Text);
 
-    var labelModel = itemModel.getModel('label');
-    var labelHoverModel = itemModel.getModel('emphasis.label');
-    var labelLineModel = itemModel.getModel('labelLine');
-    var labelLineHoverModel = itemModel.getModel('emphasis.labelLine');
-    var visualColor = data.getItemVisual(idx, 'color');
-
-    graphic.setLabelStyle(
-        labelText.style, labelText.hoverStyle = {}, labelModel, labelHoverModel,
-        {
-            labelFetcher: data.hostModel,
-            labelDataIndex: idx,
-            defaultText: labelLayout.text,
-            autoColor: visualColor,
-            useInsideStyle: !!labelLayout.inside
-        },
-        {
-            textAlign: labelLayout.textAlign,
-            textVerticalAlign: labelLayout.verticalAlign,
-            opacity: data.getItemVisual(idx, 'opacity')
+        var seriesModel = data.hostModel;
+        var itemModel = data.getItemModel(idx);
+        var layout = data.getItemLayout(idx);
+        var labelLayout = layout.label;
+        var visualColor = data.getItemVisual(idx, 'color');
+
+        if (!labelLayout || isNaN(labelLayout.x) || isNaN(labelLayout.y)) {
+            labelText.ignore = labelText.normalIgnore = labelText.hoverIgnore =
+            labelLine.ignore = labelLine.normalIgnore = labelLine.hoverIgnore = true;
+            return;
         }
-    );
 
-    labelText.ignore = labelText.normalIgnore = !labelModel.get('show');
-    labelText.hoverIgnore = !labelHoverModel.get('show');
+        var targetLineShape = {
+            points: labelLayout.linePoints || [
+                [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y]
+            ]
+        };
+        var targetTextStyle = {
+            x: labelLayout.x,
+            y: labelLayout.y
+        };
+        if (withAnimation) {
+            graphic.updateProps(labelLine, {
+                shape: targetLineShape
+            }, seriesModel, idx);
 
-    labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show');
-    labelLine.hoverIgnore = !labelLineHoverModel.get('show');
+            graphic.updateProps(labelText, {
+                style: targetTextStyle
+            }, seriesModel, idx);
+        }
+        else {
+            labelLine.attr({
+                // @ts-ignore FIXME:TS modify zr
+                shape: targetLineShape
+            });
+            labelText.attr({
+                // @ts-ignore FIXME:TS modify zr
+                style: targetTextStyle
+            });
+        }
 
-    // Default use item visual color
-    labelLine.setStyle({
-        stroke: visualColor,
-        opacity: data.getItemVisual(idx, 'opacity')
-    });
-    labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle());
+        labelText.attr({
+            rotation: labelLayout.rotation,
+            origin: [labelLayout.x, labelLayout.y],
+            // @ts-ignore FIXME:TS modify zr
+            z2: 10
+        });
 
-    labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle();
+        var labelModel = itemModel.getModel('label');
+        var labelHoverModel = itemModel.getModel('emphasis.label');
+        var labelLineModel = itemModel.getModel('labelLine');
+        var labelLineHoverModel = itemModel.getModel('emphasis.labelLine');
+        var visualColor = data.getItemVisual(idx, 'color');
+
+        graphic.setLabelStyle(
+            labelText.style,
+            // @ts-ignore FIXME:TS make a type in util/graphic.
+            labelText.hoverStyle = {},
+            labelModel,
+            labelHoverModel,
+            {
+                labelFetcher: data.hostModel,
+                labelDataIndex: idx,
+                defaultText: labelLayout.text,
+                autoColor: visualColor,
+                useInsideStyle: !!labelLayout.inside
+            },
+            {
+                textAlign: labelLayout.textAlign,
+                textVerticalAlign: labelLayout.verticalAlign,
+                opacity: data.getItemVisual(idx, 'opacity')
+            }
+        );
 
-    var smooth = labelLineModel.get('smooth');
-    if (smooth && smooth === true) {
-        smooth = 0.4;
-    }
-    labelLine.setShape({
-        smooth: smooth
-    });
-};
+        labelText.ignore = labelText.normalIgnore = !labelModel.get('show');
+        labelText.hoverIgnore = !labelHoverModel.get('show');
 
-zrUtil.inherits(PiePiece, graphic.Group);
+        labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show');
+        labelLine.hoverIgnore = !labelLineHoverModel.get('show');
+
+        // Default use item visual color
+        labelLine.setStyle({
+            stroke: visualColor,
+            opacity: data.getItemVisual(idx, 'opacity')
+        });
+        labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle());
+
+        // @ts-ignore FIXME:TS
+        labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle();
+
+        var smooth = labelLineModel.get('smooth');
+        if (smooth && smooth === true) {
+            smooth = 0.4;
+        }
+        labelLine.setShape({
+            smooth: smooth
+        });
+    }
+}
 
 
 // Pie view
-var PieView = ChartView.extend({
+class PieView extends ChartView {
 
-    type: 'pie',
+    static type = 'pie';
 
-    init: function () {
+    private _sectorGroup: graphic.Group;
+    private _data: List;
+
+    init(): void {
         var sectorGroup = new graphic.Group();
         this._sectorGroup = sectorGroup;
-    },
+    }
 
-    render: function (seriesModel, ecModel, api, payload) {
+    render(seriesModel: PieSeries, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void {
         if (payload && (payload.from === this.uid)) {
             return;
         }
@@ -347,6 +376,7 @@ var PieView = ChartView.extend({
                 var piePiece = new PiePiece(data, idx);
                 // Default expansion animation
                 if (isFirstRender && animationType !== 'scale') {
+                    // @ts-ignore FIXME:TS modify zr?
                     piePiece.eachChild(function (child) {
                         child.stopAnimation(true);
                     });
@@ -359,9 +389,10 @@ var PieView = ChartView.extend({
                 group.add(piePiece);
             })
             .update(function (newIdx, oldIdx) {
-                var piePiece = oldData.getItemGraphicEl(oldIdx);
+                var piePiece = oldData.getItemGraphicEl(oldIdx) as PiePiece;
 
                 if (!isFirstRender && animationTypeUpdate !== 'transition') {
+                    // @ts-ignore FIXME:TS modify zr?
                     piePiece.eachChild(function (child) {
                         child.stopAnimation(true);
                     });
@@ -402,13 +433,17 @@ var PieView = ChartView.extend({
         }
 
         this._data = data;
-    },
+    }
 
-    dispose: function () {},
+    dispose() {}
 
-    _createClipPath: function (
-        cx, cy, r, startAngle, clockwise, cb, seriesModel, isFirstRender
-    ) {
+    _createClipPath(
+        cx: number, cy: number, r: number,
+        startAngle: number, clockwise: boolean,
+        // @ts-ignore FIXME:TS make type in util.grpahic
+        cb,
+        seriesModel: PieSeries, isFirstRender: boolean
+    ): graphic.Sector {
         var clipPath = new graphic.Sector({
             shape: {
                 cx: cx,
@@ -429,12 +464,12 @@ var PieView = ChartView.extend({
         }, seriesModel, cb);
 
         return clipPath;
-    },
+    }
 
     /**
-     * @implement
+     * @implements
      */
-    containPoint: function (point, seriesModel) {
+    containPoint = function (point: number[], seriesModel: PieSeries): boolean {
         var data = seriesModel.getData();
         var itemLayout = data.getItemLayout(0);
         if (itemLayout) {
@@ -444,7 +479,8 @@ var PieView = ChartView.extend({
             return radius <= itemLayout.r && radius >= itemLayout.r0;
         }
     }
+}
 
-});
+ChartView.registerClass(PieView);
 
 export default PieView;
diff --git a/src/component/helper/selectableMixin.ts b/src/component/helper/selectableMixin.ts
index 7f4db3d..9ca7a61 100644
--- a/src/component/helper/selectableMixin.ts
+++ b/src/component/helper/selectableMixin.ts
@@ -17,8 +17,6 @@
 * under the License.
 */
 
-// @ts-nocheck
-
 /**
  * Data selectable mixin for chart series.
  * To eanble data select, option of series must have `selectedMode`.
@@ -26,34 +24,49 @@
  */
 
 import * as zrUtil from 'zrender/src/core/util';
+import Model from '../../model/Model';
+
+export type SelectableTarget = {
+    name: string,
+    value: any,
+    selected: boolean
+};
+
+interface DataSelectableMixin extends Pick<Model, 'get'> {};
+
+class DataSelectableMixin {
+
+    private _targetList: SelectableTarget[];
+
+    // Key: target.name
+    private _selectTargetMap: zrUtil.HashMap<SelectableTarget>;
 
-export default {
 
     /**
-     * @param {Array.<Object>} targetList [{name, value, selected}, ...]
+     * @param targetList [{name, value, selected}, ...]
      *        If targetList is an array, it should like [{name: ..., value: ...}, ...].
      *        If targetList is a "List", it must have coordDim: 'value' dimension and name.
      */
-    updateSelectedMap: function (targetList) {
+    updateSelectedMap(targetList?: SelectableTarget[]): void {
         this._targetList = zrUtil.isArray(targetList) ? targetList.slice() : [];
 
         this._selectTargetMap = zrUtil.reduce(targetList || [], function (targetMap, target) {
             targetMap.set(target.name, target);
             return targetMap;
         }, zrUtil.createHashMap());
-    },
+    }
 
     /**
      * Either name or id should be passed as input here.
      * If both of them are defined, id is used.
      *
-     * @param {string|undefined} name name of data
-     * @param {number|undefined} id dataIndex of data
+     * @param name name of data. Can be null/undefined.
+     * @param idx dataIndex of data. Can be null/undefined.
      */
     // PENGING If selectedMode is null ?
-    select: function (name, id) {
-        var target = id != null
-            ? this._targetList[id]
+    select(name?: string, idx?: number): void {
+        var target = idx != null
+            ? this._targetList[idx]
             : this._selectTargetMap.get(name);
         var selectedMode = this.get('selectedMode');
         if (selectedMode === 'single') {
@@ -62,52 +75,54 @@ export default {
             });
         }
         target && (target.selected = true);
-    },
+    }
 
     /**
      * Either name or id should be passed as input here.
      * If both of them are defined, id is used.
      *
-     * @param {string|undefined} name name of data
-     * @param {number|undefined} id dataIndex of data
+     * @param name name of data. Can be null/undefined.
+     * @param idx dataIndex of data. Can be null/undefined.
      */
-    unSelect: function (name, id) {
-        var target = id != null
-            ? this._targetList[id]
+    unSelect(name?: string, idx?: number): void {
+        var target = idx != null
+            ? this._targetList[idx]
             : this._selectTargetMap.get(name);
         // var selectedMode = this.get('selectedMode');
         // selectedMode !== 'single' && target && (target.selected = false);
         target && (target.selected = false);
-    },
+    }
 
     /**
      * Either name or id should be passed as input here.
      * If both of them are defined, id is used.
      *
-     * @param {string|undefined} name name of data
-     * @param {number|undefined} id dataIndex of data
+     * @param name name of data. Can be null/undefined.
+     * @param idx dataIndex of data. Can be null/undefined.
      */
-    toggleSelected: function (name, id) {
-        var target = id != null
-            ? this._targetList[id]
+    toggleSelected(name?: string, idx?: number): boolean {
+        var target = idx != null
+            ? this._targetList[idx]
             : this._selectTargetMap.get(name);
         if (target != null) {
-            this[target.selected ? 'unSelect' : 'select'](name, id);
+            this[target.selected ? 'unSelect' : 'select'](name, idx);
             return target.selected;
         }
-    },
+    }
 
     /**
      * Either name or id should be passed as input here.
      * If both of them are defined, id is used.
      *
-     * @param {string|undefined} name name of data
-     * @param {number|undefined} id dataIndex of data
+     * @param name name of data. Can be null/undefined.
+     * @param idx dataIndex of data. Can be null/undefined.
      */
-    isSelected: function (name, id) {
-        var target = id != null
-            ? this._targetList[id]
+    isSelected(name?: string, idx?: number): boolean {
+        var target = idx != null
+            ? this._targetList[idx]
             : this._selectTargetMap.get(name);
         return target && target.selected;
     }
-};
\ No newline at end of file
+}
+
+export {DataSelectableMixin};
diff --git a/src/coord/geo/GeoModel.ts b/src/coord/geo/GeoModel.ts
index 341c422..4f9361c 100644
--- a/src/coord/geo/GeoModel.ts
+++ b/src/coord/geo/GeoModel.ts
@@ -23,7 +23,7 @@ import * as zrUtil from 'zrender/src/core/util';
 import * as modelUtil from '../../util/model';
 import ComponentModel from '../../model/Component';
 import Model from '../../model/Model';
-import selectableMixin from '../../component/helper/selectableMixin';
+import {DataSelectableMixin} from '../../component/helper/selectableMixin';
 import geoCreator from './geoCreator';
 
 var GeoModel = ComponentModel.extend({
@@ -176,6 +176,6 @@ var GeoModel = ComponentModel.extend({
     }
 });
 
-zrUtil.mixin(GeoModel, selectableMixin);
+zrUtil.mixin(GeoModel, DataSelectableMixin.prototype);
 
 export default GeoModel;
\ No newline at end of file
diff --git a/src/data/List.ts b/src/data/List.ts
index f9d7ac1..7344dbe 100644
--- a/src/data/List.ts
+++ b/src/data/List.ts
@@ -30,13 +30,13 @@ import Model from '../model/Model';
 import DataDiffer from './DataDiffer';
 import Source, { SourceConstructor } from './Source';
 import {DefaultDataProvider, DataProvider} from './helper/dataProvider';
-import {summarizeDimensions, DimensionSummary, DimensionUserOuput} from './helper/dimensionHelper';
+import {summarizeDimensions, DimensionSummary} from './helper/dimensionHelper';
 import DataDimensionInfo from './DataDimensionInfo';
 import {ArrayLike, Dictionary, FunctionPropertyNames} from 'zrender/src/core/types';
 import Element from 'zrender/src/Element';
 import {
     DimensionIndex, DimensionName, ECElement, DimensionLoose, OptionDataItem,
-    ParsedDataValue, ParsedDataNumeric, OrdinalRawValueIndex
+    ParsedDataValue, ParsedDataNumeric, OrdinalRawValueIndex, DimensionUserOuput
 } from '../util/types';
 import {parseDate} from '../util/number';
 import {isDataItemOption} from '../util/model';
@@ -330,10 +330,10 @@ class List {
      *        If idx is number, and not found, return null/undefined.
      *        If idx is `true`, and not found, return empty array (always return array).
      */
-    mapDimension<Idx extends (number | true)>(
-        coordDim: DimensionName,
-        idx?: Idx
-    ): (true extends Idx ? DimensionName[] : DimensionName) {
+    mapDimension(coordDim: DimensionName): DimensionName;
+    mapDimension(coordDim: DimensionName, idx: true): DimensionName[];
+    mapDimension(coordDim: DimensionName, idx: number): DimensionName;
+    mapDimension(coordDim: DimensionName, idx?: true | number): DimensionName | DimensionName[] {
         var dimensionsSummary = this._dimensionsSummary;
 
         if (idx == null) {
diff --git a/src/data/helper/createDimensions.ts b/src/data/helper/createDimensions.ts
index e159c77..ae187f3 100644
--- a/src/data/helper/createDimensions.ts
+++ b/src/data/helper/createDimensions.ts
@@ -17,31 +17,42 @@
 * under the License.
 */
 
-// @ts-nocheck
-
 /**
  * Substitute `completeDimensions`.
  * `completeDimensions` is to be deprecated.
  */
 import completeDimensions from './completeDimensions';
+import { DimensionDefinitionLoose, OptionEncode, OptionEncodeValue, EncodeDefaulter } from '../../util/types';
+import Source from '../Source';
+import List from '../List';
+import DataDimensionInfo from '../DataDimensionInfo';
+import { HashMap } from 'zrender/src/core/util';
+
+export type CreateDimensionsParams = {
+    coordDimensions?: DimensionDefinitionLoose[],
+    dimensionsDefine?: DimensionDefinitionLoose[],
+    encodeDefine?: HashMap<OptionEncodeValue> | OptionEncode,
+    dimensionsCount?: number,
+    encodeDefaulter?: EncodeDefaulter,
+    generateCoord?: boolean,
+    generateCoordCount?: number
+};
 
 /**
- * @param {module:echarts/data/Source|module:echarts/data/List} source or data.
- * @param {Object|Array} [opt]
- * @param {Array.<string|Object>} [opt.coordDimensions=[]]
- * @param {number} [opt.dimensionsCount]
- * @param {string} [opt.generateCoord]
- * @param {string} [opt.generateCoordCount]
- * @param {Array.<string|Object>} [opt.dimensionsDefine=source.dimensionsDefine] Overwrite source define.
- * @param {Object|HashMap} [opt.encodeDefine=source.encodeDefine] Overwrite source define.
- * @param {Function} [opt.encodeDefaulter] Make default encode if user not specified.
- * @return {Array.<Object>} dimensionsInfo
+ * @param opt.coordDimensions
+ * @param opt.dimensionsDefine By default `source.dimensionsDefine` Overwrite source define.
+ * @param opt.encodeDefine By default `source.encodeDefine` Overwrite source define.
+ * @param opt.encodeDefaulter Make default encode if user not specified.
  */
-export default function (source, opt) {
+export default function (
+    source: Source | List,
+    opt?: CreateDimensionsParams
+): DataDimensionInfo[] {
     opt = opt || {};
     return completeDimensions(opt.coordDimensions || [], source, {
-        dimsDef: opt.dimensionsDefine || source.dimensionsDefine,
-        encodeDef: opt.encodeDefine || source.encodeDefine,
+        // FIXME:TS detect whether source then call `.dimensionsDefine` and `.encodeDefine`?
+        dimsDef: opt.dimensionsDefine || (source as Source).dimensionsDefine,
+        encodeDef: opt.encodeDefine || (source as Source).encodeDefine,
         dimCount: opt.dimensionsCount,
         encodeDefaulter: opt.encodeDefaulter,
         generateCoord: opt.generateCoord,
diff --git a/src/data/helper/dimensionHelper.ts b/src/data/helper/dimensionHelper.ts
index 1db36ed..7a3fb17 100644
--- a/src/data/helper/dimensionHelper.ts
+++ b/src/data/helper/dimensionHelper.ts
@@ -23,7 +23,7 @@ import {each, createHashMap, assert} from 'zrender/src/core/util';
 import { __DEV__ } from '../../config';
 import List from '../List';
 import {
-    DimensionName, DimensionIndex, VISUAL_DIMENSIONS, DimensionType
+    DimensionName, VISUAL_DIMENSIONS, DimensionType, DimensionUserOuput
 } from '../../util/types';
 
 export type DimensionSummaryEncode = {
@@ -33,16 +33,6 @@ export type DimensionSummaryEncode = {
         // index: coordDimIndex, value: dataDimName
         DimensionName[]
 };
-export type DimensionUserOuputEncode = {
-    [coordOrVisualDimName: string]:
-        // index: coordDimIndex, value: dataDimIndex
-        DimensionIndex[]
-};
-export type DimensionUserOuput = {
-    // The same as `data.dimensions`
-    dimensionNames: DimensionName[]
-    encode: DimensionUserOuputEncode
-};
 export type DimensionSummary = {
     encode: DimensionSummaryEncode,
     // Those details that can be expose to users are put int `userOutput`.
diff --git a/src/echarts.ts b/src/echarts.ts
index 32fc419..57dbdc2 100644
--- a/src/echarts.ts
+++ b/src/echarts.ts
@@ -1121,7 +1121,15 @@ class ECharts {
                     var classType = parseClassType(model.type);
                     var Clazz = isComponent
                         ? (ComponentView as ComponentViewConstructor).getClass(classType.main, classType.sub)
-                        : (ChartView as ChartViewConstructor).getClass(classType.sub);
+                        : (
+                            // FIXME:TS
+                            // (ChartView as ChartViewConstructor).getClass('series', classType.sub)
+                            // For backward compat, still support a chart type declared as only subType
+                            // like "liquidfill", but recommend "series.liquidfill"
+                            // But need a base class to make a type series.
+                            // ||
+                            (ChartView as ChartViewConstructor).getClass(classType.sub)
+                        );
 
                     if (__DEV__) {
                         assert(Clazz, classType.sub + ' does not exist.');
diff --git a/src/model/Component.ts b/src/model/Component.ts
index 0a5ebeb..2e38e1f 100644
--- a/src/model/Component.ts
+++ b/src/model/Component.ts
@@ -34,7 +34,7 @@ import * as layout from '../util/layout';
 import boxLayoutMixin from './mixin/boxLayout';
 import { CoordinateSystem } from '../coord/CoordinateSystem';
 import GlobalModel from './Global';
-import { ComponentOption, ComponentMainType, ComponentSubType } from '../util/types';
+import { ComponentOption, ComponentMainType, ComponentSubType, ComponentFullType } from '../util/types';
 
 var inner = makeInner();
 
@@ -49,7 +49,7 @@ class ComponentModel extends Model {
     /**
      * @readonly
      */
-    type: string;
+    type: ComponentFullType;
 
     /**
      * @readonly
@@ -176,10 +176,12 @@ class ComponentModel extends Model {
      *     aaa: number
      * }
      * export class XxxModel extends Component {
-     *     readonly defaultOption: XxxOption = {
+     *     static type = 'xxx';
+     *     static defaultOption: XxxOption = {
      *         aaa: 123
      *     }
      * }
+     * Component.registerClass(XxxModel);
      * ```
      * ```ts
      * import {mergeOption} from '../model/util';
@@ -225,7 +227,8 @@ class ComponentModel extends Model {
         // in legacy env and auto merge defaultOption. So if using class
         // declaration, defaultOption should be merged manually.
         if (!isExtendedClass(ctor)) {
-            return ctor.prototype.defaultOption;
+            // When using ts class, defaultOption must be declared as static.
+            return (ctor as any).defaultOption;
         }
 
         // FIXME: remove this approach?
@@ -256,6 +259,7 @@ class ComponentModel extends Model {
         });
     }
 
+    static registerClass: ClassManager['registerClass'];
 }
 
 // Reset ComponentModel.extend, add preConstruct.
diff --git a/src/model/Global.ts b/src/model/Global.ts
index 41eb447..b4d3a05 100644
--- a/src/model/Global.ts
+++ b/src/model/Global.ts
@@ -40,7 +40,7 @@ import * as modelUtil from '../util/model';
 import Model from './Model';
 import ComponentModel, {ComponentModelConstructor} from './Component';
 import globalDefault from './globalDefault';
-import ColorPaletteMixin from './mixin/colorPalette';
+import {ColorPaletteMixin} from './mixin/colorPalette';
 import {resetSourceDefaulter} from '../data/helper/sourceHelper';
 import SeriesModel from './Series';
 import { Payload, OptionPreprocessor, ECOption, ECUnitOption, ThemeOption, ComponentOption, ComponentMainType, ComponentSubType } from '../util/types';
diff --git a/src/model/Model.ts b/src/model/Model.ts
index 3f7e32d..f65cebc 100644
--- a/src/model/Model.ts
+++ b/src/model/Model.ts
@@ -31,10 +31,10 @@ import {
     CheckableConstructor
 } from '../util/clazz';
 
-import lineStyleMixin from './mixin/lineStyle';
 import areaStyleMixin from './mixin/areaStyle';
 import textStyleMixin from './mixin/textStyle';
-import itemStyleMixin from './mixin/itemStyle';
+import {LineStyleMixin} from './mixin/lineStyle';
+import {ItemStyleMixin} from './mixin/itemStyle';
 import GlobalModel from './Global';
 import { ModelOption } from '../util/types';
 import { Dictionary } from 'zrender/src/core/types';
@@ -254,9 +254,11 @@ type ModelConstructor = typeof Model
 enableClassExtend(Model as ModelConstructor);
 enableClassCheck(Model as ModelConstructor);
 
-mixin(Model, lineStyleMixin);
+interface Model extends LineStyleMixin, ItemStyleMixin {}
+
+zrUtil.tsMixin(Model, LineStyleMixin);
 mixin(Model, areaStyleMixin);
 mixin(Model, textStyleMixin);
-mixin(Model, itemStyleMixin);
+zrUtil.tsMixin(Model, ItemStyleMixin);
 
 export default Model;
diff --git a/src/model/Series.ts b/src/model/Series.ts
index 0f64d53..4191a1a 100644
--- a/src/model/Series.ts
+++ b/src/model/Series.ts
@@ -32,7 +32,7 @@ import {
     SeriesOption, ComponentLayoutMode, TooltipRenderMode, AxisValue, ZRColor
 } from '../util/types';
 import ComponentModel, { ComponentModelConstructor } from './Component';
-import ColorPaletteMixin from './mixin/colorPalette';
+import {ColorPaletteMixin} from './mixin/colorPalette';
 import DataFormatMixin from '../model/mixin/dataFormat';
 import Model from '../model/Model';
 import {
@@ -47,9 +47,9 @@ import {
 import {retrieveRawValue} from '../data/helper/dataProvider';
 import GlobalModel from './Global';
 import { CoordinateSystem } from '../coord/CoordinateSystem';
-import { ExtendableConstructor, mountExtend } from '../util/clazz';
+import { ExtendableConstructor, mountExtend, ClassManager, Constructor } from '../util/clazz';
 import { PipelineContext, SeriesTaskContext, GeneralTask, OverallTask, SeriesTask } from '../stream/Scheduler';
-import { LegendVisualProviderType } from '../visual/LegendVisualProvider';
+import LegendVisualProvider from '../visual/LegendVisualProvider';
 import List from '../data/List';
 import Source from '../data/Source';
 
@@ -66,6 +66,9 @@ class SeriesModel extends ComponentModel {
     // @readonly
     type: string;
 
+    // Should be implenented in subclass.
+    defaultOption: SeriesOption;
+
     // @readonly
     seriesIndex: number;
 
@@ -78,7 +81,7 @@ class SeriesModel extends ComponentModel {
     pipelineContext: PipelineContext;
 
     // legend visual provider to the legend component
-    legendVisualProvider: LegendVisualProviderType;
+    legendVisualProvider: LegendVisualProvider;
 
     // Access path of color for visual
     visualColorAccessPath: string;
@@ -540,6 +543,9 @@ class SeriesModel extends ComponentModel {
      */
     preventIncremental: () => boolean;
 
+    static registerClass(clz: Constructor): Constructor {
+        return ComponentModel.registerClass(clz);
+    }
 }
 
 interface SeriesModel extends DataFormatMixin, ColorPaletteMixin, DataHost {}
diff --git a/src/model/mixin/colorPalette.ts b/src/model/mixin/colorPalette.ts
index b53daf1..3e72159 100644
--- a/src/model/mixin/colorPalette.ts
+++ b/src/model/mixin/colorPalette.ts
@@ -36,7 +36,7 @@ function getNearestColorPalette(
     return colors[paletteNum - 1];
 }
 
-interface ColorPaletteMixin extends Model {}
+interface ColorPaletteMixin extends Pick<Model, 'get'> {}
 
 class ColorPaletteMixin {
 
@@ -87,4 +87,4 @@ class ColorPaletteMixin {
     }
 };
 
-export default ColorPaletteMixin
+export {ColorPaletteMixin};
diff --git a/src/model/mixin/dataFormat.ts b/src/model/mixin/dataFormat.ts
index c337cb8..3c3b283 100644
--- a/src/model/mixin/dataFormat.ts
+++ b/src/model/mixin/dataFormat.ts
@@ -20,43 +20,13 @@
 import {retrieveRawValue} from '../../data/helper/dataProvider';
 import {getTooltipMarker, formatTpl, TooltipMarker} from '../../util/format';
 import { getTooltipRenderMode } from '../../util/model';
-import { DataHost, DisplayStatus, DimensionName, TooltipRenderMode } from '../../util/types';
+import { DataHost, DisplayState, TooltipRenderMode, DataParamsUserOutput } from '../../util/types';
 import GlobalModel from '../Global';
 import Element from 'zrender/src/Element';
-import { DimensionUserOuputEncode } from '../../data/helper/dimensionHelper';
 
 var DIMENSION_LABEL_REG = /\{@(.+?)\}/g;
 
 
-interface DataParams {
-    // component main type
-    componentType: string;
-    // component sub type
-    componentSubType: string;
-    componentIndex: number;
-    // series component sub type
-    seriesType?: string;
-    // series component index (the alias of `componentIndex` for series)
-    seriesIndex?: number;
-    seriesId?: string;
-    seriesName?: string;
-    name: string;
-    dataIndex: number;
-    data: any;
-    dataType?: string;
-    value: any;
-    color?: string;
-    borderColor?: string;
-    dimensionNames?: DimensionName[];
-    encode?: DimensionUserOuputEncode;
-    marker?: TooltipMarker;
-    status?: DisplayStatus;
-    dimensionIndex?: number;
-
-    // Param name list for mapping `a`, `b`, `c`, `d`, `e`
-    $vars: string[];
-}
-
 interface DataFormatMixin extends DataHost {
     ecModel: GlobalModel;
     mainType: string;
@@ -76,7 +46,7 @@ class DataFormatMixin {
         dataIndex: number,
         dataType?: string,
         el?: Element // May be used in override.
-    ): DataParams {
+    ): DataParamsUserOutput {
 
         var data = this.getData(dataType);
         var rawValue = this.getRawValue(dataIndex, dataType);
@@ -132,7 +102,7 @@ class DataFormatMixin {
     getFormattedLabel(
         this: DataFormatMixin,
         dataIndex: number,
-        status?: DisplayStatus,
+        status?: DisplayState,
         dataType?: string,
         dimIndex?: number,
         labelProp?: string
diff --git a/src/model/mixin/itemStyle.ts b/src/model/mixin/itemStyle.ts
index 8875635..5703152 100644
--- a/src/model/mixin/itemStyle.ts
+++ b/src/model/mixin/itemStyle.ts
@@ -17,9 +17,8 @@
 * under the License.
 */
 
-// @ts-nocheck
-
 import makeStyleMapper from './makeStyleMapper';
+import Model from '../Model';
 
 var getItemStyle = makeStyleMapper(
     [
@@ -36,17 +35,22 @@ var getItemStyle = makeStyleMapper(
     ]
 );
 
-export default {
-    getItemStyle: function (excludes, includes) {
+interface ItemStyleMixin extends Pick<Model, 'get'> {}
+
+class ItemStyleMixin {
+
+    getItemStyle(excludes?: string[], includes?: string[]) {
         var style = getItemStyle(this, excludes, includes);
         var lineDash = this.getBorderLineDash();
-        lineDash && (style.lineDash = lineDash);
+        lineDash && ((style as any).lineDash = lineDash);
         return style;
-    },
+    }
 
-    getBorderLineDash: function () {
+    getBorderLineDash() {
         var lineType = this.get('borderType');
         return (lineType === 'solid' || lineType == null) ? null
             : (lineType === 'dashed' ? [5, 5] : [1, 1]);
     }
-};
\ No newline at end of file
+}
+
+export {ItemStyleMixin};
diff --git a/src/model/mixin/lineStyle.ts b/src/model/mixin/lineStyle.ts
index 1925d57..3a0c8cb 100644
--- a/src/model/mixin/lineStyle.ts
+++ b/src/model/mixin/lineStyle.ts
@@ -17,9 +17,8 @@
 * under the License.
 */
 
-// @ts-nocheck
-
 import makeStyleMapper from './makeStyleMapper';
+import Model from '../Model';
 
 var getLineStyle = makeStyleMapper(
     [
@@ -33,16 +32,19 @@ var getLineStyle = makeStyleMapper(
     ]
 );
 
-export default {
-    getLineStyle: function (excludes) {
+interface LineStyleMixin extends Pick<Model, 'get'> {}
+
+class LineStyleMixin {
+
+    getLineStyle(excludes?: string[]) {
         var style = getLineStyle(this, excludes);
         // Always set lineDash whether dashed, otherwise we can not
         // erase the previous style when assigning to el.style.
-        style.lineDash = this.getLineDash(style.lineWidth);
+        (style as any).lineDash = this.getLineDash((style as any).lineWidth);
         return style;
-    },
+    }
 
-    getLineDash: function (lineWidth) {
+    getLineDash(lineWidth?: number) {
         if (lineWidth == null) {
             lineWidth = 1;
         }
@@ -60,4 +62,6 @@ export default {
             ? [dashSize, dashSize]
             : [dotSize, dotSize];
     }
-};
\ No newline at end of file
+};
+
+export {LineStyleMixin};
diff --git a/src/model/mixin/makeStyleMapper.ts b/src/model/mixin/makeStyleMapper.ts
index 319cd38..e7de475 100644
--- a/src/model/mixin/makeStyleMapper.ts
+++ b/src/model/mixin/makeStyleMapper.ts
@@ -30,7 +30,7 @@ export default function (properties) {
             properties[i][1] = properties[i][0];
         }
     }
-    return function (model, excludes, includes) {
+    return function (model, excludes, includes?) {
         var style = {};
         for (var i = 0; i < properties.length; i++) {
             var propName = properties[i][1];
diff --git a/src/util/clazz.ts b/src/util/clazz.ts
index de45dd5..619b041 100644
--- a/src/util/clazz.ts
+++ b/src/util/clazz.ts
@@ -189,11 +189,11 @@ function superApply(this: any, context: any, methodName: string, args: any): any
     return this.superClass.prototype[methodName].apply(context, args);
 }
 
-type Constructor = new (...args: any) => any;
+export type Constructor = new (...args: any) => any;
 type SubclassContainer = {[subType: string]: Constructor} & {[IS_CONTAINER]?: true};
 
 export interface ClassManager {
-    registerClass: (clz: Constructor, componentType: ComponentFullType) => Constructor;
+    registerClass: (clz: Constructor) => Constructor;
     getClass: (
         componentMainType: ComponentMainType, subType?: ComponentSubType, throwWhenNotFound?: boolean
     ) => Constructor;
@@ -232,12 +232,23 @@ export function enableClassManagement(
     } = {};
 
     target.registerClass = function (
-        clz: Constructor,
-        componentType: ComponentFullType
+        clz: Constructor
     ): Constructor {
-        if (componentType) {
-            checkClassType(componentType);
-            var componentTypeInfo = parseClassType(componentType);
+
+        // `type` should not be a "instance memeber".
+        // If using TS class, should better declared as `static type = 'series.pie'`.
+        // otherwise users have to mount `type` on prototype manually.
+        // For backward compat and enable instance visit type via `this.type`,
+        // we stil support fetch `type` from prototype.
+        var componentFullType = (clz as any).type || clz.prototype.type;
+
+        if (componentFullType) {
+            checkClassType(componentFullType);
+
+            // If only static type declared, we assign it to prototype mandatorily.
+            clz.prototype.type = componentFullType;
+
+            var componentTypeInfo = parseClassType(componentFullType);
 
             if (!componentTypeInfo.sub) {
                 if (__DEV__) {
@@ -336,7 +347,7 @@ export function enableClassManagement(
         if (originalExtend) {
             (target as any).extend = function (proto: any) {
                 var ExtendedClass = originalExtend.call(this, proto);
-                return target.registerClass(ExtendedClass, proto.type);
+                return target.registerClass(ExtendedClass);
             };
         }
     }
diff --git a/src/util/graphic.ts b/src/util/graphic.ts
index 1064c2d..a7cd84a 100644
--- a/src/util/graphic.ts
+++ b/src/util/graphic.ts
@@ -559,7 +559,7 @@ function shouldSilent(el, e) {
  * @param {Function} [el.highDownOnUpdate] See `graphic.setAsHighDownDispatcher`.
  * @param {Object|boolean} [hoverStyle] See `graphic.setElementHoverStyle`.
  */
-export function setHoverStyle(el, hoverStyle) {
+export function setHoverStyle(el, hoverStyle?) {
     setAsHighDownDispatcher(el, true);
     traverseUpdate(el, setElementHoverStyle, hoverStyle);
 }
@@ -666,7 +666,7 @@ export function setLabelStyle(
     normalStyle, emphasisStyle,
     normalModel, emphasisModel,
     opt,
-    normalSpecified, emphasisSpecified
+    normalSpecified, emphasisSpecified?
 ) {
     opt = opt || EMPTY_OBJ;
     var labelFetcher = opt.labelFetcher;
@@ -1143,7 +1143,7 @@ function animateOrSetProps(isUpdate, el, props, animatableModel, dataIndex, cb)
  *         position: [100, 100]
  *     }, seriesModel, function () { console.log('Animation done!'); });
  */
-export function updateProps(el, props, animatableModel, dataIndex, cb) {
+export function updateProps(el, props, animatableModel, dataIndex, cb?) {
     animateOrSetProps(true, el, props, animatableModel, dataIndex, cb);
 }
 
@@ -1161,7 +1161,7 @@ export function updateProps(el, props, animatableModel, dataIndex, cb) {
  * @param {number} [dataIndex]
  * @param {Function} cb
  */
-export function initProps(el, props, animatableModel, dataIndex, cb) {
+export function initProps(el, props, animatableModel, dataIndex, cb?) {
     animateOrSetProps(false, el, props, animatableModel, dataIndex, cb);
 }
 
diff --git a/src/util/model.ts b/src/util/model.ts
index ccac59b..f6a3ee0 100644
--- a/src/util/model.ts
+++ b/src/util/model.ts
@@ -23,7 +23,7 @@ import Component from '../model/Component';
 import GlobalModel, { QueryConditionKindB } from '../model/Global';
 import ComponentModel from '../model/Component';
 import List from '../data/List';
-import { Payload, ComponentOption, ComponentMainType, ComponentSubType, DisplayStatusHostOption, OptionDataItem, OptionDataPrimitive, TooltipRenderMode } from './types';
+import { Payload, ComponentOption, ComponentMainType, ComponentSubType, DisplayStateHostOption, OptionDataItem, OptionDataPrimitive, TooltipRenderMode } from './types';
 import { Dictionary } from 'zrender/src/core/types';
 
 var each = zrUtil.each;
@@ -63,7 +63,7 @@ export function normalizeToArray<T>(value: T | T[]): T[] {
  *     }
  */
 export function defaultEmphasis(
-    opt: DisplayStatusHostOption,
+    opt: DisplayStateHostOption,
     key: string,
     subOpts: string[]
 ): void {
diff --git a/src/util/types.ts b/src/util/types.ts
index 3809873..9eba141 100644
--- a/src/util/types.ts
+++ b/src/util/types.ts
@@ -37,6 +37,8 @@ import List, {ListDimensionType} from '../data/List';
 import { Dictionary } from 'zrender/src/core/types';
 import { GradientObject } from 'zrender/src/graphic/Gradient';
 import { PatternObject } from 'zrender/src/graphic/Pattern';
+import Source from '../data/Source';
+import { TooltipMarker } from './format';
 
 
 
@@ -259,7 +261,6 @@ export type SourceFormat =
     | typeof SOURCE_FORMAT_TYPED_ARRAY
     | typeof SOURCE_FORMAT_UNKNOWN;
 
-// FIXME:TS remove it finally
 export var SERIES_LAYOUT_BY_COLUMN = 'column' as const;
 export var SERIES_LAYOUT_BY_ROW = 'row' as const;
 
@@ -369,13 +370,12 @@ export type OptionDataItem =
     | {value: ArrayLike<OptionDataPrimitive>}; // Only for `SOURCE_FORMAT_KEYED_ORIGINAL`
 export type OptionDataPrimitive = string | number | Date;
 
-// FIXME:TS in fact ModelOption can be any?
 // export type ModelOption = Dictionary<any> | any[] | string | number | boolean | ((...args: any) => any);
 export type ModelOption = any;
 export type ThemeOption = Dictionary<any>;
 
-export type DisplayStatus = 'normal' | 'emphasis';
-export type DisplayStatusHostOption = {
+export type DisplayState = 'normal' | 'emphasis';
+export type DisplayStateHostOption = {
     emphasis?: Dictionary<any>,
     [key: string]: any
 };
@@ -393,6 +393,47 @@ export interface OptionEncode extends OptionEncodeVisualDimensions {
     [coordDim: string]: OptionEncodeValue
 }
 export type OptionEncodeValue = DimensionIndex[] | DimensionIndex | DimensionName[] | DimensionName;
+export type EncodeDefaulter = (source: Source, dimCount: number) => OptionEncode;
+
+export interface DataParamsUserOutput {
+    // component main type
+    componentType: string;
+    // component sub type
+    componentSubType: string;
+    componentIndex: number;
+    // series component sub type
+    seriesType?: string;
+    // series component index (the alias of `componentIndex` for series)
+    seriesIndex?: number;
+    seriesId?: string;
+    seriesName?: string;
+    name: string;
+    dataIndex: number;
+    data: any;
+    dataType?: string;
+    value: any;
+    color?: string;
+    borderColor?: string;
+    dimensionNames?: DimensionName[];
+    encode?: DimensionUserOuputEncode;
+    marker?: TooltipMarker;
+    status?: DisplayState;
+    dimensionIndex?: number;
+    percent?: number; // Only for chart like 'pie'
+
+    // Param name list for mapping `a`, `b`, `c`, `d`, `e`
+    $vars: string[];
+}
+export type DimensionUserOuputEncode = {
+    [coordOrVisualDimName: string]:
+        // index: coordDimIndex, value: dataDimIndex
+        DimensionIndex[]
+};
+export type DimensionUserOuput = {
+    // The same as `data.dimensions`
+    dimensionNames: DimensionName[]
+    encode: DimensionUserOuputEncode
+};
 
 export interface MediaQuery {
     minWidth?: number;
diff --git a/src/view/Chart.ts b/src/view/Chart.ts
index 87ace50..0e2ac7e 100644
--- a/src/view/Chart.ts
+++ b/src/view/Chart.ts
@@ -31,7 +31,7 @@ import ExtensionAPI from '../ExtensionAPI';
 import Element from 'zrender/src/Element';
 import {
     Payload, ViewRootGroup, ECEvent, EventQueryItem,
-    StageHandlerPlanReturn, DisplayStatus, StageHandlerProgressParams
+    StageHandlerPlanReturn, DisplayState, StageHandlerProgressParams
 } from '../util/types';
 import { SeriesTaskContext, SeriesTask } from '../stream/Scheduler';
 import List from '../data/List';
@@ -180,13 +180,14 @@ class Chart {
         inner(payload).updateMethod = methodName;
     }
 
+    static registerClass: clazzUtil.ClassManager['registerClass'];
 };
 
 
 /**
  * Set state of single element
  */
-function elSetState(el: Element, state: DisplayStatus, highlightDigit: number) {
+function elSetState(el: Element, state: DisplayState, highlightDigit: number) {
     if (el) {
         el.trigger(state, highlightDigit);
         if (el.isGroup
@@ -200,7 +201,7 @@ function elSetState(el: Element, state: DisplayStatus, highlightDigit: number) {
     }
 }
 
-function toggleHighlight(data: List, payload: Payload, state: DisplayStatus) {
+function toggleHighlight(data: List, payload: Payload, state: DisplayState) {
     var dataIndex = modelUtil.queryDataIndex(data, payload);
 
     var highlightDigit = (payload && payload.highlightKey != null)
diff --git a/src/view/Component.ts b/src/view/Component.ts
index 5cbf955..0417ccd 100644
--- a/src/view/Component.ts
+++ b/src/view/Component.ts
@@ -83,6 +83,7 @@ class Component {
         seriesModel: ComponentModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload
     ) => void | {update: true};
 
+    static registerClass: clazzUtil.ClassManager['registerClass'];
 };
 
 export type ComponentViewConstructor = typeof Component
diff --git a/src/visual/LegendVisualProvider.ts b/src/visual/LegendVisualProvider.ts
index 9f4663e..e3b8778 100644
--- a/src/visual/LegendVisualProvider.ts
+++ b/src/visual/LegendVisualProvider.ts
@@ -67,4 +67,3 @@ class LegendVisualProvider {
 }
 
 export default LegendVisualProvider;
-export type LegendVisualProviderType = typeof LegendVisualProvider;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org