Skip to content

Commit

Permalink
docs: Add more useImportType examples to docs (#2307)
Browse files Browse the repository at this point in the history
Co-authored-by: Emanuele Stoppa <[email protected]>
  • Loading branch information
drwpow and ematipico committed Apr 23, 2024
1 parent 2ecfe4c commit b120c98
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions crates/biome_js_analyze/src/lint/style/use_import_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ declare_rule! {
/// import { type A, type B } from "./mod.js";
/// ```
///
/// ```ts,expect_diagnostic
/// import { type A, B } from "./mod.js";
/// let c: A;
/// let d: typeof B;
/// ```
///
/// ### Valid
///
/// ```ts
Expand All @@ -80,6 +86,12 @@ declare_rule! {
/// let a: B = new B();
/// ```
///
/// ```ts
/// import { type A, B } from "./mod.js";
/// let c: A;
/// let d = new B();
/// ```
///
/// The rule ignores unused imports and imports with import attributes.
///
/// ```ts
Expand Down

0 comments on commit b120c98

Please sign in to comment.