Skip to content

Commit

Permalink
chore: Rather use type instead of interface where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
bencergazda committed Jun 14, 2021
1 parent 8872636 commit 28f0715
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ParsedCommandLine } from 'typescript';

export interface CliOptions {
export type CliOptions = {
watch?: boolean;
build?: boolean;
project: string;
}

export interface Config {
export type Config = {
cwd: string;
cli_options: CliOptions,
ts_config: ParsedCommandLine,
Expand All @@ -15,7 +15,7 @@ export interface Config {
rules: Rule[];
}

export interface Rule {
export type Rule = {
test?: RuleCondition;
include?: RuleCondition;
exclude?: RuleCondition;
Expand All @@ -34,7 +34,7 @@ export type RuleCondition =

export type RuleConditions = RuleCondition[];

export interface Loader {
export type Loader = {
/**
* A path reference to the loader function, or the loader function itself.
*/
Expand All @@ -54,14 +54,14 @@ export type LoaderMeta = {
config: Config;
}

export interface TsProject {
export type TsProject = {
project_name: string;
base_path: string;
ts_config_path: string;
root_dir: string;
out_dir: string;
}

export interface TsProjectWithFiles extends TsProject {
export type TsProjectWithFiles = TsProject & {
source_files: string[];
}

0 comments on commit 28f0715

Please sign in to comment.