1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +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 Database from './database';
import uuid from './uuid'; import uuid from './uuid';
import time from './time'; import time from './time';
import JoplinDatabase from './JoplinDatabase'; import JoplinDatabase, { TableField } from './JoplinDatabase';
const Mutex = require('async-mutex').Mutex; const Mutex = require('async-mutex').Mutex;
// New code should make use of this enum // New code should make use of this enum
@@ -193,7 +193,7 @@ class BaseModel {
throw new Error(`Unknown field: ${name}`); throw new Error(`Unknown field: ${name}`);
} }
static fields() { static fields(): TableField[] {
return this.db().tableFields(this.tableName()); return this.db().tableFields(this.tableName());
} }

View File

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