Skip to content

Commit

Permalink
improve type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart Veneman authored and bartveneman committed Mar 16, 2024
1 parent 0338cb6 commit 24bcd2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function calculateScore({ result, guards }) {
}
}

/** @param {ReturnType<import('@projectwallace/css-analyzer').analyze>} analysis */
export function calculate(analysis) {
const performance = calculateScore({ result: analysis, guards: performanceGuards })
const maintainability = calculateScore({ result: analysis, guards: maintainabilityGuards })
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { analyze } from '@projectwallace/css-analyzer'
import { calculate as calculateFromAnalysis } from './core.js'

/** @param {string} css */
export function calculate(css) {
const analysis = analyze(css)
return calculateFromAnalysis(analysis)
Expand Down

0 comments on commit 24bcd2f

Please sign in to comment.