pokemon-showdown-client/package.json
Guangcong Luo 0d05feb41b Migrate to optional chaining and TypeScript 3.7
This is something I probably wouldn't have rushed nearly as much,
except I have a serious use-case coming up; specifically

```js
foo = document.querySelector('foo')?.bar;
```

in a class property.

`document.querySelector('foo') && document.querySelector('foo').bar`
is incredibly inefficient here, but TypeScript doesn't consider
`(document.querySelector('foo') || {}).bar` to be valid because `{}`
doesn't have the `.bar` property. Creating a temporary variable
would have been a huge mess because this was a class property
initializer.

In hindsight, `(document.querySelector('foo')! || {}).bar` would
probably have worked, but too late now.
2019-10-13 01:28:36 +11:00

41 lines
1.6 KiB
JSON

{
"name": "pokemon-showdown-client",
"version": "0.11.2",
"author": "Guangcong Luo <guangcongluo@gmail.com> (http://guangcongluo.com)",
"homepage": "https://pokemonshowdown.com",
"license": "AGPL-3.0",
"repository": {
"type": "git",
"url": "https://github.com/Zarel/Pokemon-Showdown-Client.git"
},
"scripts": {
"test": "eslint --config=.eslintrc.js --cache --cache-file=eslint-cache/base js/ data/ && eslint --config=build-tools/.eslintrc.js --cache --cache-file=eslint-cache/build build-tools/update build-tools/build-indexes && tslint --project . && tsc && node build && mocha",
"fix": "eslint --config=.eslintrc.js --fix js/ && eslint --config=build-tools/.eslintrc.js --fix build-tools/update build-tools/build-indexes",
"build": "node build",
"build-full": "node build full"
},
"dependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.3",
"@babel/plugin-proposal-class-properties": "^7.3.3",
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
"@babel/plugin-transform-member-expression-literals": "^7.2.0",
"@babel/plugin-transform-property-literals": "^7.2.0",
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@babel/preset-env": "^7.3.1",
"@babel/preset-typescript": "^7.3.3",
"google-auth-library": "^3.1.0",
"image-size": "^0.7.2"
},
"devDependencies": {
"@types/jquery": "^3.3.29",
"@types/mocha": "^5.2.6",
"eslint": "^5.15.1",
"mocha": "^6.0.2",
"preact": "^8.3.1",
"tslint": "^5.13.0",
"typescript": "^3.7.0-dev.20191011"
},
"private": true
}