Skip to content

Commit f9887d1

Browse files
authored
bugfix(doc): corrects the exposed function type definitions to correct/ canonical ones (#643)
1 parent 608aef5 commit f9887d1

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/extract/transpile/meta.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface ITranspilerWrapper {
77
) => string;
88
}
99

10-
export function getWrapper(pExtension, pTranspileOptions): ITranspilerWrapper;
10+
export type getWrapper = (pExtension, pTranspileOptions) => ITranspilerWrapper;
1111

1212
export const scannableExtensions: string[];
1313

@@ -19,4 +19,4 @@ export interface IAvailableTranspiler {
1919
available: boolean;
2020
}
2121

22-
export function getAvailableTranspilers(): IAvailableTranspiler[];
22+
export type getAvailableTranspilers = () => IAvailableTranspiler[];

src/validate/index.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,27 @@ export interface IValidationResult {
3434
* Validates the pModule module against the given
3535
* ruleset pRuleSet
3636
*/
37-
export function module(
37+
export type module = (
3838
pRuleSet: IFlattenedRuleSet,
3939
pModule: IModule
40-
): IValidationResult;
40+
) => IValidationResult;
4141

4242
/**
4343
* Validates the pFrom and pTo dependency pair against the given
4444
* ruleset pRuleSet
4545
*/
46-
export function dependency(
46+
export type dependency = (
4747
pRuleSet: IFlattenedRuleSet,
4848
pFrom: IModule,
4949
pTo: IDependency
50-
): IValidationResult;
50+
) => IValidationResult;
5151

5252
/**
5353
* Validates the pFrom and pTo dependency pair against the given
5454
* ruleset pRuleSet
5555
*/
56-
export function folder(
56+
export type folder = (
5757
pRuleSet: IFlattenedRuleSet,
5858
pFromFolder: IFolder,
5959
pToFolder: IFolderDependency
60-
): IValidationResult;
60+
) => IValidationResult;

types/dependency-cruiser.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ export interface IReporterOutput {
7373
* before calling make sure to flatten them out if you want them
7474
* used (e.g. with 'dependency-cruiser/config-utl/extract-ts-config')
7575
*/
76-
export function cruise(
76+
export type cruise = (
7777
pFileAndDirectoryArray: string[],
7878
pCruiseOptions?: ICruiseOptions,
7979
pResolveOptions?: IResolveOptions,
8080
pTSConfig?: any
81-
): IReporterOutput;
81+
) => IReporterOutput;
8282

8383
export interface ITranspileOptions {
8484
/**
@@ -113,12 +113,12 @@ export interface ITranspileOptions {
113113
* @param pTranspileOptions Object to hold options to pass to underlying transpilers
114114
* like TypeScript or Babel
115115
*/
116-
export function futureCruise(
116+
export type futureCruise = (
117117
pFileAndDirectoryArray: string[],
118118
pCruiseOptions?: ICruiseOptions,
119119
pResolveOptions?: IResolveOptions,
120120
pTranspileOptions?: ITranspileOptions
121-
): IReporterOutput;
121+
) => IReporterOutput;
122122

123123
/**
124124
* Given a cruise result, formats it with the given reporter (pOutputType)
@@ -127,15 +127,15 @@ export function futureCruise(
127127
* to the [dependency-cruiser results schema](https://github.com/sverweij/dependency-cruiser/blob/develop/src/schema/cruise-result.json)
128128
* @param pOutputType Which reporter to use to format the cruise result with
129129
*/
130-
export function format(
130+
export type format = (
131131
pResult: ICruiseResult,
132132
pFormatOptions: IFormatOptions
133-
): IReporterOutput;
133+
) => IReporterOutput;
134134

135135
/**
136136
* Returns an array of supported transpilers and for each of the transpilers
137137
* - the name of the transpiler
138138
* - the supported version range (semver version range)
139139
* - whether or not the transpiler is available in the current environment
140140
*/
141-
export function getAvailableTranspilers(): IAvailableTranspiler[];
141+
export type getAvailableTranspilers = () => IAvailableTranspiler[];

0 commit comments

Comments
 (0)