TS2339: Property '_params' does not exist on type '(Anonymous class)'.
- Dominant language
- JavaScript
- Stars
- 745
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported TypeScript error with the provided webpack configuration, tsconfig.json, and the latest npm-installed AMI package. Inspect the package declarations or source for the anonymous class and _params reference; done means the AMI import builds without TS2339.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, three.js, typescript, webpack
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100