mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
feat: improve typings of Angular components used in sb init
This commit is contained in:
parent
5f589a2697
commit
712ba57fc5
2
lib/cli/src/frameworks/angular/User.ts
Normal file
2
lib/cli/src/frameworks/angular/User.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||||
|
export interface User {}
|
@ -1,4 +1,5 @@
|
|||||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||||
|
import { User } from './User';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'storybook-header',
|
selector: 'storybook-header',
|
||||||
@ -50,7 +51,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export default class HeaderComponent {
|
export default class HeaderComponent {
|
||||||
@Input()
|
@Input()
|
||||||
user: unknown = null;
|
user: User | null = null;
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
onLogin = new EventEmitter<Event>();
|
onLogin = new EventEmitter<Event>();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||||
|
import { User } from './User';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'storybook-page',
|
selector: 'storybook-page',
|
||||||
@ -61,7 +62,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export default class PageComponent {
|
export default class PageComponent {
|
||||||
@Input()
|
@Input()
|
||||||
user: unknown = null;
|
user: User | null = null;
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
onLogin = new EventEmitter<Event>();
|
onLogin = new EventEmitter<Event>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user