1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

Fix types

This commit is contained in:
Laurent Cozic 2021-05-10 11:32:31 +02:00
parent 9c20d5947d
commit 1e27a4fcd2
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import paginationToSql from './models/utils/paginationToSql';
import Database from './database';
import uuid from './uuid';
import time from './time';
import JoplinDatabase from './JoplinDatabase';
import JoplinDatabase, { TableField } from './JoplinDatabase';
const Mutex = require('async-mutex').Mutex;
// New code should make use of this enum
@ -193,7 +193,7 @@ class BaseModel {
throw new Error(`Unknown field: ${name}`);
}
static fields() {
static fields(): TableField[] {
return this.db().tableFields(this.tableName());
}

View File

@ -119,7 +119,7 @@ CREATE TABLE version (
INSERT INTO version (version) VALUES (1);
`;
interface TableField {
export interface TableField {
name: string;
type: number;
default: any;