diff --git a/server/src/services/typescriptService/bridge.ts b/server/src/services/typescriptService/bridge.ts index 4a0f1d4ffa..a017733cd8 100644 --- a/server/src/services/typescriptService/bridge.ts +++ b/server/src/services/typescriptService/bridge.ts @@ -28,7 +28,7 @@ export declare const ${componentHelperName}: { ): any; }; export declare const ${iterationHelperName}: { - (list: T[], fn: (value: T, index: number) => any): any; + (list: readonly T[], fn: (value: T, index: number) => any): any; (obj: { [key: string]: T }, fn: (value: T, key: string, index: number) => any): any; (num: number, fn: (value: number) => any): any; (obj: object, fn: (value: any, key: string, index: number) => any): any; diff --git a/test/interpolation/fixture/hover/Basic.vue b/test/interpolation/fixture/hover/Basic.vue index e8cbbb7dea..20f5bdbf77 100644 --- a/test/interpolation/fixture/hover/Basic.vue +++ b/test/interpolation/fixture/hover/Basic.vue @@ -7,6 +7,11 @@ {{ item }} +
    +
  • + {{ item }} +
  • +
@@ -15,7 +20,8 @@ export default { data () { return { msg: 'Vetur means "Winter" in icelandic.', - list: [0, 1, 2] + list: [0, 1, 2], + readonlyList: ['foo', 'bar'] as Readonly } } } diff --git a/test/interpolation/hover/basic.test.ts b/test/interpolation/hover/basic.test.ts index 9ef3daae19..96685b6bd4 100644 --- a/test/interpolation/hover/basic.test.ts +++ b/test/interpolation/hover/basic.test.ts @@ -25,6 +25,13 @@ describe('Should do hover interpolation for