Skip to content

[Bug] Typescript highlight issue #876

Open
@Mister-Hope

Description

@Mister-Hope

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.57.1
  • OS Version: Win10 19043.1052

Steps to Reproduce:

image

export type PageOptions<
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  Data extends Record<string, any>,
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  Custom extends Record<string, any>
> = (Custom &
  Partial<WechatMiniprogram.Page.Data<Data>> &
  Partial<WechatMiniprogram.Page.ILifetime & ExtendedPageLifeCycles> &
  Partial<ExtendedPageProperties> & {
    options?: WechatMiniprogram.Component.ComponentOptions;
  }) &
  ThisType<PageInstance<Data, Custom>>;

export interface PageConstructor {
  <
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    Data extends Record<string, any>,
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    Custom extends Record<string, any>
  >(
    name: string,
    options: PageOptions<Data, Custom>
  ): void;
}

I think this issue exist for quite a long time.

This may also happens in certain forms with generics.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions