Skip to content

Commit

Permalink
refactor ~ remove unneeded intermediate 'default' export object
Browse files Browse the repository at this point in the history
  • Loading branch information
rivy committed Feb 22, 2021
1 parent f0d6a04 commit c321862
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
6 changes: 2 additions & 4 deletions src/mod.cjs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { Adapt } from './lib/OSPaths.js';
import { Adapt, OSPaths } from './lib/OSPaths.js';
import { adapter } from './platform-adapters/node.js';

const _ = Adapt(adapter).OSPaths;

export = _;
export = Adapt(adapter).OSPaths as OSPaths;
6 changes: 1 addition & 5 deletions src/mod.deno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,5 @@ import type OSPaths from '../dist/types/mod.d.ts';
// @ts-ignore
import { adapter } from './platform-adapters/deno.deno.ts';

const default_: typeof OSPaths = Adapt(adapter).OSPaths;

// // ref: <https://github.com/microsoft/TypeScript/issues/28481#issuecomment-453584716>
// export type OSPaths = OSPaths;
export type { OSPaths };
export default default_;
export default Adapt(adapter).OSPaths as OSPaths;
4 changes: 1 addition & 3 deletions src/mod.esm.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Adapt, OSPaths } from './lib/OSPaths.js';
import { adapter } from './platform-adapters/node.js';

const default_: OSPaths = Adapt(adapter).OSPaths;

export type { OSPaths };
export default default_;
export default Adapt(adapter).OSPaths as OSPaths;

0 comments on commit c321862

Please sign in to comment.