8000 feat(51086): satisfies support in JSDoc by a-tarasyuk · Pull Request #51753 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content

feat(51086): satisfies support in JSDoc #51753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
59b288f
feat(51086): add satisfies jsdoc tag
a-tarasyuk Dec 2, 2022
dbfcd01
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Dec 13, 2022
566fb91
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Dec 13, 2022
659c141
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Dec 14, 2022
7d823ae
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Dec 14, 2022
b57066f
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Dec 16, 2022
14bb0d6
add tests
a-tarasyuk Dec 17, 2022
6e2627f
handle JSDocSatisfies tag on declaration positions with initializer e…
a-tarasyuk Dec 17, 2022
b25fc68
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Jan 6, 2023
6020674
forbid omitted braces
a-tarasyuk Jan 10, 2023
3c70107
wrap JavaScript checks into a single condition
a-tarasyuk Jan 10, 2023
70edb6d
add tests
a-tarasyuk Jan 10, 2023
c929c19
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Jan 10, 2023
33ee5d1
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Jan 10, 2023
b9205de
fix tests
a-tarasyuk Jan 10, 2023
398e119
fix typo
a-tarasyuk Jan 11, 2023
fe1ee79
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Jan 11, 2023
62b9c22
improve handling of duplicate tags. fix handling a parenthesized init…
a-tarasyuk Jan 12, 2023
e07c71e
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Jan 13, 2023
98f7db6
update test
a-tarasyuk Jan 13, 2023
6b43a92
add satisfies tag completions
a-tarasyuk Jan 14, 2023
ffb310d
satisfies tag quick info
a-tarasyuk Jan 14, 2023
9fc9292
satisfies tag rename
a-tarasyuk Jan 14, 2023
3ad2a6e
satisfies tag find all references
a-tarasyuk Jan 14, 2023
c90c148
goto definition on satisfies tag
a-tarasyuk Jan 14, 2023
a9e7fda
add jsDoc parsing satisfies tag tests
a-tarasyuk Jan 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
Prev Previous commit
Next Next commit
add tests
  • Loading branch information
a-tarasyuk committed Dec 17, 2022
commit 14bb0d6fd6f2f1063650dfc5b85b74b7fce8b1f1
22 changes: 22 additions & 0 deletions tests/baselines/reference/checkJsdocSatisfiesTag11.errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/a.js(13,5): error TS1223: 'satisfies' tag already specified.


==== /a.js (1 errors) ====
/**
* @typedef {Object} T1
* @property {number} a
*/

/**
* @typedef {Object} T2
* @property {number} a
*/

/**
* @satisfies {T1}
* @satisfies {T2}
~~~~~~~~~~
!!! error TS1223: 'satisfies' tag already specified.
*/
const t1 = { a: 1 };

19 changes: 19 additions & 0 deletions tests/baselines/reference/checkJsdocSatisfiesTag11.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
=== /a.js ===
/**
* @typedef {Object} T1
* @property {number} a
*/

/**
* @typedef {Object} T2
* @property {number} a
*/

/**
* @satisfies {T1}
* @satisfies {T2}
*/
const t1 = { a: 1 };
>t1 : Symbol(t1, Decl(a.js, 14, 5))
>a : Symbol(a, Decl(a.js, 14, 12))

21 changes: 21 additions & 0 deletions tests/baselines/reference/checkJsdocSatisfiesTag11.types
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
=== /a.js ===
/**
* @typedef {Object} T1
* @property {number} a
*/

/**
* @typedef {Object} T2
* @property {number} a
*/

/**
* @satisfies {T1}
* @satisfies {T2}
*/
const t1 = { a: 1 };
>t1 : { a: number; }
>{ a: 1 } : { a: number; }
>a : number
>1 : 1

20 changes: 20 additions & 0 deletions tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag11.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// @noEmit: true
// @allowJS: true
// @checkJs: true

// @filename: /a.js
/**
* @typedef {Object} T1
* @property {number} a
*/

/**
* @typedef {Object} T2
* @property {number} a
*/

/**
* @satisfies {T1}
* @satisfies {T2}
*/
const t1 = { a: 1 };
0