@@ -10,15 +10,15 @@ import mock from './mock';
1010import packageComponents from './package-components' ;
1111import strings from '../../resources' ;
1212import * as validator from '../../registry/domain/validators' ;
13- import { Local } from '../../types ' ;
13+ import { Logger } from '../logger ' ;
1414
15- export default function local ( ) : Local {
15+ export default function local ( ) {
1616 return {
1717 clean,
18- cleanup ( compressedPackagePath : string ) {
18+ cleanup ( compressedPackagePath : string ) : Promise < void > {
1919 return fs . unlink ( compressedPackagePath ) ;
2020 } ,
21- compress ( input , output ) {
21+ compress ( input : string , output : string ) : Promise < void > {
2222 return promisify ( targz . compress ) ( {
2323 src : input ,
2424 dest : output ,
@@ -32,7 +32,12 @@ export default function local(): Local {
3232 } ) ;
3333 } ,
3434 getComponentsByDir : getComponentsByDir ( ) ,
35- async init ( options ) {
35+ async init ( options : {
36+ componentName : string ;
37+ logger : Logger ;
38+ componentPath : string ;
39+ templateType : string ;
40+ } ) : Promise < void > {
3641 const { componentName, logger } = options ;
3742 let { templateType } = options ;
3843 if ( ! validator . validateComponentName ( componentName ) ) {
@@ -68,3 +73,5 @@ export default function local(): Local {
6873 package : packageComponents ( )
6974 } ;
7075}
76+
77+ export type Local = ReturnType < typeof local > ;
0 commit comments