mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
server: Fix build errors after updating to latest TypeScript
This commit is contained in:
parent
9fdb7b29de
commit
c0b3c8496e
@ -5,6 +5,7 @@ import v = require('./validators');
|
|||||||
import utils = require('../services/utils');
|
import utils = require('../services/utils');
|
||||||
import { Router } from 'express';
|
import { Router } from 'express';
|
||||||
import { AttachmentRow } from '../becca/entities/rows';
|
import { AttachmentRow } from '../becca/entities/rows';
|
||||||
|
import { ValidatorMap } from './etapi-interface';
|
||||||
|
|
||||||
function register(router: Router) {
|
function register(router: Router) {
|
||||||
const ALLOWED_PROPERTIES_FOR_CREATE_ATTACHMENT: ValidatorMap = {
|
const ALLOWED_PROPERTIES_FOR_CREATE_ATTACHMENT: ValidatorMap = {
|
||||||
|
@ -5,6 +5,7 @@ import attributeService = require('../services/attributes');
|
|||||||
import v = require('./validators');
|
import v = require('./validators');
|
||||||
import { Router } from 'express';
|
import { Router } from 'express';
|
||||||
import { AttributeRow } from '../becca/entities/rows';
|
import { AttributeRow } from '../becca/entities/rows';
|
||||||
|
import { ValidatorMap } from './etapi-interface';
|
||||||
|
|
||||||
function register(router: Router) {
|
function register(router: Router) {
|
||||||
eu.route(router, 'get', '/etapi/attributes/:attributeId', (req, res, next) => {
|
eu.route(router, 'get', '/etapi/attributes/:attributeId', (req, res, next) => {
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
type ValidatorFunc = (obj: unknown) => (string | undefined);
|
export type ValidatorFunc = (obj: unknown) => (string | undefined);
|
||||||
|
|
||||||
type ValidatorMap = Record<string, ValidatorFunc[]>;
|
export type ValidatorMap = Record<string, ValidatorFunc[]>;
|
@ -6,6 +6,7 @@ import etapiTokenService = require('../services/etapi_tokens');
|
|||||||
import config = require('../services/config');
|
import config = require('../services/config');
|
||||||
import { NextFunction, Request, RequestHandler, Response, Router } from 'express';
|
import { NextFunction, Request, RequestHandler, Response, Router } from 'express';
|
||||||
import { AppRequest, AppRequestHandler } from '../routes/route-interface';
|
import { AppRequest, AppRequestHandler } from '../routes/route-interface';
|
||||||
|
import { ValidatorMap } from './etapi-interface';
|
||||||
const GENERIC_CODE = "GENERIC";
|
const GENERIC_CODE = "GENERIC";
|
||||||
|
|
||||||
type HttpMethod = "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head";
|
type HttpMethod = "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head";
|
||||||
|
@ -15,6 +15,7 @@ import { ParsedQs } from 'qs';
|
|||||||
import { NoteParams } from '../services/note-interface';
|
import { NoteParams } from '../services/note-interface';
|
||||||
import BNote = require('../becca/entities/bnote');
|
import BNote = require('../becca/entities/bnote');
|
||||||
import { SearchParams } from '../services/search/services/types';
|
import { SearchParams } from '../services/search/services/types';
|
||||||
|
import { ValidatorMap } from './etapi-interface';
|
||||||
|
|
||||||
function register(router: Router) {
|
function register(router: Router) {
|
||||||
eu.route(router, 'get', '/etapi/notes', (req, res, next) => {
|
eu.route(router, 'get', '/etapi/notes', (req, res, next) => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
type SNoteRow = [ string, string, string, string, string, string, boolean ];
|
export type SNoteRow = [ string, string, string, string, string, string, boolean ];
|
||||||
type SBranchRow = [ string, string, string, string, string, boolean ];
|
export type SBranchRow = [ string, string, string, string, string, boolean ];
|
||||||
type SAttributeRow = [ string, string, string, string, string, boolean, number ];
|
export type SAttributeRow = [ string, string, string, string, string, boolean, number ];
|
||||||
type SAttachmentRow = [ string, string, string, string, string, string, string ];
|
export type SAttachmentRow = [ string, string, string, string, string, string, string ];
|
||||||
|
@ -5,6 +5,7 @@ import utils = require('../../../services/utils');
|
|||||||
import AbstractShacaEntity = require('./abstract_shaca_entity');
|
import AbstractShacaEntity = require('./abstract_shaca_entity');
|
||||||
import SNote = require('./snote');
|
import SNote = require('./snote');
|
||||||
import { Blob } from '../../../services/blob-interface';
|
import { Blob } from '../../../services/blob-interface';
|
||||||
|
import { SAttachmentRow } from './rows';
|
||||||
|
|
||||||
class SAttachment extends AbstractShacaEntity {
|
class SAttachment extends AbstractShacaEntity {
|
||||||
private attachmentId: string;
|
private attachmentId: string;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
import { SAttributeRow } from "./rows";
|
||||||
import SNote = require("./snote");
|
import SNote = require("./snote");
|
||||||
|
|
||||||
const AbstractShacaEntity = require('./abstract_shaca_entity');
|
const AbstractShacaEntity = require('./abstract_shaca_entity');
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
import AbstractShacaEntity = require('./abstract_shaca_entity');
|
import AbstractShacaEntity = require('./abstract_shaca_entity');
|
||||||
|
import { SBranchRow } from './rows';
|
||||||
import SNote = require('./snote');
|
import SNote = require('./snote');
|
||||||
|
|
||||||
class SBranch extends AbstractShacaEntity {
|
class SBranch extends AbstractShacaEntity {
|
||||||
|
@ -8,6 +8,7 @@ import { Blob } from '../../../services/blob-interface';
|
|||||||
import SAttachment = require('./sattachment');
|
import SAttachment = require('./sattachment');
|
||||||
import SAttribute = require('./sattribute');
|
import SAttribute = require('./sattribute');
|
||||||
import SBranch = require('./sbranch');
|
import SBranch = require('./sbranch');
|
||||||
|
import { SNoteRow } from './rows';
|
||||||
|
|
||||||
const LABEL = 'label';
|
const LABEL = 'label';
|
||||||
const RELATION = 'relation';
|
const RELATION = 'relation';
|
||||||
|
@ -9,6 +9,7 @@ import SAttribute = require('./entities/sattribute');
|
|||||||
import SAttachment = require('./entities/sattachment');
|
import SAttachment = require('./entities/sattachment');
|
||||||
import shareRoot = require('../share_root');
|
import shareRoot = require('../share_root');
|
||||||
import eventService = require('../../services/events');
|
import eventService = require('../../services/events');
|
||||||
|
import { SAttachmentRow, SAttributeRow, SBranchRow, SNoteRow } from './entities/rows';
|
||||||
|
|
||||||
function load() {
|
function load() {
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"moduleResolution": "Node",
|
"moduleResolution": "Node16",
|
||||||
|
"module": "Node16",
|
||||||
"target": "ES2018",
|
"target": "ES2018",
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user