Skip to content

Commit b0c683d

Browse files
committed
See changesets
1 parent 30a6f92 commit b0c683d

File tree

5 files changed

+33
-0
lines changed

5 files changed

+33
-0
lines changed

.changeset/fresh-toes-serve.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'ts-error-translator': minor
3+
---
4+
5+
Updated icon

.changeset/spotty-bananas-fly.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'ts-error-translator': patch
3+
'@total-typescript/tips-parser': patch
4+
---
5+
6+
Added bigint type

apps/vscode/media/icon.png

-166 KB
Loading

packages/parser/src/tipInfo.ts

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ export type TipInfo = {
1616
};
1717

1818
export const tipInfo: TipInfo = {
19+
bigint: {
20+
name: 'BigInt type',
21+
message: `The bigint type lets you represent integers that are too large to be represented by 'number'.`,
22+
link: 'https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-2.html#bigint',
23+
difficulty: 'not-easy',
24+
},
1925
'as-const': {
2026
name: 'const assertions',
2127
message: `const assertions let you mark an expression as deeply immutable. This means it gets narrowed to its narrowest possible type.`,

packages/parser/src/tips.ts

+16
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,22 @@ export const allTips = [
270270
};
271271
},
272272
),
273+
createInlineTip(
274+
'bigint',
275+
z.object({
276+
loc: SourceLocationSchema,
277+
}),
278+
({ parse, push }) => {
279+
return {
280+
TSBigIntKeyword(path) {
281+
safeParse(() => {
282+
const node = parse(path.node);
283+
push(node.loc);
284+
});
285+
},
286+
};
287+
},
288+
),
273289
createInlineTip(
274290
'any-type',
275291
z.object({

0 commit comments

Comments
 (0)