ami
ami copied to clipboard
TS2339: Property '_params' does not exist on type '(Anonymous class)'.
I am using npm to install latest version of AMI, and when I import to use them, I got error syntax like TS2339: Property ' ' does not exist on type '(Anonymous class)'. How should I fix that? here is my wepack config:
const path = require('path');
const webpack = require('webpack');
module.exports = {
mode: 'development',
entry: './src/main.js',
output: {
path: path.resolve(__dirname, './public'),
filename: 'app.bundle.js'
},
resolve: {
extensions: ['.ts', '.js', '.css', '.html']
},
module:{
rules:[
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env']
}
}
},
{
test: /\.ts$/,
use: {
loader: 'ts-loader'
}
}]
},
plugins:[
new webpack.ProvidePlugin({
THREE: 'three'
})
],
devServer: {
host: '0.0.0.0',
port:8888,
disableHostCheck: true,
contentBase: [path.join(__dirname, "public"),path.join("/")]
}
};
and tsconfig.json
{
"compilerOptions": {
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"declaration": false /* Generates corresponding '.d.ts' file. */,
"declarationMap": false /* Generates a sourcemap for each corresponding '.d.ts' file. */,
"sourceMap": true /* Generates corresponding '.map' file. */,
"outDir": "./" /* Redirect output structure to the directory. */,
"strict": false /* Enable all strict type-checking options. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "lib": "es6"
},
}
Thank you.