Skip to content

Commit ccea26f

Browse files
committed
fix: import types as types
1 parent b49570b commit ccea26f

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

src/aProblem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { APIGatewayProxyResultV2 } from 'aws-lambda'
2-
import { type Static } from '@sinclair/typebox'
2+
import type { Static } from '@sinclair/typebox'
33
import { Context, ProblemDetail } from '@hello.nrfcloud.com/proto/hello'
44

55
export const aProblem = (

src/addVersionHeader.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import lambda from 'aws-lambda'
2-
import { type MiddlewareObj } from '@middy/core'
1+
import type {
2+
APIGatewayProxyEventV2,
3+
APIGatewayProxyStructuredResultV2,
4+
} from 'aws-lambda'
5+
import type { MiddlewareObj } from '@middy/core'
36

47
export const addVersionHeader = (
58
version: string,
69
): MiddlewareObj<
7-
lambda.APIGatewayProxyEventV2,
8-
lambda.APIGatewayProxyStructuredResultV2
10+
APIGatewayProxyEventV2,
11+
APIGatewayProxyStructuredResultV2
912
> => ({
1013
after: async (req) => {
1114
if (req.response === null) return

src/corsOPTIONS.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
import lambda from 'aws-lambda'
2-
import { type MiddlewareObj } from '@middy/core'
1+
import type {
2+
APIGatewayProxyEventV2,
3+
APIGatewayProxyStructuredResultV2,
4+
} from 'aws-lambda'
5+
import type { MiddlewareObj } from '@middy/core'
36
import { corsHeaders } from './corsHeaders.js'
47

58
export const corsOPTIONS = (
69
...allowedMethods: string[]
710
): MiddlewareObj<
8-
lambda.APIGatewayProxyEventV2,
9-
lambda.APIGatewayProxyStructuredResultV2
11+
APIGatewayProxyEventV2,
12+
APIGatewayProxyStructuredResultV2
1013
> => ({
1114
before: async (req) => {
1215
if (req.event.requestContext.http.method === 'OPTIONS') {

0 commit comments

Comments
 (0)