Kenneth Pouncey
ca6725b21a
Update test cases to pass with current generation.
2018-10-29 11:06:00 +01:00
Kenneth Pouncey
81f980795b
Fix tests so they now pass after recent generation modifications.
2018-04-27 07:27:29 +02:00
Kenneth Pouncey
7e14f3c8c9
Add support for Literal Type parms
2018-03-20 07:27:52 +01:00
Kenneth Pouncey
8966f427fb
Add support for default namespace and usings output.
2018-03-19 14:10:16 +01:00
Kenneth Pouncey
cf754d07cb
Add support for TypeQuery nodes.
...
- Add partial support for Map nodes.
- Update external dependencies.
2018-03-19 10:08:12 +01:00
Kenneth Pouncey
3b711cf11c
Add support for DOMEventHandler code generation.
...
- Fix access modifiers of generated class methods, properties and indexers
- Properties identified as starting with "on" and property type of FunctionTypeNode with two parameters are emitted as DOMEventHandlers
- Method parameters of type `EventListenerOrEventListenerObject` are emitted as DOMEventHandlers
- CallSignatures do not throw an error but needs work.
- Add tests
2018-03-07 16:52:44 +01:00
Kenneth Pouncey
d5b3cbb044
Fix emitted code of class constructor.
...
- Fix misplaced semicolon
2018-03-04 07:32:48 +01:00
Kenneth Pouncey
0cb1896a60
Add support for multiple Heritage of interfaces to class generation.
...
- Add tests
2018-03-02 17:22:37 +01:00
Kenneth Pouncey
dc33bb5e18
Add support for indexer into class generation.
...
- Add tests
2018-03-01 16:05:36 +01:00
Kenneth Pouncey
57151ec33e
Add support to generate class implementation from defined interface.
...
- Supports inherited properties and methods from the interface specified on the `prototype` definition of the TypeLiteralNode.
- Add tests for the added support.
- Update package dependencies.
2018-03-01 10:08:50 +01:00
Kenneth Pouncey
45628ac75a
Small code cleanup so ts-linter passes on tests and unused code.
2018-02-28 11:17:59 +01:00
Kenneth Pouncey
d49245c391
Add support to output simple interface declarations with properties and methods.
...
- The body of the properties and methods all throw NotImplemented exceptions right now.
- Fix problem with parsing comments.
2018-02-28 11:12:55 +01:00
Kenneth Pouncey
a9014e4d2d
Add support for constructor parameter definitions.
...
- Fix class constructor to include empty body implementation.
- Fix access modifier of interfaces to be public by default.
- Add command line option to specify the interface access modifier from the command line. --interfaceAccessModifier - Default interface access identifier.
- Fix tests cases that did not include a constructor body.
2018-02-26 14:01:48 +01:00
Kenneth Pouncey
d460b87bf5
Add command line parameter --noEmitComments
...
- Add test with comments to make sure code emitted handles parsing comments correctly
- Add test for command line switch --noEmitComments to make sure code emitted handles parsing commented code correctly but not emitting the comments.
2018-02-26 10:59:19 +01:00
Kenneth Pouncey
c86fec89b5
Add simple declaration of interface to C# class support.
...
- Supports only simple constructors for now. Will be expanded.
- Add tests
- Update external dependency versions.
- Add error diagnostics
- Add command line option: --emitAllInterfaces - Emit C# class implementations for all Interfaces and not just those declared.
- Fix some tests that were not passing the ts-linter rules.
2018-02-26 10:19:36 +01:00
Kenneth Pouncey
d297d01b06
Fix indexer parameter case change.
...
- The indexer parameter case should be controlled by the --noCaseChangeParameters command line option.
2018-02-22 10:41:21 +01:00
Kenneth Pouncey
b79b5a58f4
Add `null` or `undefined` documenation for methods with nullable parms.
...
- Add a few test cases.
2018-02-21 16:21:52 +01:00
Kenneth Pouncey
2a9886a98e
Add null or undefined section for methods that return nullable types.
...
- Add tests
- Add Generics document with mapping link
2018-02-20 10:50:35 +01:00
Kenneth Pouncey
94b535e5d7
Add diagnostics tests section.
2018-02-20 09:09:21 +01:00
Kenneth Pouncey
d6008871ac
Rename generic test cases to be more descriptive of contents.
2018-02-20 07:46:02 +01:00
Kenneth Pouncey
89e156fc5d
Add support for generic interface with type default.
...
- Add diagnostic errors and warnings fields in Diagnostics class
- Generic type defaults are not supported in C# and will generate a warning.
- Add test.
2018-02-20 07:38:11 +01:00
Kenneth Pouncey
6da78b0acc
Add support for extend generic type reference.
...
```
interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
length: number;
selectedIndex: number;
add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void;
remove(index: number): void;
}
interface HTMLCollectionOf<T extends Element> extends HTMLCollection {
item(index: number): T;
namedItem(name: string): T;
[index: number]: T;
}
```
```
interface HTMLOptionsCollection : HTMLCollectionOf<HTMLOptionElement> {
[Export("length")]
double length { get; set; }
[Export("selectedIndex")]
double selectedIndex { get; set; }
[Export("add")]
void add(object element, object before);
[Export("remove")]
void remove(double index);
}
interface HTMLCollectionOf<T> : HTMLCollection where T : Element {
[Export("item")]
T item(double index);
[Export("namedItem")]
T namedItem(string name);
T this[double index] { get; set; }
}
```
2018-02-19 14:34:55 +01:00
Kenneth Pouncey
75fa363d31
Add support for Generic Interface definition.
...
- Support constraints on generic
- Add tests
2018-02-19 11:05:33 +01:00
Kenneth Pouncey
d857a59ac6
Add support for `never` type. Emits `void`.
...
- Update BasicTypes doc to include Void and Never
- Add Test for `never`
- Update docs for Array<elemType> which is not supported right now.
2018-02-16 11:13:06 +01:00
Kenneth Pouncey
5b82ee21b6
Add support for Rest Parameter definitions.
...
- Update docs.
- Add multiple tests
- Add new RestParameters.md document
2018-02-15 17:07:54 +01:00
Kenneth Pouncey
12d6ab7ba4
Add new Generate Options --noPrefixInterface and --interfacePrefix.
...
This is a precursor to generating Class Definitions from `declare var` statements.
Default right now is to prefix all interface definitions with the letter "I" unless --noPrefixInterface is specified.
2018-02-15 10:36:55 +01:00
Kenneth Pouncey
f7907e1c24
Add array tests and BasicType elemType[] documentation
2018-02-14 10:03:20 +01:00
Kenneth Pouncey
4de4a02f0e
Add new line to correspond to tslint rules
2018-02-14 06:15:46 +01:00
Kenneth Pouncey
bae18827d5
Add Number BasicTypes mapping to docs
...
- Add more test cases
2018-02-12 11:47:41 +01:00
Kenneth Pouncey
d8014be74e
Add Boolean BasicTypes mapping to docs
...
- Add more test cases
2018-02-12 10:57:00 +01:00
Kenneth Pouncey
23833cabb0
Add tests for Methods that return arrays.
...
- any[]
- any[] | null
- number[]
- number[] | null
- string[]
- string[] | null
- reference object[]
- reference object[] | null
2018-02-12 09:33:31 +01:00
Kenneth Pouncey
1007044d21
Add new tests for Methods that return Array types
...
- Remove Export attribute for interfaces.
2018-02-12 09:08:20 +01:00
Kenneth Pouncey
04c0c76985
Add Export attribute to all method definitions.
...
This is a future use marker to keep original information.
Fix error for not wrapping the exported name.
2018-02-12 07:31:22 +01:00
Kenneth Pouncey
296352de0a
Add Export attribute to all property definitions.
...
This is a future use marker to keep original information.
2018-02-12 06:31:55 +01:00
Kenneth Pouncey
dbd030e396
Add Export attribute to all interface definitions.
...
This is a future use marker to keep original information.
2018-02-12 06:18:19 +01:00
Kenneth Pouncey
33d76f5b95
Initial Import
2018-02-10 08:48:16 +01:00