-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: build apps return an unexpected type error (#397)
* perf: declare global vars in `shared/global` * revert: remove `@ts-ignore` keyword
- Loading branch information
Showing
9 changed files
with
25 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
import { Controller, Get } from '@nestjs/common'; | ||
import { AppService } from './app.service'; | ||
import PKG from "../../../package.json"; | ||
import PKG from '../../../package.json'; | ||
import { ApiOperation } from '@nestjs/swagger'; | ||
|
||
@Controller() | ||
export class AppController { | ||
constructor(private readonly appService: AppService) {} | ||
|
||
@Get(["/", "/info"]) | ||
@ApiOperation({ summary: "获取服务端版本等信息" }) | ||
@Get(['/', '/info']) | ||
@ApiOperation({ summary: '获取服务端版本等信息' }) | ||
async appInfo() { | ||
return { | ||
name: PKG.name, | ||
author: PKG.author, | ||
// @ts-ignore | ||
version: isDev ? "dev" : PKG.version, | ||
version: isDev ? 'dev' : PKG.version, | ||
homepage: PKG.homepage, | ||
issues: PKG.issues, | ||
}; | ||
} | ||
|
||
@Get(["/ping"]) | ||
@ApiOperation({ summary: "测试接口是否存活" }) | ||
ping(): "pong" { | ||
return "pong"; | ||
@Get(['/ping']) | ||
@ApiOperation({ summary: '测试接口是否存活' }) | ||
ping(): 'pong' { | ||
return 'pong'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters