I have the following file structure:
+ src
| test.ts
| z_module.d.ts
tsconfig.json
test.ts
// does nothing?
/// <reference path="./z_module.d.ts" />
// can't now write:
var a: zzrm.zzrmObject;
// have to use:
import * as zzrm from 'zzrm';
var a: zzrm.zzrmObject;
z_module.d.ts
declare module "zzrm" {
export interface zzrmObject {id: string}
}
I have tried to reduce the problem but may well have reduced it incorrectly. The problem originally came from trying to use sequelize-auto-ts. Downloading the repo, upgrading the sequelize.d.ts and opening in Visual Studio Code (version 0.10.6) immediately highlights this line with the error "Cannot find namespace 'sequelize'."
var Sequelize:sequelize.SequelizeStatic = require('sequelize');
^^^^^^^^^
Even though sequelize.d.ts is successfully reference at the top of the file with: /// <reference path="../../typings/sequelize/sequelize.d.ts" />