Issue 1:
I'm not sure if this issue belongs in this repository since it spans across a few different tools, but I'm grateful for any insights I can get here.

I have a project set up to use Typescript 1.5.3 transpiling to AMD modules which are loaded via RequireJS. I'd like use SystemJS instead, but there's one small issue I can't seem to get around. When using the es6 import syntax:

import * as $ from 'jquery';

I get the behavior I expect; that is, the global jQuery function is assigned to the variable $. However, using this same syntax with a SystemJS setup, I get a plain object with the static jQuery functions and properties, not a callable funciton. If I use the default import syntax:

import $ from jquery;

I then see the expected behavior with SystemJS. I'm not actually sure which behavior is technically correct, but I'm fine with this change. However, the problem that I'm left with (and why I'm asking here) is that the definition file for jQuery does not provide the export default declaration. If I add the following to the definition:

declare module 'jquery' {
export = JQueryStatic;
export default JQueryStatic;
}

I get the error: error TS2309: An export assignment cannot be used in a module with other exported elements. This error is choking my build system when processing typescript files independently, so I'm thinking if I can resolve this error, I can move forward with SystemJS as the module loader.

So my question is, what is the best way to fix this problem? I'd also appreciate an explanation of why that declaration is invalid and which module loader is behaving correctly and why.

Issue 2:
I am using @types/sinon-chai 2.7.27.

When i do the npm start i am getting following errors,

[default] D:\node_modules@types\sinon\index.d.ts:19:19

Duplicate identifier 'Sinon'.

[default] D:\node_modules@types\sinon\index.d.ts💯21

A parameter initializer is only allowed in a function or constructor

entation.

[default] D:\node_modules@types\sinon\index.d.ts💯29

Cannot find name 'keyof'.

[default] D:\node_modules@types\sinon\index.d.ts💯35

'=' expected.

[default] D:\node_modules@types\sinon\index.d.ts:156:21

A parameter initializer is only allowed in a function or constructor

entation.

[default] D:\WBM_repo\wbm\node_modules@types\sinon\index.d.ts:156:29

Cannot find name 'keyof'.

[default] D:\node_modules@types\sinon\index.d.ts:156:35

'=' expected.

[default] D:\node_modules@types\sinon\index.d.ts:157:21

A parameter initializer is only allowed in a function or constructor

entation.

[default] D:\node_modules@types\sinon\index.d.ts:157:29

Cannot find name 'keyof'.

[default] D:\node_modules@types\sinon\index.d.ts:157:35

'=' expected.

[default] D:\node_modules@types\sinon\index.d.ts:548:9

A computed property name must be of type 'string', 'number', 'symbol'

any'.

[default] D:\node_modules@types\sinon\index.d.ts:548:10

Cannot find name 'P'.

[default] D:\node_modules@types\sinon\index.d.ts:548:15

Cannot find name 'keyof'.

[default] D:\node_modules@types\sinon\index.d.ts:548:21

']' expected.

[default] D:\node_modules@types\sinon\index.d.ts:548:21

Cannot find name 'TType'.

[default] D:\node_modules@types\sinon\index.d.ts:548:26

';' expected.

[default] D:\node_modules@types\sinon\index.d.ts:548:27

Declaration or statement expected.

[default] D:\node_modules@types\sinon\index.d.ts:548:29

Cannot find name 'SinonStub'.

[default] D:\node_modules@types\sinon\index.d.ts:550:1

Declaration or statement expected.

[default] D:\node_modules@types\sinon\index.d.ts:552:15

Duplicate identifier 'Sinon'.

[default] Checking finished with 20 errors

Any help on how can i resolve above issues?