Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
feat(typescript): TrextDefaults
Browse files Browse the repository at this point in the history
  • Loading branch information
unicornware committed Oct 9, 2021
1 parent 3689a74 commit d747581
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
* @module trext/types
*/

export default {}
export type { default as TrextDefaults } from './trext-defaults.type'
19 changes: 19 additions & 0 deletions src/types/trext-defaults.type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { TrextOptions } from '@trext/interfaces'

/**
* @file Type Definitions - TrextDefaults
* @module trext/types/TrextDefaults
*/

/**
* Default `trext` options.
*/
type TrextDefaults = {
/** {@link TrextOptions.pattern} */
pattern: Exclude<NonNullable<TrextOptions['pattern']>, string>

/** {@link TrextOptions.transform} */
transform: Record<string, never>
}

export default TrextDefaults
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"@flex-development/log": ["node_modules/@flex-development/log/esm/index"],
"@flex-development/log/*": ["node_modules/@flex-development/log/esm/*"],
"@tests/fixtures/*": ["__tests__/__fixtures__/*"],
"@tests/*": ["__tests__/*"]
"@tests/*": ["__tests__/*"],
"@trext": ["src/index.ts"],
"@trext/*": ["src/*"]
},
"preserveConstEnums": true,
"pretty": true,
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.prod.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"lib": ["es5"],
"module": "commonjs",
"outDir": "./cjs",
"paths": {},
"paths": {
"@trext": ["src/index.ts"],
"@trext/*": ["src/*"]
},
"target": "es5"
},
"extends": "./tsconfig.prod.json"
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.prod.esm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"compilerOptions": {
"outDir": "./esm",
"paths": {}
"paths": {
"@trext": ["src/index.ts"],
"@trext/*": ["src/*"]
}
},
"extends": "./tsconfig.prod.json"
}

0 comments on commit d747581

Please sign in to comment.