From 24bcd2f0959919a2f6b200bba6527a6fe4350473 Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Sat, 16 Mar 2024 11:31:30 +0100 Subject: [PATCH] improve type annotations --- src/core.js | 1 + src/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/core.js b/src/core.js index e6d15c8..f97923b 100644 --- a/src/core.js +++ b/src/core.js @@ -26,6 +26,7 @@ function calculateScore({ result, guards }) { } } +/** @param {ReturnType} analysis */ export function calculate(analysis) { const performance = calculateScore({ result: analysis, guards: performanceGuards }) const maintainability = calculateScore({ result: analysis, guards: maintainabilityGuards }) diff --git a/src/index.js b/src/index.js index c38a373..2bd40e6 100644 --- a/src/index.js +++ b/src/index.js @@ -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)