botbuilder-dialogs-adaptive-runtime-core
Advanced tools
Comparing version 4.20.0-ww.preview.20230425 to 4.20.1-preview
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
export declare type Factory<Type, Initial extends boolean> = (initialValue: Initial extends true ? Type : Type | undefined) => Type; | ||
export type Factory<Type, Initial extends boolean> = (initialValue: Initial extends true ? Type : Type | undefined) => Type; | ||
/** | ||
@@ -17,3 +17,3 @@ * DependencyFactory is a function signature that produces an instance that depends on a set of | ||
*/ | ||
export declare type DependencyFactory<Type, Dependencies, Initial extends boolean> = (dependencies: Dependencies, initialValue: Initial extends true ? Type : Type | undefined) => Type; | ||
export type DependencyFactory<Type, Dependencies, Initial extends boolean> = (dependencies: Dependencies, initialValue: Initial extends true ? Type : Type | undefined) => Type; | ||
/** | ||
@@ -20,0 +20,0 @@ * ServiceCollection is an interface that describes a set of methods to register services. This, in a lighter way, |
@@ -6,3 +6,7 @@ "use strict"; | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -9,0 +13,0 @@ if (k2 === undefined) k2 = k; |
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
export declare type Factory<Type, Initial extends boolean> = (initialValue: Initial extends true ? Type : Type | undefined) => Type; | ||
export type Factory<Type, Initial extends boolean> = (initialValue: Initial extends true ? Type : Type | undefined) => Type; | ||
/** | ||
@@ -17,3 +17,3 @@ * DependencyFactory is a function signature that produces an instance that depends on a set of | ||
*/ | ||
export declare type DependencyFactory<Type, Dependencies, Initial extends boolean> = (dependencies: Dependencies, initialValue: Initial extends true ? Type : Type | undefined) => Type; | ||
export type DependencyFactory<Type, Dependencies, Initial extends boolean> = (dependencies: Dependencies, initialValue: Initial extends true ? Type : Type | undefined) => Type; | ||
/** | ||
@@ -20,0 +20,0 @@ * ServiceCollection is an interface that describes a set of methods to register services. This, in a lighter way, |
@@ -73,3 +73,3 @@ "use strict"; | ||
// Asserts factory is not undefined | ||
assert_2.ok(factory, 'illegal invocation with undefined factory'); | ||
(0, assert_2.ok)(factory, 'illegal invocation with undefined factory'); | ||
if (dependencies) { | ||
@@ -95,3 +95,3 @@ this.dependencies.set(key, dependencies); | ||
return this.addFactory(key, Array.isArray(depsOrFactory) ? depsOrFactory : [], (dependencies, value) => { | ||
assert_2.ok(value, `unable to create ${key}, initial value undefined`); | ||
(0, assert_2.ok)(value, `unable to create ${key}, initial value undefined`); | ||
return maybeFactory(dependencies, value); | ||
@@ -101,5 +101,5 @@ }); | ||
else { | ||
assert_2.ok(typeof depsOrFactory === 'function', 'illegal invocation with undefined factory'); | ||
(0, assert_2.ok)(typeof depsOrFactory === 'function', 'illegal invocation with undefined factory'); | ||
return this.addFactory(key, (value) => { | ||
assert_2.ok(value, `unable to create ${key}, initial value undefined`); | ||
(0, assert_2.ok)(value, `unable to create ${key}, initial value undefined`); | ||
return depsOrFactory(value); | ||
@@ -114,3 +114,3 @@ }); | ||
// dependencies works | ||
this.dependencies.forEach((dependencies, node) => dependencies.forEach((dependency) => this.graph.addDependency(node, util_1.stringify(dependency)))); | ||
this.dependencies.forEach((dependencies, node) => dependencies.forEach((dependency) => this.graph.addDependency(node, (0, util_1.stringify)(dependency)))); | ||
// Generate nodes after registering dependencies so ordering is correct | ||
@@ -117,0 +117,0 @@ const nodes = generateNodes(); |
@@ -7,3 +7,4 @@ "use strict"; | ||
// Necessary to help coerce `keyof T` keys to strings. Only used internally to this class. | ||
exports.stringify = (k) => typeof k === 'string' ? k : k.toString(); | ||
const stringify = (k) => typeof k === 'string' ? k : k.toString(); | ||
exports.stringify = stringify; | ||
//# sourceMappingURL=util.js.map |
@@ -5,3 +5,3 @@ { | ||
"author": "Microsoft Corp.", | ||
"version": "4.20.0-ww.preview.20230425", | ||
"version": "4.20.1-preview", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "description": "Bot Framework Adaptive Dialogs runtime core components", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44443
809