You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
Fix types
This commit is contained in:
@@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user