You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a custom framework. As of documentation here I am trying to use second approach which is registering my own framework. So when I create my custom framework and try to register it as follow: frameworkLibrary.setFramework(MyFramework);
I encounter following compile error:
ERROR in projects/dynamic-form/src/lib/dynamic-form/dynamic-form.component.ts(35,40): error TS2345: Argument of type 'typeof MyFramework' is not assignable to parameter of type 'string | Framework'.
Property 'framework' is missing in type 'typeof MyFramework' but required in type 'Framework'.
projects/dynamic-form/src/lib/frameworks/my-framework/my.framework.d.ts(1,10): error TS2724: Module '"/dev/dynamic-form/node_modules/angular6-json-schema-form/angular6-json-schema-form"' has no exported member 'Framework'. Did you mean 'NoFramework'?
This is how my custom framework class looks like:
import { Framework } from 'angular6-json-schema-form';
import { MyFrameworkComponent } from './my-framework.component';
export declare class MyFramework extends Framework {
name: string;
framework: typeof MyFrameworkComponent;
stylesheets: string[];
scripts: string[];
}
Even If I remove the extends Framework so the MyFramework class will look like:
ERROR in projects/dynamic-form/src/lib/dynamic-form/dynamic-form.component.ts(35,40): error TS2345: Argument of type 'typeof MyFramework' is not assignable to parameter of type 'string | Framework'.
Property 'framework' is missing in type 'typeof MyFramework' but required in type 'Framework'.
First I need to make sure that what I am doing to create a custom framework is the proper way to do so and if the answer is yes, any idea how to solve this issue?
The text was updated successfully, but these errors were encountered:
I am trying to create a custom framework. As of documentation here I am trying to use second approach which is registering my own framework. So when I create my custom framework and try to register it as follow:
frameworkLibrary.setFramework(MyFramework);
I encounter following compile error:
This is how my custom framework class looks like:
Even If I remove the
extends Framework
so theMyFramework
class will look like:I get following compile error message:
First I need to make sure that what I am doing to create a custom framework is the proper way to do so and if the answer is yes, any idea how to solve this issue?
The text was updated successfully, but these errors were encountered: