I am trying to create a definition file for the Vogels library. This library wraps the AWS SDK, so it also includes a property that exports the entire AWS SDK.
declare module "vogels" {
import AWS = require('aws-sdk');
export function define(modelName: String, config: any): void;
export var AWS: AWS; /* THIS LINE DOESN'T TRANSPILE */
}
This library is used like this:
import vogels = require('vogels');
vogels.AWS.config.update({region: region});
var model = vogels.define('test', {
..
}
});
Unfortunately, exporting the AWS property from the "vogels" module doesn't work, because AWS is not considered a type. How can I export the AWS property without replicating the entire AWS definitions in my module?