tsutils icon indicating copy to clipboard operation
tsutils copied to clipboard

utility functions for working with typescript's AST

Results 32 tsutils issues
Sort by recently updated
recently updated
newest added

If you have code like this: ```typescript let p: { toFixed: () => string }; ``` And if you use `TSUtils.isTypeAssignableToNumber(checker, type)` where type comes from the AST and refers...

If a library like e.g. `eslint-plugin-jest` is built with typescript and depends on `tsutils`, then you will get an "unmet peer dependency" warning on typescript if you use that library...

Sample code: ```ts interface I { x: string; } interface J extends Readonly {} ``` isPropertyReadonlyInType returns false for "x" property in J interface, but it is readonly because of...

I'm upgrading typescript-eslint with typescript v4, but the tslib under tsutils is always installed as 1.x which is unable to work with typescript v4.3. Array spreading syntax is broken while...

In https://github.com/typescript-eslint/typescript-eslint/pull/4378/files#diff-b7600c047aa2f2fb16eafae5010267ecc7e6ab19a7a165d6a4cb860ffc0dfffa, I added the following functions: ```ts export function isTypeBigIntLiteralType( type: ts.Type, ): type is ts.BigIntLiteralType { return isTypeFlagSet(type, ts.TypeFlags.BigIntLiteral); } export function isTypeTemplateLiteralType( type: ts.Type, ): type is...

The working version in the package is 4.2, but the peer deps are up to 3.7.beta, can we fix this. Latest version of TS is already 4.5

tbh after reading the whole readme file I still don't know for sure what does this package do nor how to use it 🤷

Fixes https://github.com/typescript-eslint/typescript-eslint/issues/3405 The issue is that `modifiersType` doesn't necessarily exist in TypeScript's internal `MappedType`: https://github.com/microsoft/TypeScript/blob/5fde87135f25a2dbea8a98e05438e61fdad06fe6/src/compiler/types.ts#L5431 ```ts /* @internal */ export interface MappedType extends AnonymousType { // ... modifiersType?: Type; //...

Getting an error running `tsc` in one of our projects due to what looks like a bad `d.ts` file in tsutils. ``` $ ./node_modules/.bin/tsc node_modules/tsutils/util/util.d.ts:257:65 - error TS1110: Type expected....

I was having a problem after upgrading typescript to 4.1.5 in my project, related to webpack. Upgrading tslib manually seemed to work, so I figured I'd pass along the update...