Skip to content

Commit

Permalink
Account for typed-ember/glint#697
Browse files Browse the repository at this point in the history
Update README

README

Add vitest

oof
  • Loading branch information
NullVoxPopuli committed Feb 1, 2024
1 parent 3cdee15 commit e046768
Show file tree
Hide file tree
Showing 8 changed files with 882 additions and 23 deletions.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,31 @@ At least one fixer is required to be specified in the second argument.

## Current Fixes

### Removes lines starting with `/// <reference types="ember`
### `/// <reference` removal

See [microsoft/TypeScript#56571](https://github.com/microsoft/TypeScript/issues/56571#issuecomment-1830436576) for details.

You can customize what's removed via:

```js
import { fixBadDeclarationOutput } from "fix-bad-declaration-output";

await fixBadDeclarationOutput(
"./declarations/**/*.d.ts",
[
"TypeScript#56571", // default: type: 'ember'

// remove anything starting with node_modules.
// e.g.: /// <reference type="node_modules/...
["TypeScript#56571", { types: 'node_modules '}],

"Glint#628"
"Glint#697"
]
);
```

#### Removes lines starting with `/// <reference types="ember`

Starting with TS 5.3.x, iirc, ember-source's strategy for shipping public types causes `/// <reference` declarations to be added in libraries.

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"prettier": "^3.2.4",
"publint": "^0.2.7",
"release-plan": "^0.7.0",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"vitest": "^1.2.2"
},
"publishConfig": {
"access": "public",
Expand Down
Loading

0 comments on commit e046768

Please sign in to comment.