Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit c0b3c84

Browse files
committed
server: Fix build errors after updating to latest TypeScript
1 parent 9fdb7b2 commit c0b3c84

File tree

12 files changed

+17
-7
lines changed

12 files changed

+17
-7
lines changed

src/etapi/attachments.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import v = require('./validators');
55
import utils = require('../services/utils');
66
import { Router } from 'express';
77
import { AttachmentRow } from '../becca/entities/rows';
8+
import { ValidatorMap } from './etapi-interface';
89

910
function register(router: Router) {
1011
const ALLOWED_PROPERTIES_FOR_CREATE_ATTACHMENT: ValidatorMap = {

src/etapi/attributes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import attributeService = require('../services/attributes');
55
import v = require('./validators');
66
import { Router } from 'express';
77
import { AttributeRow } from '../becca/entities/rows';
8+
import { ValidatorMap } from './etapi-interface';
89

910
function register(router: Router) {
1011
eu.route(router, 'get', '/etapi/attributes/:attributeId', (req, res, next) => {

src/etapi/etapi-interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
type ValidatorFunc = (obj: unknown) => (string | undefined);
1+
export type ValidatorFunc = (obj: unknown) => (string | undefined);
22

3-
type ValidatorMap = Record<string, ValidatorFunc[]>;
3+
export type ValidatorMap = Record<string, ValidatorFunc[]>;

src/etapi/etapi_utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import etapiTokenService = require('../services/etapi_tokens');
66
import config = require('../services/config');
77
import { NextFunction, Request, RequestHandler, Response, Router } from 'express';
88
import { AppRequest, AppRequestHandler } from '../routes/route-interface';
9+
import { ValidatorMap } from './etapi-interface';
910
const GENERIC_CODE = "GENERIC";
1011

1112
type HttpMethod = "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head";

src/etapi/notes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { ParsedQs } from 'qs';
1515
import { NoteParams } from '../services/note-interface';
1616
import BNote = require('../becca/entities/bnote');
1717
import { SearchParams } from '../services/search/services/types';
18+
import { ValidatorMap } from './etapi-interface';
1819

1920
function register(router: Router) {
2021
eu.route(router, 'get', '/etapi/notes', (req, res, next) => {

src/share/shaca/entities/rows.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type SNoteRow = [ string, string, string, string, string, string, boolean ];
2-
type SBranchRow = [ string, string, string, string, string, boolean ];
3-
type SAttributeRow = [ string, string, string, string, string, boolean, number ];
4-
type SAttachmentRow = [ string, string, string, string, string, string, string ];
1+
export type SNoteRow = [ string, string, string, string, string, string, boolean ];
2+
export type SBranchRow = [ string, string, string, string, string, boolean ];
3+
export type SAttributeRow = [ string, string, string, string, string, boolean, number ];
4+
export type SAttachmentRow = [ string, string, string, string, string, string, string ];

src/share/shaca/entities/sattachment.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import utils = require('../../../services/utils');
55
import AbstractShacaEntity = require('./abstract_shaca_entity');
66
import SNote = require('./snote');
77
import { Blob } from '../../../services/blob-interface';
8+
import { SAttachmentRow } from './rows';
89

910
class SAttachment extends AbstractShacaEntity {
1011
private attachmentId: string;

src/share/shaca/entities/sattribute.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22

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

56
const AbstractShacaEntity = require('./abstract_shaca_entity');

src/share/shaca/entities/sbranch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use strict";
22

33
import AbstractShacaEntity = require('./abstract_shaca_entity');
4+
import { SBranchRow } from './rows';
45
import SNote = require('./snote');
56

67
class SBranch extends AbstractShacaEntity {

src/share/shaca/entities/snote.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Blob } from '../../../services/blob-interface';
88
import SAttachment = require('./sattachment');
99
import SAttribute = require('./sattribute');
1010
import SBranch = require('./sbranch');
11+
import { SNoteRow } from './rows';
1112

1213
const LABEL = 'label';
1314
const RELATION = 'relation';

0 commit comments

Comments
 (0)