Lightweight DOM Libraries

Search results:

    Configuration

    Limiting Types

    By default, support for HTML and SVG Elements is enabled. You can limit this (to prevent certain tags from being used) by creating a d.ts file (e.g. tsx-dom-ssr-config.d.ts), in your source folder with this content:

    import "tsx-dom-ssr";
    
    declare module "tsx-dom-ssr" {
      export interface TsxConfig {
        // Set one of these to false to disable support for them
        svg: false;
        // html: false;
      }
    }
    

    A configuration like this will just limit the possible types. It does not affect the code in any way.