Skip to content

Commit 30cf12b

Browse files
committed
refactor(): remove unnecessary 'await'
1 parent 5129b47 commit 30cf12b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

example/middleware/Aureolin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { AureolinMiddleware, Middleware, Context } from '../../src'
22

33
@Middleware()
44
export default class Aureolin implements AureolinMiddleware {
5-
private package = async () => {
6-
return await import('../../package.json')
5+
private package = () => {
6+
return import('../../package.json')
77
}
88

99
public use = async (ctx: Context): Promise<void> => {

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { CreateOptions } from './types'
66
* @param {CreateOptions} options
77
* @returns {AureolinApplication} the application
88
*/
9-
export const create = async (options: CreateOptions): Promise<AureolinApplication> => {
10-
return await new Promise((resolve) => {
9+
export const create = (options: CreateOptions): Promise<AureolinApplication> => {
10+
return new Promise((resolve) => {
1111
new AureolinApplication(options).on('app.ready', (app) => {
1212
app.on('app.start', () => {
1313
app.removeAllListeners('app.start')

0 commit comments

Comments
 (0)