ExpressFunction typedef

  1. @JS()
Application ExpressFunction ()

Creates a new instance of Express Application.

Usage:

ExpressFunction express = require('express');
Application app = express();
app.get('/', handler);

This definition exists as a workaround for an issue in JS interop which prevents declaring call methods on interop classes. For details see: https://github.com/dart-lang/sdk/issues/30969

In case the above issue gets resolved this type definition will be deprecated.

See also:

Implementation

@JS()
typedef Application ExpressFunction();