mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore(deps): update all dependencies (#293)
This commit is contained in:
@@ -35,11 +35,11 @@ export class ChainedConverter extends TypedRepresentationConverter {
|
||||
return this.converters[this.converters.length - 1];
|
||||
}
|
||||
|
||||
public async getInputTypes(): Promise<{ [contentType: string]: number }> {
|
||||
public async getInputTypes(): Promise<Record<string, number>> {
|
||||
return this.first.getInputTypes();
|
||||
}
|
||||
|
||||
public async getOutputTypes(): Promise<{ [contentType: string]: number }> {
|
||||
public async getOutputTypes(): Promise<Record<string, number>> {
|
||||
return this.last.getOutputTypes();
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class ChainedConverter extends TypedRepresentationConverter {
|
||||
checkRequest(input, inTypes, outTypes);
|
||||
}
|
||||
|
||||
private filterTypes(typeVals: { [contentType: string]: number }): string[] {
|
||||
private filterTypes(typeVals: Record<string, number>): string[] {
|
||||
return Object.keys(typeVals).filter((name): boolean => typeVals[name] > 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@ import { TypedRepresentationConverter } from './TypedRepresentationConverter';
|
||||
* Converts `internal/quads` to most major RDF serializations.
|
||||
*/
|
||||
export class QuadToRdfConverter extends TypedRepresentationConverter {
|
||||
public async getInputTypes(): Promise<{ [contentType: string]: number }> {
|
||||
public async getInputTypes(): Promise<Record<string, number>> {
|
||||
return { [INTERNAL_QUADS]: 1 };
|
||||
}
|
||||
|
||||
public async getOutputTypes(): Promise<{ [contentType: string]: number }> {
|
||||
public async getOutputTypes(): Promise<Record<string, number>> {
|
||||
return rdfSerializer.getContentTypesPrioritized();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ import { TypedRepresentationConverter } from './TypedRepresentationConverter';
|
||||
* Converts most major RDF serializations to `internal/quads`.
|
||||
*/
|
||||
export class RdfToQuadConverter extends TypedRepresentationConverter {
|
||||
public async getInputTypes(): Promise<{ [contentType: string]: number }> {
|
||||
public async getInputTypes(): Promise<Record<string, number>> {
|
||||
return rdfParser.getContentTypesPrioritized();
|
||||
}
|
||||
|
||||
public async getOutputTypes(): Promise<{ [contentType: string]: number }> {
|
||||
public async getOutputTypes(): Promise<Record<string, number>> {
|
||||
return { [INTERNAL_QUADS]: 1 };
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@ export abstract class TypedRepresentationConverter extends RepresentationConvert
|
||||
* The priority weight goes from 0 up to 1.
|
||||
* @returns A promise resolving to a hash mapping content type to a priority number.
|
||||
*/
|
||||
public abstract getInputTypes(): Promise<{ [contentType: string]: number }>;
|
||||
public abstract getInputTypes(): Promise<Record<string, number>>;
|
||||
|
||||
/**
|
||||
* Get a hash of all supported output content types for this converter, mapped to a numerical priority.
|
||||
* The priority weight goes from 0 up to 1.
|
||||
* @returns A promise resolving to a hash mapping content type to a priority number.
|
||||
*/
|
||||
public abstract getOutputTypes(): Promise<{ [contentType: string]: number }>;
|
||||
public abstract getOutputTypes(): Promise<Record<string, number>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user