diff --git a/src/interfaces/__tests__/parsed-path.spec-d.ts b/src/interfaces/__tests__/parsed-path.spec-d.ts index 86727502..899d81f0 100644 --- a/src/interfaces/__tests__/parsed-path.spec-d.ts +++ b/src/interfaces/__tests__/parsed-path.spec-d.ts @@ -4,10 +4,25 @@ */ import type TestSubject from '../parsed-path' -import type PathObject from '../path-object' describe('unit-d:interfaces/ParsedPath', () => { - it('should extend Required', () => { - expectTypeOf().toMatchTypeOf>() + it('should match [base: string]', () => { + expectTypeOf().toHaveProperty('base').toBeString() + }) + + it('should match [dir: string]', () => { + expectTypeOf().toHaveProperty('dir').toBeString() + }) + + it('should match [ext: string]', () => { + expectTypeOf().toHaveProperty('ext').toBeString() + }) + + it('should match [name: string]', () => { + expectTypeOf().toHaveProperty('name').toBeString() + }) + + it('should match [root: string]', () => { + expectTypeOf().toHaveProperty('root').toBeString() }) }) diff --git a/src/interfaces/parsed-path.ts b/src/interfaces/parsed-path.ts index da4bba5d..f6fb7b8d 100644 --- a/src/interfaces/parsed-path.ts +++ b/src/interfaces/parsed-path.ts @@ -3,6 +3,7 @@ * @module pathe/interfaces/ParsedPath */ +import type { ExactOptionalPropertyTypes } from '@flex-development/tutils' import type PathObject from './path-object' /** @@ -16,8 +17,8 @@ import type PathObject from './path-object' * * @see [`PathObject`][3] * - * @extends {Required} + * @extends {ExactOptionalPropertyTypes>} */ -interface ParsedPath extends Required {} +interface ParsedPath extends ExactOptionalPropertyTypes> {} export type { ParsedPath as default } diff --git a/tsconfig.json b/tsconfig.json index 43076ad3..db4e380b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "declarationMap": true, "emitDecoratorMetadata": true, "esModuleInterop": true, - "exactOptionalPropertyTypes": false, + "exactOptionalPropertyTypes": true, "experimentalDecorators": true, "forceConsistentCasingInFileNames": true, "importsNotUsedAsValues": "error", diff --git a/tsconfig.typecheck.json b/tsconfig.typecheck.json new file mode 100644 index 00000000..60dd4c7a --- /dev/null +++ b/tsconfig.typecheck.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "target": "es2020" + }, + "extends": "./tsconfig.json" +} diff --git a/typings/conventional-commits-parser/index.d.ts b/typings/conventional-commits-parser/index.d.ts index 1c1eeb89..682fe118 100644 --- a/typings/conventional-commits-parser/index.d.ts +++ b/typings/conventional-commits-parser/index.d.ts @@ -21,6 +21,6 @@ declare module 'conventional-commits-parser' { export interface Commit extends CommitRaw { raw: CommitRaw shortHash: string - version?: string + version?: string | undefined } }