Reputation: 9477
In PrimeNG (Angular components), Message is available in these three packages.
Are these all the same?
Seems all these work to display the messages.
import { Message } from 'primeng/components/common/message';
import { Message } from 'primeng/components/common/api';
import { Message } from 'primeng/api';
Upvotes: 0
Views: 2248
Reputation: 6655
Yes, each of them refers to the same Message interface.
The best to be sure is to read the source code.
In primeng/components/common/api for instance, you can see that the line
export { Message } from './message';
refers to the file primeng/components/common/message where the interface is described :
export interface Message {
severity?: string;
summary?: string;
detail?: string;
id?: any;
key?: string;
life?: number;
sticky?: boolean;
closable?: boolean;
data?: any;
}
Upvotes: 1