mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08: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 { 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 = { | ||||
|  | ||||
| @ -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) => { | ||||
|  | ||||
| @ -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 { 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"; | ||||
|  | ||||
| @ -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) => { | ||||
|  | ||||
| @ -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 ]; | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| "use strict"; | ||||
| 
 | ||||
| import { SAttributeRow } from "./rows"; | ||||
| import SNote = require("./snote"); | ||||
| 
 | ||||
| const AbstractShacaEntity = require('./abstract_shaca_entity'); | ||||
|  | ||||
| @ -1,6 +1,7 @@ | ||||
| "use strict"; | ||||
| 
 | ||||
| import AbstractShacaEntity = require('./abstract_shaca_entity'); | ||||
| import { SBranchRow } from './rows'; | ||||
| import SNote = require('./snote'); | ||||
| 
 | ||||
| class SBranch extends AbstractShacaEntity { | ||||
|  | ||||
| @ -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'; | ||||
|  | ||||
| @ -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(); | ||||
|  | ||||
| @ -1,6 +1,7 @@ | ||||
| { | ||||
| 	"compilerOptions": { | ||||
|       "moduleResolution": "Node", | ||||
|       "moduleResolution": "Node16", | ||||
| 	  "module": "Node16", | ||||
| 	  "target": "ES2018", | ||||
| 	  "declaration": false, | ||||
| 	  "sourceMap": true, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran