-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #293 from 0x53A/static-props
handle static properties
- Loading branch information
Showing
6 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
export module StaticTests { | ||
|
||
/** this class should contain 4 properties - 2 static ones, 2 instance ones. */ | ||
class PropertiesClass { | ||
static staticProperty: number; | ||
instanceProperty: number; | ||
|
||
/** these should NOT be emitted */ | ||
private static privateStaticProperty: number; | ||
/** these should NOT be emitted */ | ||
private privateInstanceProperty: number; | ||
|
||
public static publicStaticProperty: number; | ||
public publicInstanceProperty: number; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// ts2fable 0.0.0 | ||
module rec #292-static-props | ||
open System | ||
open Fable.Core | ||
open Fable.Import.JS | ||
|
||
let [<Import("StaticTests","test")>] staticTests: StaticTests.IExports = jsNative | ||
|
||
module StaticTests = | ||
|
||
type [<AllowNullLiteral>] IExports = | ||
abstract PropertiesClass: PropertiesClassStatic | ||
|
||
/// this class should contain 4 properties - 2 static ones, 2 instance ones. | ||
type [<AllowNullLiteral>] PropertiesClass = | ||
abstract instanceProperty: float with get, set | ||
abstract publicInstanceProperty: float with get, set | ||
|
||
/// this class should contain 4 properties - 2 static ones, 2 instance ones. | ||
type [<AllowNullLiteral>] PropertiesClassStatic = | ||
[<Emit "new $0($1...)">] abstract Create: unit -> PropertiesClass | ||
abstract staticProperty: float with get, set | ||
abstract publicStaticProperty: float with get, set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters