Skip to content

Commit

Permalink
fix: service is method (#58)
Browse files Browse the repository at this point in the history
* fix: service is method

* fix: ci
  • Loading branch information
whxaxes committed Mar 5, 2020
1 parent cfed138 commit 29b6299
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function getDefaultWatchDirs(opt: TsHelperOption = {}) {
baseConfig.service = {
directory: 'app/service',
interface: declMapping.service,
generator: 'class',
generator: 'auto',
};

// egg
Expand Down
4 changes: 2 additions & 2 deletions test/bin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ describe('bin.test.ts', () => {
const content = fs.readFileSync(dts, { encoding: 'utf-8' });
assert(content.includes('service/test/test'));
assert(content.includes('service/test/test-two'));
assert(content.includes('test: ExportTestTest'));
assert(content.includes('testTwo: ExportTestTestTwo'));
assert(content.includes('test: AutoInstanceType<typeof ExportTestTest>'));
assert(content.includes('testTwo: AutoInstanceType<typeof ExportTestTestTwo>'));

await sleep(2000);

Expand Down
8 changes: 4 additions & 4 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ describe('index.test.ts', () => {
const content = fs.readFileSync(dts, { encoding: 'utf-8' });
assert(content.includes('service/test/test'));
assert(content.includes('service/test/test-two'));
assert(content.includes('test: ExportTestTest'));
assert(content.includes('testTwo: ExportTestTestTwo'));
assert(content.includes('test: AutoInstanceType<typeof ExportTestTest>'));
assert(content.includes('testTwo: AutoInstanceType<typeof ExportTestTestTwo>'));

await sleep(2000);

Expand Down Expand Up @@ -134,8 +134,8 @@ describe('index.test.ts', () => {
const content = fs.readFileSync(dts, { encoding: 'utf-8' });
assert(content.includes('service/test/test'));
assert(content.includes('service/test/test-two'));
assert(content.includes('test: ExportTestTest'));
assert(content.includes('testTwo: ExportTestTestTwo'));
assert(content.includes('test: AutoInstanceType<typeof ExportTestTest>'));
assert(content.includes('testTwo: AutoInstanceType<typeof ExportTestTestTwo>'));

await sleep(2000);

Expand Down

0 comments on commit 29b6299

Please sign in to comment.