File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,7 @@ const PROPERTY_DENYLIST = new Set<string | symbol>([
1515 'valueOf'
1616] ) ;
1717
18- export default function deprecateNamespace < T extends { [ key : string | symbol ] : any } > (
19- namespace : T ,
20- message : string
21- ) : T {
18+ export default function deprecateObject < T extends { [ key : string | symbol ] : any } > ( namespace : T , message : string ) : T {
2219 const warnDeprecation = warnOnce ( message ) ;
2320
2421 return new Proxy < T > ( namespace , {
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import * as hooks from '../actual/hook/full';
2121const deprecatedHooks = deprecateObject (
2222 hooks ,
2323 "`import { hooks } from 'botframework-webchat'` has been deprecated, use `import { %s } from 'botframework-webchat/hook'` instead."
24- ) ;
24+ ) as typeof hooks ; // Need explicit type casting.
2525
2626export { deprecatedHooks as hooks } ;
2727
@@ -30,7 +30,7 @@ import * as Components from '../actual/component/full';
3030const deprecatedComponents = deprecateObject (
3131 Components ,
3232 "`import { Components } from 'botframework-webchat'` has been deprecated, use `import { %s } from 'botframework-webchat/component'` instead."
33- ) ;
33+ ) as typeof Components ; // Need explicit type casting.
3434
3535export { deprecatedComponents as Components } ;
3636// #endregion
You can’t perform that action at this time.
0 commit comments