flow icon indicating copy to clipboard operation
flow copied to clipboard

types.d.ts comparison fails due to white space difference

Open tepi opened this issue 3 months ago • 0 comments

Description of the bug

Error message:

java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: 
****************************************************************************
*  The TypeScript type declaration file 'types.d.ts' has been customized.  *
*  Make sure the exact following configuration is present in that file:    *
*                                                                          *
declare module '*.css?inline' {
  import type { CSSResultGroup } from 'lit';
  const content: CSSResultGroup;
  export default content;
}

declare module 'csstype' {
  interface Properties {
    [index: `--${string}`]: any;
  }
}

types.d.ts content:

// This TypeScript modules definition file is generated by vaadin-maven-plugin.
// You can not directly import your different static files into TypeScript,
// This is needed for TypeScript compiler to declare and export as a TypeScript module.
// It is recommended to commit this file to the VCS.
// You might want to change the configurations to fit your preferences
declare module '*.css?inline' {
  import type {CSSResultGroup} from 'lit';
  const content: CSSResultGroup;
  export default content;
}

// Allow any CSS Custom Properties
declare module 'csstype' {
  interface Properties {
    [index: `--${string}`]: any;
  }
}

Expected behavior

Comparison should not fail due to whitespace difference, namely { CSSResultGroup } vs. {CSSResultGroup}.

Minimal reproducible example

types.d.ts file like in the description

Versions

  • Vaadin / Flow version: 24.5-SNAPSHOT

tepi avatar May 16 '24 07:05 tepi