UNPKG

jsii

Version:

[![Join the chat at https://cdk.Dev](https://img.shields.io/static/v1?label=Slack&message=cdk.dev&color=brightgreen&logo=slack)](https://cdk.dev) [![All Contributors](https://img.shields.io/github/all-contributors/aws/jsii/main?label=%E2%9C%A8%20All%20Con

37 lines 1.68 kB
import { Assembly } from '@jsii/spec'; import * as ts from 'typescript'; import { ProjectInfo } from '../project-info'; import { TypeTracker } from '../type-tracker'; export declare const WARNINGSCODE_FILE_NAME = ".warnings.jsii.js"; export declare class DeprecationWarningsInjector { private readonly typeChecker; private readonly typeTracker; private transformers; private shouldRenderValidatorCache; private validatorCacheSeenSet; constructor(typeChecker: ts.TypeChecker, typeTracker: TypeTracker); process(assembly: Assembly, projectInfo: ProjectInfo): void; get customTransformers(): ts.CustomTransformers; private buildTypeIndex; /** * Whether the validator for the given type should be rendered * * A validator should be rendered if: * * - It contains any deprecated members (base case). * - It references any other types whose validators should be rendered. * - It inherits from other types whose validators should be rendered. * - It references types that reference this type (recursive types). * - It references types from another assembly. * * For the last one we technically return `true`, indicating that a validator * *should* be rendered, but when we get to rendering no statements are * actually produced and the validator function is never rendered. This was * pre-existing behavior that I didn't change because introducing calls into * other assemblies out of the blue introduces risk. */ private shouldRenderValidator; private generateTypeValidation; private processInterfaceType; } //# sourceMappingURL=deprecation-warnings.d.ts.map