ts类型检查
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
|
||||
import { query } from '../db/client.js'
|
||||
|
||||
/** @typedef {import('../types/repository-inputs.js').OrderUpsertInput} OrderUpsertInput */
|
||||
/** @typedef {import('../types/repository-inputs.js').OrderCreateInput} OrderCreateInput */
|
||||
/** @typedef {import('../types/repository-inputs.js').OrderListQueryInput} OrderListQueryInput */
|
||||
/** @typedef {import('../types/repository-inputs.js').OrderUpdateInput} OrderUpdateInput */
|
||||
/** @typedef {import('../types/repository-rows.js').OrderListQueryResult} OrderListQueryResult */
|
||||
/** @typedef {import('../types/repository-rows.js').OrderListRow} OrderListRow */
|
||||
/** @typedef {import('../types/repository-rows.js').OrderRow} OrderRow */
|
||||
@@ -53,7 +54,7 @@ export async function findOrderByPlatformOrderIdCandidates({
|
||||
}
|
||||
|
||||
/** @returns {Promise<OrderRow | null>} */
|
||||
/** @param {OrderUpsertInput} input */
|
||||
/** @param {OrderCreateInput} input */
|
||||
export async function createOrder(input) {
|
||||
const result = await query(
|
||||
`
|
||||
@@ -101,7 +102,7 @@ export async function createOrder(input) {
|
||||
}
|
||||
|
||||
/** @returns {Promise<OrderRow | null>} */
|
||||
/** @param {OrderUpsertInput} input */
|
||||
/** @param {OrderUpdateInput} input */
|
||||
export async function updateOrder(orderId, input) {
|
||||
const result = await query(
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user