Skip to content

Commit

Permalink
chore(demo): drop any (#9474)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Oct 17, 2024
1 parent 424496b commit c17cd11
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
5 changes: 3 additions & 2 deletions projects/demo/src/modules/app/metrika/metrika.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DOCUMENT, isPlatformBrowser} from '@angular/common';
import {inject, Injectable, PLATFORM_ID} from '@angular/core';
import type {Params} from '@angular/router';
import {TUI_IS_E2E, tuiCreateOptions} from '@taiga-ui/cdk';

declare global {
Expand All @@ -15,8 +16,8 @@ declare global {

interface HitOptions {
referer?: string;
params?: any;
title?: any;
params?: Params;
title?: string;
}

interface YaMetrikaOptions {
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/modules/components/abstract/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export abstract class AbstractExampleTuiControl

public inputMode = this.inputModeVariants[0]!;

public maxLength: any = null;
public maxLength: unknown = null;

public type = this.typeVariants[0]!;

Expand Down
12 changes: 8 additions & 4 deletions projects/demo/src/modules/components/radio/examples/2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@ import {Component} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiPlatform} from '@taiga-ui/cdk';
import {TuiButton, TuiLabel} from '@taiga-ui/core';
import {TuiRadio} from '@taiga-ui/kit';

interface TestValue {
test: string;
}

@Component({
standalone: true,
imports: [FormsModule, TuiButton, TuiLabel, TuiPlatform, TuiRadio],
imports: [FormsModule, TuiButton, TuiLabel, TuiRadio],
templateUrl: './index.html',
encapsulation,
changeDetection,
})
export default class Example {
protected value: any = null;
protected identityMatcher = (a: any, b: any): boolean => a?.test === b?.test;
protected value: TestValue | null = null;
protected identityMatcher = (a: TestValue, b: TestValue): boolean =>
a?.test === b?.test;
}
2 changes: 1 addition & 1 deletion projects/demo/src/utils/component.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {toKebab} from './kebab.pipe';
export class TuiComponentPipe implements PipeTransform {
private readonly page = inject(TuiDocPage);

public async transform(index: number): Promise<{readonly default: any}> {
public async transform(index: number): Promise<{readonly default: unknown}> {
return import(
`../modules/${this.page.type}/${toKebab(this.page.header)}/examples/${index}/index.ts`
);
Expand Down

0 comments on commit c17cd11

Please sign in to comment.