import { ConformancePatternRule , ErrorCode , PatternKind } from '../../third_party/tsetse/rules/conformance_pattern_rule' ; import { RuleConfiguration } from '../../rule_configuration' ; let errMsg = 'Creating a Trusted Types policy requires a security review.' ; /**
 * A rule that bans TrustedTypeProlicyFactory#createPolicy.
 */ export class Rule extends ConformancePatternRule { static readonly RULE_NAME = 'ban-trustedtypes-createpolicy' ; constructor ( configuration = { } ) { super ( { errorCode : ErrorCode . CONFORMANCE_PATTERN , errorMessage : errMsg , kind : PatternKind . BANNED_PROPERTY , values : [ 'TrustedTypePolicyFactory.prototype.createPolicy' ] , name : Rule . RULE_NAME , ... configuration , } ) ; } }