Skip to content

Commit

Permalink
refactor: move files
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanwww committed Sep 16, 2023
1 parent 1db03de commit b563f19
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 248 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/result.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Err, Ok } from '../factory';
import { RustlikeResult } from '../result.class';
import type { Result } from '../result.interface';
import { RustlikeResult } from '../result';
import type { Result } from '../types';

function op1(): Result<number, string> {
return Ok(666);
Expand Down
4 changes: 2 additions & 2 deletions src/factory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RustlikeResult } from './result.class';
import type { Result } from './result.interface';
import { RustlikeResult } from './result';
import type { Result } from './types';

/**
* Creates a `Result` that contains the success value.
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './factory';
export * from './result.interface';
export * from './types';
241 changes: 0 additions & 241 deletions src/result.interface.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/result.class.ts → src/result.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Result } from './result.interface';
import type { Optional } from './types';
import type { Optional, Result } from './types';

type ResultType = 'ok' | 'err';

Expand Down
Loading

0 comments on commit b563f19

Please sign in to comment.