Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Enable lax overloads only in release
- Loading branch information
Showing
9 changed files
with
118 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// @ts-check | ||
// Sets the Strict type that TypeDoc uses to enable overloads for consumers only. | ||
// See the rationale in src/lib/utils/index.ts | ||
|
||
const fs = require('fs-extra'); | ||
const { join } = require('path'); | ||
|
||
const file = join(__dirname, '../src/lib/utils/index.ts'); | ||
|
||
const isStrict = process.argv[2] === 'true' | ||
|
||
fs.readFile(file, { encoding: 'utf-8'}) | ||
.then(text => fs.writeFile(file, text.replace(/type Strict =.*/, `type Strict = ${isStrict};`))) | ||
.catch(reason => { | ||
console.error(reason); | ||
process.exit(1); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.