From ecd86d012bb1cc567b1b3d0f610f324197f41f88 Mon Sep 17 00:00:00 2001 From: Victor Quinn Date: Fri, 31 May 2024 18:05:44 -0400 Subject: [PATCH] Move canonical types to interfaces.ts and export them all --- src/__tests__/weatherPlus.test.ts | 2 +- src/index.ts | 1 + src/{types.ts => interfaces.ts} | 0 src/providers/nws/client.ts | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) rename src/{types.ts => interfaces.ts} (100%) diff --git a/src/__tests__/weatherPlus.test.ts b/src/__tests__/weatherPlus.test.ts index 3a45d3c..cddfb11 100644 --- a/src/__tests__/weatherPlus.test.ts +++ b/src/__tests__/weatherPlus.test.ts @@ -1,7 +1,7 @@ import WeatherPlus from '../index'; import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; -import { IWeatherData } from '../types'; +import { IWeatherData } from '../interfaces'; jest.mock('redis', () => { const mGet = jest.fn(); diff --git a/src/index.ts b/src/index.ts index ff0b420..8321578 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,5 +23,6 @@ class WeatherPlus { } } +export * from './interfaces'; export { WeatherPlus }; export default WeatherPlus; diff --git a/src/types.ts b/src/interfaces.ts similarity index 100% rename from src/types.ts rename to src/interfaces.ts diff --git a/src/providers/nws/client.ts b/src/providers/nws/client.ts index ce056f7..40bd85c 100644 --- a/src/providers/nws/client.ts +++ b/src/providers/nws/client.ts @@ -1,6 +1,6 @@ import axios from 'axios'; import debug from 'debug'; -import { IWeatherData } from '../../types'; +import { IWeatherData } from '../../interfaces'; import { IGridpointsStations, IPointsLatLngResponse, IObservationsLatest } from './interfaces';