Skip to content

Commit cd82aed

Browse files
motchingMr. Robot
andauthored
🤖 Merge PR DefinitelyTyped#74563 [@types/knockout] allow constructor view models by @motching
Co-authored-by: Mr. Robot <mrrobot@asandia.com>
1 parent 1fc3895 commit cd82aed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎types/knockout/index.d.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,13 @@ declare namespace KnockoutComponentTypes {
10821082
}
10831083

10841084
// viewmodel types
1085-
interface ViewModelFunction {
1085+
type ViewModelFunction = ViewModelConstructor | ViewModelFactory;
1086+
1087+
interface ViewModelConstructor {
1088+
new (params?: any): any;
1089+
}
1090+
1091+
interface ViewModelFactory {
10861092
(params?: any): any;
10871093
}
10881094

0 commit comments

Comments
 (0)