Skip to content

Commit

Permalink
refactor: add file extensions to all imports
Browse files Browse the repository at this point in the history
TS will not add the extension when transpiling
  • Loading branch information
carpasse committed Feb 27, 2024
1 parent f23ec8e commit 623bc44
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/DapiMixin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Constructor, ExtractFirstParam} from './types/utils';
import {DapiFns, DecoratorFn, HookFn} from './types';
import {Constructor, ExtractFirstParam} from './types/utils.js';
import {DapiFns, DecoratorFn, HookFn} from './types/index.js';

/**
* Represents an DAPI definition with dependencies and pure functions.
Expand Down
6 changes: 3 additions & 3 deletions src/createDapi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {DapiMixin, DapiDefinition} from './DapiMixin';
import {DapiFns} from './types';
import {Constructor} from './types/utils';
import {DapiMixin, DapiDefinition} from './DapiMixin.js';
import type {DapiFns} from './types/index.js';
import {Constructor} from './types/utils.js';

/**
* Creates an Dapi facade.
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @module @carpasse/dapi
*/
export {DapiMixin, type DapiDefinition, type DapiWrapper} from './DapiMixin';
export {DapiMixin, type DapiDefinition, type DapiWrapper} from './DapiMixin.js';
export type {DapiFns, DapiFn, DecoratorFn, HookFn} from './types';
export {createDapi} from './createDapi';
export {createDapi} from './createDapi.js';
2 changes: 1 addition & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {AnyFunction} from './utils';
import {AnyFunction} from './utils.js';

/**
* Dapi function type. It is a function that receives the dependencies as the first argument.
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist/esm",
"outDir": "./dist/esm"
"outDir": "./dist/esm",
"module": "esnext"
}
}

0 comments on commit 623bc44

Please sign in to comment.