-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typescript): update to typescript 4.3.5 (#3103)
update typescript to v4.3.5 add type annotations to methods that have an implicit any type in TS 4.3 - for more information, see microsoft/TypeScript#26623 map TS 4.3+ `JSDocTagInfo` to `CompilerJsDocTagInfo` - for more information, see microsoft/TypeScript#43312 add type guard for `TestingSystem`. in TS 4.3, `Object.defineProperties` is now generic, and returns the same type `T` as it's first argument. adding a typeguard allows consumers of this method to ensure they're receiving a `TestingSystem` object enable `noImplicitOverride` compiler flag
- Loading branch information
Showing
17 changed files
with
161 additions
and
90 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { mapJSDocTagInfo } from '../transform-utils'; | ||
|
||
describe('transform utils', () => { | ||
it('flattens TypeScript JSDocTagInfo to Stencil JSDocTagInfo', () => { | ||
// tags corresponds to the following JSDoc | ||
/* | ||
* @param foo the first parameter | ||
* @param bar | ||
* @returns | ||
* @see {@link https://example.com} | ||
*/ | ||
const tags = [ | ||
{ | ||
name: 'param', | ||
text: [ | ||
{ text: 'foo', kind: 'parameterName' }, | ||
{ text: ' ', kind: 'space' }, | ||
{ text: 'the first parameter', kind: 'text' }, | ||
], | ||
}, | ||
{ name: 'param', text: [{ text: 'bar', kind: 'text' }] }, | ||
{ name: 'returns', text: undefined }, | ||
{ | ||
name: 'see', | ||
text: [ | ||
{ text: '', kind: 'text' }, | ||
{ text: '{@link ', kind: 'link' }, | ||
{ text: 'https://example.com', kind: 'linkText' }, | ||
{ text: '}', kind: 'link' }, | ||
], | ||
}, | ||
]; | ||
|
||
expect(mapJSDocTagInfo(tags)).toEqual([ | ||
{ name: 'param', text: 'foo the first parameter' }, | ||
{ name: 'param', text: 'bar' }, | ||
{ name: 'returns', text: undefined }, | ||
{ name: 'see', text: '{@link https://example.com}' }, | ||
]); | ||
}); | ||
}); |
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.