refactor(platform-browser): specify return type of parseEventName (#38089)
This commit refactors the argument of the `parseEventName` function to use an object with named properties instead of using an object indexer. PR Close #38089
This commit is contained in:
parent
5d3ba8dec7
commit
174aac68f7
|
@ -111,7 +111,7 @@ export class KeyEventsPlugin extends EventManagerPlugin {
|
|||
});
|
||||
}
|
||||
|
||||
static parseEventName(eventName: string): {[key: string]: string}|null {
|
||||
static parseEventName(eventName: string): {fullKey: string, domEventName: string}|null {
|
||||
const parts: string[] = eventName.toLowerCase().split('.');
|
||||
|
||||
const domEventName = parts.shift();
|
||||
|
@ -136,10 +136,7 @@ export class KeyEventsPlugin extends EventManagerPlugin {
|
|||
return null;
|
||||
}
|
||||
|
||||
const result: {[k: string]: string} = {};
|
||||
result['domEventName'] = domEventName;
|
||||
result['fullKey'] = fullKey;
|
||||
return result;
|
||||
return {domEventName, fullKey};
|
||||
}
|
||||
|
||||
static getEventFullKey(event: KeyboardEvent): string {
|
||||
|
|
Loading…
Reference in New Issue