Skip to content

Commit 47873d2

Browse files
committed
Add ref doc generation to telemetry package
1 parent 6993a18 commit 47873d2

File tree

7 files changed

+88
-3
lines changed

7 files changed

+88
-3
lines changed

common/api-review/telemetry.api.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## API Report File for "@firebase/telemetry"
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 function registerTelemetry(): void;
9+
10+
// @public (undocumented)
11+
export function testFxn(): number;
12+
13+
14+
// (No @packageDocumentation comment for this package)
15+
16+
```

docs-devsite/_toc.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,3 +648,6 @@ toc:
648648
path: /docs/reference/js/storage.uploadtask.md
649649
- title: UploadTaskSnapshot
650650
path: /docs/reference/js/storage.uploadtasksnapshot.md
651+
- title: telemetry
652+
path: /docs/reference/js/telemetry.md
653+
section: []

docs-devsite/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ https://github.com/firebase/firebase-js-sdk
2828
| [@firebase/performance](./performance.md#performance_package) | The Firebase Performance Monitoring Web SDK. This SDK does not work in a Node.js environment. |
2929
| [@firebase/remote-config](./remote-config.md#remote-config_package) | The Firebase Remote Config Web SDK. This SDK does not work in a Node.js environment. |
3030
| [@firebase/storage](./storage.md#storage_package) | Cloud Storage for Firebase |
31+
| [@firebase/telemetry](./telemetry.md#telemetry_package) | |
3132

docs-devsite/telemetry.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# telemetry package
13+
14+
## Functions
15+
16+
| Function | Description |
17+
| --- | --- |
18+
| [testFxn()](./telemetry.md#testfxn) | Copyright 2025 Google LLC<!-- -->Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at<!-- -->http://www.apache.org/licenses/LICENSE-2.0<!-- -->Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
19+
| [tonyFn()](./telemetry.md#tonyfn) | |
20+
21+
## function()
22+
23+
### testFxn() {:#testfxn}
24+
25+
Copyright 2025 Google LLC
26+
27+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
28+
29+
http://www.apache.org/licenses/LICENSE-2.0
30+
31+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
32+
33+
<b>Signature:</b>
34+
35+
```typescript
36+
export declare function testFxn(): number;
37+
```
38+
<b>Returns:</b>
39+
40+
number
41+
42+
### tonyFn() {:#tonyfn}
43+
44+
<b>Signature:</b>
45+
46+
```typescript
47+
export declare function tonyFn(): void;
48+
```
49+
<b>Returns:</b>
50+
51+
void
52+

packages/telemetry/api-extractor.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../../config/api-extractor.json",
3+
// Point it to your entry point d.ts file.
4+
"mainEntryPointFilePath": "<projectFolder>/dist/src/index.d.ts",
5+
"dtsRollup": {
6+
"enabled": true,
7+
"untrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>.d.ts",
8+
"betaTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-public.d.ts"
9+
}
10+
}

packages/telemetry/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
"test:all": "run-p --npm-path npm test:browser test:node",
3636
"test:browser": "karma start",
3737
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.* --config ../../config/mocharc.node.js",
38-
"trusted-type-check": "tsec -p tsconfig.json --noEmit"
38+
"api-report": "api-extractor run --local --verbose",
39+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
40+
"typings:public": "node ../../scripts/build/use_typings.js ./dist/telemetry-public.d.ts"
3941
},
4042
"peerDependencies": {
4143
"@firebase/app": "0.x",
@@ -67,7 +69,7 @@
6769
"bugs": {
6870
"url": "https://github.com/firebase/firebase-js-sdk/issues"
6971
},
70-
"typings": "dist/index.d.ts",
72+
"typings": "./dist/telemetry-public.d.ts",
7173
"nyc": {
7274
"extension": [
7375
".ts"

scripts/docgen/docgen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ const PREFERRED_PARAMS = [
6060
'performance',
6161
'remoteConfig',
6262
'storage',
63-
'ai'
63+
'ai',
64+
'telemetry'
6465
];
6566

6667
let authApiReportOriginal: string;

0 commit comments

Comments
 (0)