Skip to content

Commit 04b7f7f

Browse files
committed
Fix public typings
1 parent 157cf6b commit 04b7f7f

File tree

4 files changed

+35
-12
lines changed

4 files changed

+35
-12
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## API Report File for "@firebase/telemetry-react"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { FirebaseOptions } from '@firebase/app';
8+
9+
// @public
10+
export function FirebaseTelemetry({ firebaseOptions }: {
11+
firebaseOptions?: FirebaseOptions;
12+
}): null;
13+
14+
15+
// (No @packageDocumentation comment for this package)
16+
17+
```

common/api-review/telemetry.api.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import { AnyValueMap } from '@opentelemetry/api-logs';
88
import { FirebaseApp } from '@firebase/app';
9+
import { Instrumentation } from 'next';
910
import { LoggerProvider } from '@opentelemetry/sdk-logs';
1011

1112
// @public
@@ -17,13 +18,7 @@ export function flush(telemetry: Telemetry): Promise<void>;
1718
// @public
1819
export function getTelemetry(app?: FirebaseApp): Telemetry;
1920

20-
// @public (undocumented)
21-
export namespace Instrumentation {
22-
// Warning: (ae-forgotten-export) The symbol "InstrumentationOnRequestError" needs to be exported by the entry point index.d.ts
23-
//
24-
// (undocumented)
25-
export type onRequestError = InstrumentationOnRequestError;
26-
}
21+
export { Instrumentation }
2722

2823
// @public
2924
export const nextOnRequestError: Instrumentation.onRequestError;
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
{
22
"extends": "../../config/api-extractor.json",
3-
// Point it to your entry point d.ts file.
43
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
54
"additionalEntryPoints": [
65
{
76
"modulePath": "react",
87
"filePath": "<projectFolder>/dist/react/index.d.ts"
98
}
109
],
10+
"dtsRollup": {
11+
// rollup is not supported when multiple entry points are present.
12+
// npm script api-report:* is used to generate dts rollup.
13+
"enabled": false
14+
},
15+
"apiReport": {
16+
// apiReport is handled by npm script api-report:*
17+
"enabled": false
18+
},
1119
"bundledPackages": ["next"]
1220
}

packages/telemetry/package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"browser": "dist/index.esm.js",
99
"exports": {
1010
".": {
11-
"types": "./dist/index.d.ts",
11+
"types": "./dist/index-public.d.ts",
1212
"node": {
1313
"import": "./dist/node-esm/index.node.esm.js",
1414
"default": "./dist/index.node.cjs.js"
@@ -20,7 +20,7 @@
2020
"default": "./dist/index.esm.js"
2121
},
2222
"./react": {
23-
"types": "./dist/react/index.d.ts",
23+
"types": "./dist/react/index-public.d.ts",
2424
"node": {
2525
"import": "./dist/react/index.esm.js",
2626
"default": "./dist/react/index.cjs.js"
@@ -48,8 +48,11 @@
4848
"test:browser": "karma start",
4949
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha **/*.test.ts src/**/*.test.ts --config ../../config/mocharc.node.js",
5050
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
51-
"api-report": "api-extractor run --local --verbose",
52-
"typings:public": "node ../../scripts/build/use_typings.js ./dist/index.d.ts"
51+
"api-report": "yarn api-report:main && yarn api-report:react && yarn api-report:api-json",
52+
"api-report:main": "ts-node-script ../../repo-scripts/prune-dts/extract-public-api.ts --package telemetry --packageRoot . --typescriptDts ./dist/index.d.ts --rollupDts ./dist/private.d.ts --untrimmedRollupDts ./dist/internal.d.ts --publicDts ./dist/index-public.d.ts",
53+
"api-report:react": "ts-node-script ../../repo-scripts/prune-dts/extract-public-api.ts --package telemetry-react --packageRoot . --typescriptDts ./dist/react/index.d.ts --rollupDts ./dist/react/private.d.ts --untrimmedRollupDts ./dist/react/internal.d.ts --publicDts ./dist/react/index-public.d.ts",
54+
"api-report:api-json": "api-extractor run --local --verbose",
55+
"typings:public": "node ../../scripts/build/use_typings.js ./dist/index-public.d.ts"
5356
},
5457
"peerDependencies": {
5558
"@firebase/app": "0.x",

0 commit comments

Comments
 (0)