F
definePlatform
Selects the Platform handler for the host platform, so an addon branches on the platform in one place.
function definePlatform<Handler>(handlers: PlatformHandlers<Handler>): HandlerParameters
| Name | Type | Description |
|---|---|---|
| handlers | PlatformHandlers<Handler> | The handler for each platform the addon runs on. |
Returns
HandlerThe host platform's handler.