From 9ddc1980dea1bf87a25da5c711f33cc325beb581 Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani Date: Thu, 12 Oct 2023 13:42:53 +0100 Subject: [PATCH] improve types for flight-management example --- examples/flight-management/backend/Events/allFlights.ts | 2 +- examples/flight-management/backend/Events/updateFlight.ts | 2 +- examples/flight-management/backend/functions/sendMessage.ts | 2 +- src/index.d.ts | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 src/index.d.ts diff --git a/examples/flight-management/backend/Events/allFlights.ts b/examples/flight-management/backend/Events/allFlights.ts index 5a82a29d0..db1e0a69e 100644 --- a/examples/flight-management/backend/Events/allFlights.ts +++ b/examples/flight-management/backend/Events/allFlights.ts @@ -1,5 +1,5 @@ import DatabaseManager from '../helpters/DatabaseManager.js' -import type {GleeFunctionReturn} from '@asyncapi/glee/src/lib' +import type { GleeFunctionReturn } from '@asyncapi/glee' export default async function getFlights(airportCode: string): Promise { const flights = await DatabaseManager.getInstance().getFlights(airportCode) diff --git a/examples/flight-management/backend/Events/updateFlight.ts b/examples/flight-management/backend/Events/updateFlight.ts index a768015a7..01119fcc1 100644 --- a/examples/flight-management/backend/Events/updateFlight.ts +++ b/examples/flight-management/backend/Events/updateFlight.ts @@ -1,4 +1,4 @@ -import { GleeFunctionReturn } from '@asyncapi/glee/src/lib/index.js' +import type { GleeFunctionReturn } from '@asyncapi/glee' import DatabaseManager from '../helpters/DatabaseManager.js' export default async function updateFlight(flight):Promise { const isSuccessful = await DatabaseManager.getInstance().updateFlight(flight) diff --git a/examples/flight-management/backend/functions/sendMessage.ts b/examples/flight-management/backend/functions/sendMessage.ts index 7cc881417..7c90a301f 100644 --- a/examples/flight-management/backend/functions/sendMessage.ts +++ b/examples/flight-management/backend/functions/sendMessage.ts @@ -1,4 +1,4 @@ -import { GleeFunctionReturn } from '@asyncapi/glee' +import type { GleeFunctionReturn } from '@asyncapi/glee' import allFlights from '../Events/allFlights.js' import updateFlight from '../Events/updateFlight.js' export default async function (gleeEvent): Promise { diff --git a/src/index.d.ts b/src/index.d.ts new file mode 100644 index 000000000..b1a11e693 --- /dev/null +++ b/src/index.d.ts @@ -0,0 +1 @@ +export type * from './lib/index.d.ts' \ No newline at end of file