Custom plugin is not recognizing in ionic 5 project

I have custom plugin and we added the plugin to ionic5 project with following steps:

cordova plugin add custom-plugin

then:
we are calling the interface of custom-plugin in homepage.ts with following syntax-
window[‘plugins’][‘customPlugin’]

here customPlugin is not recognising.

Is there anything that needs to be done for adding custom plugin to project?

Appreciate the help!