Skip to content

Commit 4e6d0d3

Browse files
committed
📝 [js-core] Add configuration entry to typedoc and API report
Register src/entries/configuration.ts as a typedoc entry point and add the generated API Extractor report for the js-core configuration API.
1 parent 9593d54 commit 4e6d0d3

2 files changed

Lines changed: 90 additions & 1 deletion

File tree

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
## API Report File for "@datadog/js-core"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
// @public (undocumented)
8+
export type BooleanField = {
9+
type: 'boolean';
10+
} & Optionality & Multiple & Strict;
11+
12+
// @public (undocumented)
13+
export interface ConfigurationSchema {
14+
// (undocumented)
15+
readonly [key: string]: FieldDef;
16+
}
17+
18+
// @public (undocumented)
19+
export type EnumField = ({
20+
type: 'enum';
21+
values: readonly string[];
22+
allowAll?: true;
23+
} & Optionality & Multiple & Strict) | ({
24+
type: 'enum';
25+
values: Record<string, string>;
26+
allowAll?: true;
27+
} & Optionality & Multiple & Strict);
28+
29+
// @public (undocumented)
30+
export type FieldDef = StringField | PercentageField | BooleanField | SiteField | MatchOptionField | EnumField | UnionField | SchemaField | FunctionField;
31+
32+
// @public (undocumented)
33+
export type FunctionField = {
34+
type: 'function';
35+
signature?: ((...args: any[]) => any) | undefined;
36+
} & Optionality & Multiple & Strict;
37+
38+
// @public (undocumented)
39+
export type InferredConfig<S extends ConfigurationSchema> = {
40+
[K in keyof S]: InferOutput<S[K]>;
41+
};
42+
43+
// @public
44+
export type MatchOption = string | RegExp | ((value: string) => boolean);
45+
46+
// @public (undocumented)
47+
export type MatchOptionField = {
48+
type: 'match-option';
49+
} & Optionality & Multiple & Strict;
50+
51+
// @public (undocumented)
52+
export type PercentageField = {
53+
type: 'percentage';
54+
} & Optionality & Multiple & Strict;
55+
56+
// @public (undocumented)
57+
export type SchemaField = {
58+
type: 'schema';
59+
schema: ConfigurationSchema;
60+
} & Optionality & Multiple & Strict;
61+
62+
// @public (undocumented)
63+
export type SiteField = {
64+
type: 'site';
65+
} & Optionality & Multiple & Strict;
66+
67+
// @public (undocumented)
68+
export type StringField = {
69+
type: 'string';
70+
} & Optionality & Multiple & Strict;
71+
72+
// @public (undocumented)
73+
export type UnionField = {
74+
type: 'union';
75+
variants: readonly FieldDef[];
76+
} & Optionality & Multiple & Strict;
77+
78+
// @public (undocumented)
79+
export function validateAndBuildConfiguration<S extends ConfigurationSchema>(initConfig: Record<string, unknown> | null | undefined, schema: S, display?: Display): InferredConfig<S> | undefined;
80+
81+
// (No @packageDocumentation comment for this package)
82+
83+
```

packages/js-core/typedoc.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
22
"$schema": "https://typedoc.org/schema.json",
3-
"entryPoints": ["src/entries/time.ts", "src/entries/monitor.ts", "src/entries/util.ts", "src/entries/assembly.ts"]
3+
"entryPoints": [
4+
"src/entries/time.ts",
5+
"src/entries/monitor.ts",
6+
"src/entries/util.ts",
7+
"src/entries/assembly.ts",
8+
"src/entries/configuration.ts"
9+
]
410
}

0 commit comments

Comments
 (0)