From 85ea46548925314de60091443e134ad2f7c9f200 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Tue, 12 Nov 2024 16:27:42 -0500 Subject: [PATCH] fix: Switch some imports to type imports --- src/files/deno.test.ts | 2 +- src/files/filetree.test.ts | 4 ++-- src/files/filetree.ts | 2 +- src/files/gzip.ts | 4 ++-- src/files/tiff.ts | 4 ++-- src/schema/fixtures.test.ts | 2 +- src/schema/tables.ts | 4 ++-- src/validators/citation.test.ts | 2 +- src/validators/filenameValidate.test.ts | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/files/deno.test.ts b/src/files/deno.test.ts index 24e4c13f..330f99f2 100644 --- a/src/files/deno.test.ts +++ b/src/files/deno.test.ts @@ -2,7 +2,7 @@ import { assert, assertEquals, assertRejects } from '@std/assert' import { readAll, readerFromStreamReader } from '@std/io' import { basename, dirname, fromFileUrl, join } from '@std/path' import { EOL } from '@std/fs' -import { FileTree } from '../types/filetree.ts' +import type { FileTree } from '../types/filetree.ts' import { BIDSFileDeno, readFileTree, UnicodeDecodeError } from './deno.ts' import { requestReadPermission } from '../setup/requestPermissions.ts' import { FileIgnoreRules } from './ignore.ts' diff --git a/src/files/filetree.test.ts b/src/files/filetree.test.ts index 9c990bb1..b23307e3 100644 --- a/src/files/filetree.test.ts +++ b/src/files/filetree.test.ts @@ -1,6 +1,6 @@ import { assert, assertEquals } from '@std/assert' -import { FileIgnoreRules } from './ignore.ts' -import { FileTree } from '../types/filetree.ts' +import type { FileIgnoreRules } from './ignore.ts' +import type { FileTree } from '../types/filetree.ts' import { filesToTree, pathsToTree } from './filetree.ts' Deno.test('FileTree generation', async (t) => { diff --git a/src/files/filetree.ts b/src/files/filetree.ts index aac9734e..eae12bd4 100644 --- a/src/files/filetree.ts +++ b/src/files/filetree.ts @@ -1,6 +1,6 @@ import { parse, SEPARATOR_PATTERN } from '@std/path' import * as posix from '@std/path/posix' -import { BIDSFile, FileTree } from '../types/filetree.ts' +import type { BIDSFile, FileTree } from '../types/filetree.ts' const nullFile = { size: 0, diff --git a/src/files/gzip.ts b/src/files/gzip.ts index e15f0f85..f5ec02ca 100644 --- a/src/files/gzip.ts +++ b/src/files/gzip.ts @@ -2,8 +2,8 @@ * GZIP * Module for extracting gzip metadata from a file */ -import { Gzip } from '@bids/schema/context' -import { BIDSFile } from '../types/filetree.ts' +import type { Gzip } from '@bids/schema/context' +import type { BIDSFile } from '../types/filetree.ts' /** * Parse a gzip header from a file diff --git a/src/files/tiff.ts b/src/files/tiff.ts index ba828564..2634de0b 100644 --- a/src/files/tiff.ts +++ b/src/files/tiff.ts @@ -2,9 +2,9 @@ * TIFF * Module for extracting Tiff metadata */ -import { Ome, Tiff } from '@bids/schema/context' +import type { Ome, Tiff } from '@bids/schema/context' import * as XML from '@libs/xml' -import { BIDSFile } from '../types/filetree.ts' +import type { BIDSFile } from '../types/filetree.ts' function getImageDescription( dataview: DataView, diff --git a/src/schema/fixtures.test.ts b/src/schema/fixtures.test.ts index 9f5f7b8f..45c00df7 100644 --- a/src/schema/fixtures.test.ts +++ b/src/schema/fixtures.test.ts @@ -1,4 +1,4 @@ -import { BIDSFile, FileTree } from '../types/filetree.ts' +import type { BIDSFile, FileTree } from '../types/filetree.ts' import { pathsToTree } from '../files/filetree.ts' import { nullReadBytes } from '../tests/nullReadBytes.ts' diff --git a/src/schema/tables.ts b/src/schema/tables.ts index acf88a8c..77bc3bed 100644 --- a/src/schema/tables.ts +++ b/src/schema/tables.ts @@ -1,5 +1,5 @@ -import { GenericRule, GenericSchema, SchemaType, SchemaTypeLike } from '../types/schema.ts' -import { BIDSContext } from './context.ts' +import type { GenericRule, GenericSchema, SchemaType, SchemaTypeLike } from '../types/schema.ts' +import type { BIDSContext } from './context.ts' interface ColumnDefinition { Levels?: Record diff --git a/src/validators/citation.test.ts b/src/validators/citation.test.ts index 16bcfbcb..7b7f0227 100644 --- a/src/validators/citation.test.ts +++ b/src/validators/citation.test.ts @@ -3,7 +3,7 @@ import { pathsToTree } from '../files/filetree.ts' import { BIDSFileDeno } from '../files/deno.ts' import { citationValidate } from './citation.ts' import { BIDSContextDataset } from '../schema/context.ts' -import { GenericSchema } from '../types/schema.ts' +import type { GenericSchema } from '../types/schema.ts' import { loadSchema } from '../setup/loadSchema.ts' Deno.test('citation validation', async (t) => { diff --git a/src/validators/filenameValidate.test.ts b/src/validators/filenameValidate.test.ts index 9771d32c..af741e52 100644 --- a/src/validators/filenameValidate.test.ts +++ b/src/validators/filenameValidate.test.ts @@ -1,4 +1,4 @@ -import { FileTree } from '../types/filetree.ts' +import type { FileTree } from '../types/filetree.ts' import type { GenericSchema } from '../types/schema.ts' import { assertEquals } from '@std/assert' import { BIDSContext } from '../schema/context.ts'