Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Test your TypeScript types easily.
This is a lighter version of tsd
. Slightly reworked codebase allows tsd-lite
to be a tool which simply tests your types.
Note This library is intended for programmatic use only. For an integration with Jest see
jest-runner-tsd
, if you prefer standalone CLI implementation checktsd-lite-cli
.
While tsd
suites perfectly for JavaScript libraries which declare their types in .d.ts
files, its usage with monorepos written in TypeScript may become cumbersome. tsd-lite
is an attempt to address these and similar issues.
tsd
tsd-lite
performs only type testing without any additional checks or rules.expectAssignable
, expectDeprecated
, expectType
and their counterparts. Currently other APIs (like expectNever
, expectDocCommentIncludes
and printType
) are not implement.tsconfig.json
for each test file (does not read options from package.json
).tsd-lite
is optionally strict
. You should add "strict": true
to the nearest tsconfig.json
(it can be project or test specific) to use strict assertions.@tsd/typescript
package is moved to peer dependencies.tsd-lite
allows only programmatic usage.yarn add -D tsd-lite @tsd/typescript
# or
npm install -D tsd-lite @tsd/typescript
Remember to install @tsd/typescript
. It is a required peer dependency.
import tsdLite from "tsd-lite";
const { assertionsCount, tsdResults } = tsdLite(
"/absolute/path/to/testFile.test.ts"
);
tsdLite(testFilePath: string)
The exported function takes fully resolved path to a test file as an argument and returns an object:
{
assertionsCount: number;
tsdResults: Array<{
messageText: string | ts.DiagnosticMessageChain;
file?: ts.SourceFile;
start?: number;
}>;
}
tsd-lite
will throw if TS compiler encountered an error while parsing tsconfig.json
or a syntax error is found while compiling the code.
FAQs
Test your TypeScript types easily
The npm package tsd-lite receives a total of 0 weekly downloads. As such, tsd-lite popularity was classified as not popular.
We found that tsd-lite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.