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

Commit

Permalink
Fix *.d.ts skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
onechiporenko committed Mar 30, 2018
1 parent 90c01cf commit e93f9c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ export default class Server {
}

private add(type: string, parent: string, path: string) {
if (path.match(/\.ts$/) !== null || path.match(/\.js$/) !== null && path.match(/\.d\.ts$/) === null) {
console.log(path, path.match(/\.d\.ts$/));
if ((path.match(/\.ts$/) !== null || path.match(/\.js$/) !== null) && path.match(/\.d\.ts$/) === null) {
const instance = require(`${parent}/${path}`).default;
if (instance) {
if (type === 'route' && instance instanceof Route) {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
],
"include": [
"lib",
"tests"
"tests",
"tests-data"
]
}

0 comments on commit e93f9c7

Please sign in to comment.