While working on a custom pipe, I encountered a situation that puzzled me. Can you explain why the code snippet below is considered valid?
async transform(value: any): Promise<string> {
let fullNameBasedOnPreference: string;
fullNameBasedOnPreference = value.property;
return fullNameBasedOnPreference;
}
If you need to refer to the code, here's the link: https://stackblitz.com/edit/angular-ivy-iphhv3?file=src/app/my-pipe.pipe.ts