Skip to content

Commit e398296

Browse files
committed
Added types for database connection object
no ref This change should have no user impact. It adds a type declaration for `core/server/data/index.js`, and also fixes some small type errors that were present.
1 parent 74eeda5 commit e398296

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import type { Knex } from 'knex';
2+
3+
export const knex: Knex;

ghost/core/core/server/services/email-analytics/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import {NewsletterEmailAnalyticsBatchProcessor} from './newsletter-email-analyti
77
import NewsletterEmailEventStorage from '../email-service/newsletter-email-event-storage';
88
// @ts-expect-error This module lacks type definitions.
99
import EmailEventProcessor from '../email-service/email-event-processor';
10-
// @ts-expect-error This module lacks type definitions.
11-
import db from '../../data/db';
10+
import * as db from '../../data/db';
1211
import membersService from '../members';
1312
// @ts-expect-error This module lacks type definitions.
1413
import emailSuppressionList from '../email-suppression-list';

ghost/core/test/utils/automations-fixtures.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import ObjectId from 'bson-objectid';
22
import moment from 'moment';
33
import {MEMBER_WELCOME_EMAIL_SLUGS} from '../../core/server/services/member-welcome-emails/constants';
4-
// @ts-expect-error Database has not been converted to TypeScript yet.
54
import * as db from '../../core/server/data/db';
65

76
export const TEST_EMAIL_DESIGN_SETTING_ID = '64b6f7b7c8f1a2b3c4d5e6f7';

0 commit comments

Comments
 (0)