@tsed/schema-formio
Version:
Transform Ts.ED Schema & JsonSchema to a valid Formio schema
21 lines (19 loc) • 422 B
text/typescript
import {Component} from "./component.js";
export interface PasswordOpts extends Record<string, any> {
showCharCount?: boolean;
showWordCount?: boolean;
}
/**
* Configure the property as Password component.
* @decorator
* @formio
* @property
* @schema
*/
export function Password(props: PasswordOpts = {}): PropertyDecorator {
return Component({
...props,
type: "password",
protected: true
});
}