Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ matrix:
install:
- npm install -g npm@latest
- npm ci
# https://github.com/microsoft/TypeScript/issues/40166
- |
if [ "$TRAVIS_NODE_VERSION" = '6' ]; then npm install typescript@3.9.7 ; fi
script:
- npm test
cache:
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"minimist": "^1.2.0",
"nyc": "^13.3.0",
"postcss": "^7.0.14",
"semver": "^5.6.0"
"semver": "^5.6.0",
"typescript": "^4.0.3"
},
"main": "dist/index.js",
"types": "postcss-selector-parser.d.ts",
Expand All @@ -31,7 +32,7 @@
"postcss-selector-parser.d.ts"
],
"scripts": {
"pretest": "eslint src",
"pretest": "eslint src && tsc --noEmit postcss-selector-parser.d.ts",
"prepare": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/",
"lintfix": "eslint --fix src",
"report": "nyc report --reporter=html",
Expand Down
3 changes: 2 additions & 1 deletion postcss-selector-parser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,10 @@ declare namespace parser {
function root(opts: ContainerOptions): Root;
function isRoot(node: any): node is Root;

interface Selector extends Container<string, Diff<Node, Selector>> {
interface _Selector<S> extends Container<string, Diff<Node, S>> {
type: "selector";
}
type Selector = _Selector<Selector>;
function selector(opts: ContainerOptions): Selector;
function isSelector(node: any): node is Selector;

Expand Down