Skip to content

Commit 39b2a3a

Browse files
fix: allow d.ts files instead of no slow types in score (#992)
Co-authored-by: Leo Kettmeir <[email protected]>
1 parent d15c0fc commit 39b2a3a

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

api/src/analysis.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ async fn analyze_package_inner(
204204
None
205205
}
206206
})
207-
.all(|js| js.fast_check_module().is_some());
207+
.all(|js| {
208+
js.maybe_types_dependency.is_some() || js.fast_check_module().is_some()
209+
});
208210

209211
let doc_nodes =
210212
crate::docs::generate_docs(roots, &graph, &module_analyzer.analyzer)

api/testdata/tarballs/dts/jsr.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "@scope/foo",
3+
"version": "1.2.3",
4+
"exports": "./mod.js"
5+
}

api/testdata/tarballs/dts/mod.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* This is a test constant.
3+
*/
4+
export const hello = "Hello, world!";

api/testdata/tarballs/dts/mod.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* @ts-self-types="./mod.d.ts" */
2+
export const hello = "Hello, world!";

0 commit comments

Comments
 (0)