8000 fix: TS2310 error by ybiquitous · Pull Request #233 · postcss/postcss-selector-parser · GitHub
Skip to content

Conversation

@ybiquitous
Copy link
Contributor

This change aims to fix the following TypeScript error:

postcss-selector-parser.d.ts:335:15 - error TS2310: Type 'Selector' recursively references itself as a base type.

In addition, npm run pretest now checks the .ts file to detect such errors.

Fix #232

This change aims to fix the following TypeScript error:

```
postcss-selector-parser.d.ts:335:15 - error TS2310: Type 'Selector' recursively references itself as a base type.
```

In addition, `npm run pretest` now checks the `.ts` file to detect such errors.

Fix #232
@coveralls
Copy link

coveralls commented Sep 25, 2020

Coverage Status

Coverage remained the same at 95.38% when pulling 3b7e294 on ybiquitous:issue-232 into 1682f72 on postcss:master.

@ybiquitous ybiquitous changed the title Fix TypeScript error: TS2310 fix: TS2310 error Sep 25, 2020
@ybiquitous
Copy link
Contributor Author

Oh, another error is raised on Node 6...

https://travis-ci.org/github/postcss/postcss-selector-parser/jobs/730246442#L857

image

@ybiquitous
Copy link
Contributor Author

Maybe the cause: microsoft/TypeScript#40166

Copy link
Collaborator

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you test it on stylelint repo?

@ybiquitous ybiquitous marked this pull request as ready for review September 25, 2020 13:24
@ybiquitous
Copy link
Contributor Author

Yes, I could confirm it is resolved on stylelint repo (on my local machine).

@ybiquitous
Copy link
Contributor Author

ybiquitous commented Sep 25, 2020

I've pushed this feature branch to my forked stylelint repo:
https://github.com/ybiquitous/stylelint/tree/postcss-selector-parser-repro

You can confirm it via the forked repo.

EDIT:

$ git clone --depth=1 https://github.com/ybiquitous/stylelint.git
$ cd stylelint
$ git fetch origin refs/heads/postcss-selector-parser-repro
$ npm ci
$ npm run lint:types

@alexander-akait
Copy link
Collaborator

Let's do patch release

@alexander-akait alexander-akait merged commit 15e0aa8 into postcss:master Sep 25, 2020
@ybiquitous ybiquitous deleted the issue-232 branch September 25, 2020 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TS2310: Type 'Selector' recursively references itself as a base type.

3 participants