Skip to content

Commit 8804ad0

Browse files
committed
fix(miniprogram-typescript): relaxing typings of wx:for
1 parent 674eb49 commit 8804ad0

File tree

2 files changed

+2
-3
lines changed
  • glass-easel-miniprogram-typescript/src
  • glass-easel-template-compiler/src/stringify

2 files changed

+2
-3
lines changed

glass-easel-miniprogram-typescript/src/cli.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { parseArgs } from 'util'
2-
import fs from 'node:fs'
32
import * as ts from 'typescript'
43
import { TmplGroup } from 'glass-easel-template-compiler'
54
import { type Diagnostic, DiagnosticLevel, Server } from './server'

glass-easel-template-compiler/src/stringify/typescript.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const PRESERVED_VAR_NAMES: [&'static str; 3] = ["component", "data", "methods"];
2929

3030
pub(crate) const fn tmpl_converted_expr_runtime_string() -> &'static str {
3131
r#"
32-
type _ForIndex_<T> = T extends any[] ? number : T extends { [key: string | symbol]: any } ? string | symbol : number;
33-
type _ForItem_<T> = T extends (infer T)[] ? T : T extends { [key: string | symbol]: infer V } ? V : any;
32+
type _ForIndex_<T> = T extends any[] ? number : T extends { [key: string]: any } ? string : any;
33+
type _ForItem_<T> = T extends (infer T)[] ? T : T extends { [key: string]: infer V } ? V : any;
3434
type _ForKey_<T, N extends string> = N extends "*this" ? _ForItem_<T> : _ForItem_<T> extends { [k: string]: any } ? _ForItem_<T>[N] : unknown;
3535
"#
3636
}

0 commit comments

Comments
 (0)