From ed027b8b280db54697bd37cd2e592de1f067e370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 4 Mar 2022 16:59:57 +0100 Subject: [PATCH] just fix some random ugly comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .../DependencyGraph/DependencyGraph.tsx | 2 +- .../test-utils/src/testUtils/logCollector.ts | 26 ++++++++++------ .../catalog-backend/src/ingestion/types.ts | 2 +- .../catalog-backend/src/processing/types.ts | 4 +-- plugins/catalog-backend/src/service/types.ts | 3 +- .../src/scaffolder/actions/types.ts | 3 +- plugins/tech-insights-node/src/facts.ts | 30 ++++++++----------- .../techdocs-backend/src/service/router.ts | 4 +-- 8 files changed, 40 insertions(+), 34 deletions(-) diff --git a/packages/core-components/src/components/DependencyGraph/DependencyGraph.tsx b/packages/core-components/src/components/DependencyGraph/DependencyGraph.tsx index 49f209d04e..6db8e2dd02 100644 --- a/packages/core-components/src/components/DependencyGraph/DependencyGraph.tsx +++ b/packages/core-components/src/components/DependencyGraph/DependencyGraph.tsx @@ -99,7 +99,7 @@ export interface DependencyGraphProps /** * Margin on top and bottom of whole graph * - * @remarks + * @remarks * * Default: 0 */ diff --git a/packages/test-utils/src/testUtils/logCollector.ts b/packages/test-utils/src/testUtils/logCollector.ts index b9fa6220ed..7529a00e7a 100644 --- a/packages/test-utils/src/testUtils/logCollector.ts +++ b/packages/test-utils/src/testUtils/logCollector.ts @@ -18,37 +18,44 @@ /** * Severity levels of {@link CollectedLogs} - * @public */ + * @public + */ export type LogFuncs = 'log' | 'warn' | 'error'; /** * AsyncLogCollector type used in {@link (withLogCollector:1)} callback function. - * @public */ + * @public + */ export type AsyncLogCollector = () => Promise; /** * SyncLogCollector type used in {@link (withLogCollector:2)} callback function. - * @public */ + * @public + */ export type SyncLogCollector = () => void; /** * Union type used in {@link (withLogCollector:3)} callback function. - * @public */ + * @public + */ export type LogCollector = AsyncLogCollector | SyncLogCollector; /** * Map of severity level and corresponding log lines. - * @public */ + * @public + */ export type CollectedLogs = { [key in T]: string[] }; const allCategories = ['log', 'warn', 'error']; /** * Asynchronous log collector with that collects all categories - * @public */ + * @public + */ export function withLogCollector( callback: AsyncLogCollector, ): Promise>; /** * Synchronous log collector with that collects all categories - * @public */ + * @public + */ export function withLogCollector( callback: SyncLogCollector, ): CollectedLogs; @@ -64,7 +71,8 @@ export function withLogCollector( /** * Synchronous log collector with that only collects selected categories - * @public */ + * @public + */ export function withLogCollector( logsToCollect: T[], callback: SyncLogCollector, @@ -73,7 +81,7 @@ export function withLogCollector( /** * Log collector that collect logs either from a sync or async collector. * @public - * */ + */ export function withLogCollector( logsToCollect: LogFuncs[] | LogCollector, callback?: LogCollector, diff --git a/plugins/catalog-backend/src/ingestion/types.ts b/plugins/catalog-backend/src/ingestion/types.ts index 37d12d12b1..6d1e9a3927 100644 --- a/plugins/catalog-backend/src/ingestion/types.ts +++ b/plugins/catalog-backend/src/ingestion/types.ts @@ -62,7 +62,7 @@ export type AnalyzeLocationExistingEntity = { * enough info for the frontend to know what form data to show to the user * for overriding/completing the info. * @public - * */ + */ export type AnalyzeLocationGenerateEntity = { // Some form of partial representation of the entity entity: RecursivePartial; diff --git a/plugins/catalog-backend/src/processing/types.ts b/plugins/catalog-backend/src/processing/types.ts index 484cd73939..b178522c14 100644 --- a/plugins/catalog-backend/src/processing/types.ts +++ b/plugins/catalog-backend/src/processing/types.ts @@ -48,7 +48,7 @@ export type EntityProcessingResult = /** * Responsible for executing the individual processing steps in order to fully process an entity. * @public - * */ + */ export interface CatalogProcessingOrchestrator { process(request: EntityProcessingRequest): Promise; } @@ -56,7 +56,7 @@ export interface CatalogProcessingOrchestrator { /** * Entities that are not yet processed. * @public - * */ + */ export type DeferredEntity = { entity: Entity; locationKey?: string; diff --git a/plugins/catalog-backend/src/service/types.ts b/plugins/catalog-backend/src/service/types.ts index 02268ab63c..fc315b9d89 100644 --- a/plugins/catalog-backend/src/service/types.ts +++ b/plugins/catalog-backend/src/service/types.ts @@ -77,7 +77,8 @@ export interface RefreshService { /** * Interacts with the database to manage locations. - * @public */ + * @public + */ export interface LocationStore { createLocation(location: LocationInput): Promise; listLocations(): Promise; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/types.ts b/plugins/scaffolder-backend/src/scaffolder/actions/types.ts index 2a87f58fd8..55ef68423e 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/types.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/types.ts @@ -26,7 +26,8 @@ import { /** * ActionContext is passed into scaffolder actions. - * @public */ + * @public + */ export type ActionContext = { /** * Base URL for the location of the task spec, typically the url of the source entity file. diff --git a/plugins/tech-insights-node/src/facts.ts b/plugins/tech-insights-node/src/facts.ts index 7a70f92f92..24b6764ba4 100644 --- a/plugins/tech-insights-node/src/facts.ts +++ b/plugins/tech-insights-node/src/facts.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { DateTime, DurationLike } from 'luxon'; import { Config } from '@backstage/config'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; @@ -62,11 +63,10 @@ export type TechInsightFact = { }; /** - * Response type used when returning from database and API. * Adds a field for ref for easier usage * - * @public + * @public */ export type FlatTechInsightFact = TechInsightFact & { /** @@ -76,12 +76,12 @@ export type FlatTechInsightFact = TechInsightFact & { }; /** - * @public - * * A record type to specify individual fact shapes * * Used as part of a schema to validate, identify and generically construct usage implementations * of individual fact values in the system. + * + * @public */ export type FactSchema = { /** @@ -142,11 +142,9 @@ export type FactRetrieverContext = { }; /** - * @public - * * FactRetriever interface * - * A component specifying + * @public */ export interface FactRetriever { /** @@ -191,10 +189,9 @@ export interface FactRetriever { } /** - * @public - * * A Luxon duration like object for time to live value * + * @public * @example * \{ timeToLive: 1209600000 \} * \{ timeToLive: \{ weeks: 4 \} \} @@ -203,10 +200,9 @@ export interface FactRetriever { export type TTL = { timeToLive: DurationLike }; /** - * @public - * * A maximum number for items to be kept in the database for each fact retriever/entity pair * + * @public * @example * \{ maxItems: 10 \} * @@ -214,25 +210,25 @@ export type TTL = { timeToLive: DurationLike }; export type MaxItems = { maxItems: number }; /** - * @public - * * A fact lifecycle definition. Determines which strategy to use to purge expired facts from the database. + * + * @public */ export type FactLifecycle = TTL | MaxItems; /** - * @public - * * A flat serializable structure for Facts. * Containing information about fact schema, version, id, and entity filters + * + * @public */ export type FactSchemaDefinition = Omit; /** - * @public - * * Registration of a fact retriever * Used to add and schedule individual fact retrievers to the fact retriever engine. + * + * @public */ export type FactRetrieverRegistration = { /** diff --git a/plugins/techdocs-backend/src/service/router.ts b/plugins/techdocs-backend/src/service/router.ts index 73f212d049..9d240cb7fa 100644 --- a/plugins/techdocs-backend/src/service/router.ts +++ b/plugins/techdocs-backend/src/service/router.ts @@ -347,8 +347,8 @@ export function createEventStream( } /** - * @deprecated use event-stream implementation of the sync endpoint - * */ + * @deprecated use event-stream implementation of the sync endpoint + */ export function createHttpResponse( res: Response, ): DocsSynchronizerSyncOpts {