-
Notifications
You must be signed in to change notification settings - Fork 326
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
Build tasks: Fix various JSDoc types #3380
Conversation
@@ -14,7 +14,7 @@ export async function writeAsset (filePath, result) { | |||
const writeTasks = [] | |||
|
|||
// Files to write | |||
const code = result.code || result.css?.toString() | |||
const code = 'css' in result ? result.css : result.code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Dart Sass landed in #3164 so result.css
no longer needs toString()
@@ -49,5 +49,5 @@ export async function writeAsset (filePath, result) { | |||
* 2. Terser minified bundle | |||
* 3. Sass compiler result | |||
* | |||
* @typedef {import('rollup').OutputChunk | import('terser').MinifyOutput | import('node-sass').Result} AssetOutput | |||
* @typedef {import('rollup').OutputChunk | import('terser').MinifyOutput | import('postcss').Result} AssetOutput |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed reference to node-sass
which should be the PostCSS transform result
4d754e2
to
4ec4388
Compare
@@ -111,7 +111,8 @@ | |||
"stylelint-config-gds": "^0.2.0", | |||
"stylelint-order": "^6.0.2", | |||
"typed-query-selector": "^2.9.1", | |||
"typescript": "^4.9.5" | |||
"typescript": "^4.9.5", | |||
"vinyl": "^3.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We removed this one but forgot we still type component data with it:
/**
* @param {import('vinyl')} file
* @returns {Promise<import('vinyl')>}
*/
4ec4388
to
5f9d5e3
Compare
5f9d5e3
to
2d8b490
Compare
2d8b490
to
b560fd8
Compare
1039b99
to
d4db145
Compare
@@ -170,7 +170,7 @@ async function generateMacroOptions (file) { | |||
* Parse YAML file content as JavaScript | |||
* | |||
* @param {import('vinyl')} file - Component data ${componentName}.yaml | |||
* @returns {Promise<{ examples?: unknown[]; params?: unknown[] }>} Component options | |||
* @returns {Promise<{ examples?: Record<string, unknown>[]; params?: Record<string, unknown>[] }>} Component options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question Likely non blocking, but what does the Record
type represent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a utility type for objects that are always keyed with the same name/value pair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh didn't think to look in the built-in types, cheers 😄
d4db145
to
f14899f
Compare
Incorrectly presumed to be unused in ad61d19
b560fd8
to
a0109c1
Compare
This PR fixes various JSDoc types that have drifted due to:
node-sass
now removed)tsconfig.json