DEV Community

Discussion on: Deploy Netlify Functions with TypeScript

Collapse
 
parkan profile image
Arkadiy Kukarkin • Edited

fixed it as follows:

interface EchoQueryParams {
  msg?: String
}
...
const { msg } = event.queryStringParameters as EchoQueryParams

(note, this won't actually enforce runtime type checks, but it will make it compile)