Skip to content

Commit

Permalink
Merge pull request #225 from TriliumNext/feature/update_typescript
Browse files Browse the repository at this point in the history
Update TypeScript dependencies
  • Loading branch information
eliandoran authored Jul 19, 2024
2 parents 583a442 + 623b273 commit 40363f6
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 55 deletions.
96 changes: 48 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/etapi/attachments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import v = require('./validators');
import utils = require('../services/utils');
import { Router } from 'express';
import { AttachmentRow } from '../becca/entities/rows';
import { ValidatorMap } from './etapi-interface';

function register(router: Router) {
const ALLOWED_PROPERTIES_FOR_CREATE_ATTACHMENT: ValidatorMap = {
Expand Down
1 change: 1 addition & 0 deletions src/etapi/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import attributeService = require('../services/attributes');
import v = require('./validators');
import { Router } from 'express';
import { AttributeRow } from '../becca/entities/rows';
import { ValidatorMap } from './etapi-interface';

function register(router: Router) {
eu.route(router, 'get', '/etapi/attributes/:attributeId', (req, res, next) => {
Expand Down
4 changes: 2 additions & 2 deletions src/etapi/etapi-interface.ts
Original file line number Diff line number Diff line change
@@ -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[]>;
1 change: 1 addition & 0 deletions src/etapi/etapi_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import etapiTokenService = require('../services/etapi_tokens');
import config = require('../services/config');
import { NextFunction, Request, RequestHandler, Response, Router } from 'express';
import { AppRequest, AppRequestHandler } from '../routes/route-interface';
import { ValidatorMap } from './etapi-interface';
const GENERIC_CODE = "GENERIC";

type HttpMethod = "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head";
Expand Down
1 change: 1 addition & 0 deletions src/etapi/notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { ParsedQs } from 'qs';
import { NoteParams } from '../services/note-interface';
import BNote = require('../becca/entities/bnote');
import { SearchParams } from '../services/search/services/types';
import { ValidatorMap } from './etapi-interface';

function register(router: Router) {
eu.route(router, 'get', '/etapi/notes', (req, res, next) => {
Expand Down
8 changes: 4 additions & 4 deletions src/share/shaca/entities/rows.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type SNoteRow = [ string, string, string, string, string, string, boolean ];
type SBranchRow = [ string, string, string, string, string, boolean ];
type SAttributeRow = [ string, string, string, string, string, boolean, number ];
type SAttachmentRow = [ string, string, string, string, string, string, string ];
export type SNoteRow = [ string, string, string, string, string, string, boolean ];
export type SBranchRow = [ string, string, string, string, string, boolean ];
export type SAttributeRow = [ string, string, string, string, string, boolean, number ];
export type SAttachmentRow = [ string, string, string, string, string, string, string ];
1 change: 1 addition & 0 deletions src/share/shaca/entities/sattachment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import utils = require('../../../services/utils');
import AbstractShacaEntity = require('./abstract_shaca_entity');
import SNote = require('./snote');
import { Blob } from '../../../services/blob-interface';
import { SAttachmentRow } from './rows';

class SAttachment extends AbstractShacaEntity {
private attachmentId: string;
Expand Down
1 change: 1 addition & 0 deletions src/share/shaca/entities/sattribute.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";

import { SAttributeRow } from "./rows";
import SNote = require("./snote");

const AbstractShacaEntity = require('./abstract_shaca_entity');
Expand Down
1 change: 1 addition & 0 deletions src/share/shaca/entities/sbranch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";

import AbstractShacaEntity = require('./abstract_shaca_entity');
import { SBranchRow } from './rows';
import SNote = require('./snote');

class SBranch extends AbstractShacaEntity {
Expand Down
1 change: 1 addition & 0 deletions src/share/shaca/entities/snote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Blob } from '../../../services/blob-interface';
import SAttachment = require('./sattachment');
import SAttribute = require('./sattribute');
import SBranch = require('./sbranch');
import { SNoteRow } from './rows';

const LABEL = 'label';
const RELATION = 'relation';
Expand Down
1 change: 1 addition & 0 deletions src/share/shaca/shaca_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import SAttribute = require('./entities/sattribute');
import SAttachment = require('./entities/sattachment');
import shareRoot = require('../share_root');
import eventService = require('../../services/events');
import { SAttachmentRow, SAttributeRow, SBranchRow, SNoteRow } from './entities/rows';

function load() {
const start = Date.now();
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"compilerOptions": {
"moduleResolution": "Node",
"moduleResolution": "Node16",
"module": "Node16",
"target": "ES2018",
"declaration": false,
"sourceMap": true,
"outDir": "./build",
Expand Down

0 comments on commit 40363f6

Please sign in to comment.