-
Notifications
You must be signed in to change notification settings - Fork 45
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 #163 from ScalablyTyped/split-hierarchies
Hack to support libraries with split lib/es directories
- Loading branch information
Showing
23 changed files
with
275 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
organization := "org.scalablytyped" | ||
name := "antd" | ||
version := "4.3.1-f3593d" | ||
scalaVersion := "2.13.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.1.0") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-g:notailcalls", "-language:implicitConversions", "-language:higherKinds", "-language:existentials") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) | ||
bintrayRepository := "ScalablyTyped" | ||
resolvers += Resolver.bintrayRepo("oyvindberg", "ScalablyTyped") |
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 @@ | ||
sbt.version=1.3.10 |
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,2 @@ | ||
addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "1.1.0") | ||
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") |
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,16 @@ | ||
|
||
# Scala.js typings for antd | ||
|
||
Typings are for version 4.3.1 | ||
|
||
|
||
|
||
## Note | ||
This library has been generated from typescript code from first party type definitions. | ||
|
||
Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) | ||
|
||
## Usage | ||
See [the main readme](../../readme.md) for instructions. | ||
|
||
|
16 changes: 16 additions & 0 deletions
16
tests/antd/check/a/antd/src/main/resources/NPM_DEPENDENCIES
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,16 @@ | ||
{ | ||
"compile-dependencies" : [ | ||
{ | ||
"antd" : "4.3.1" | ||
} | ||
], | ||
"test-dependencies" : [ | ||
{ | ||
"antd" : "4.3.1" | ||
} | ||
], | ||
"compile-devDependencies" : [ | ||
], | ||
"test-devDependencies" : [ | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/antd/check/a/antd/src/main/scala/typings/antd/antdRequire.scala
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,12 @@ | ||
package typings.antd | ||
|
||
import scala.scalajs.js | ||
import scala.scalajs.js.`|` | ||
import scala.scalajs.js.annotation._ | ||
|
||
/* This can be used to `require` the library as a side effect. | ||
If it is a global library this will make scalajs-bundler include it */ | ||
@JSImport("antd", JSImport.Namespace) | ||
@js.native | ||
object antdRequire extends js.Object | ||
|
42 changes: 42 additions & 0 deletions
42
tests/antd/check/a/antd/src/main/scala/typings/antd/mod/FormProps.scala
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,42 @@ | ||
package typings.antd.mod | ||
|
||
import scala.scalajs.js | ||
import scala.scalajs.js.`|` | ||
import scala.scalajs.js.annotation._ | ||
|
||
/* Inlined parent std.Omit<rc-field-form.rc-field-form/es/Form.FormProps, 'form'> */ | ||
@js.native | ||
trait FormProps extends js.Object { | ||
var name: js.UndefOr[String] = js.native | ||
var prefixCls: js.UndefOr[String] = js.native | ||
} | ||
|
||
object FormProps { | ||
@scala.inline | ||
def apply(): FormProps = { | ||
val __obj = js.Dynamic.literal() | ||
__obj.asInstanceOf[FormProps] | ||
} | ||
@scala.inline | ||
implicit class FormPropsOps[Self <: FormProps] (val x: Self) extends AnyVal { | ||
@scala.inline | ||
def duplicate: Self = (js.Dynamic.global.Object.assign(js.Dynamic.literal(), x)).asInstanceOf[Self] | ||
@scala.inline | ||
def combineWith[Other <: js.Any](other: Other): Self with Other = (js.Dynamic.global.Object.assign(js.Dynamic.literal(), x, other.asInstanceOf[js.Any])).asInstanceOf[Self with Other] | ||
@scala.inline | ||
def set(key: String, value: js.Any): Self = { | ||
x.asInstanceOf[js.Dynamic].updateDynamic(key)(value) | ||
x | ||
} | ||
@scala.inline | ||
def setName(value: String): Self = this.set("name", value.asInstanceOf[js.Any]) | ||
@scala.inline | ||
def deleteName: Self = this.set("name", js.undefined) | ||
@scala.inline | ||
def setPrefixCls(value: String): Self = this.set("prefixCls", value.asInstanceOf[js.Any]) | ||
@scala.inline | ||
def deletePrefixCls: Self = this.set("prefixCls", js.undefined) | ||
} | ||
|
||
} | ||
|
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,12 @@ | ||
organization := "org.scalablytyped" | ||
name := "rc-field-form" | ||
version := "1.4.4-5a0521" | ||
scalaVersion := "2.13.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.1.0") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-g:notailcalls", "-language:implicitConversions", "-language:higherKinds", "-language:existentials") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) | ||
bintrayRepository := "ScalablyTyped" | ||
resolvers += Resolver.bintrayRepo("oyvindberg", "ScalablyTyped") |
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 @@ | ||
sbt.version=1.3.10 |
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,2 @@ | ||
addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "1.1.0") | ||
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") |
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,16 @@ | ||
|
||
# Scala.js typings for rc-field-form | ||
|
||
Typings are for version 1.4.4 | ||
|
||
|
||
|
||
## Note | ||
This library has been generated from typescript code from first party type definitions. | ||
|
||
Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) | ||
|
||
## Usage | ||
See [the main readme](../../readme.md) for instructions. | ||
|
||
|
16 changes: 16 additions & 0 deletions
16
tests/antd/check/r/rc-field-form/src/main/resources/NPM_DEPENDENCIES
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,16 @@ | ||
{ | ||
"compile-dependencies" : [ | ||
{ | ||
"rc-field-form" : "1.4.4" | ||
} | ||
], | ||
"test-dependencies" : [ | ||
{ | ||
"rc-field-form" : "1.4.4" | ||
} | ||
], | ||
"compile-devDependencies" : [ | ||
], | ||
"test-devDependencies" : [ | ||
] | ||
} |
36 changes: 36 additions & 0 deletions
36
tests/antd/check/r/rc-field-form/src/main/scala/typings/rcFieldForm/mod/FormProps.scala
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,36 @@ | ||
package typings.rcFieldForm.mod | ||
|
||
import scala.scalajs.js | ||
import scala.scalajs.js.`|` | ||
import scala.scalajs.js.annotation._ | ||
|
||
@js.native | ||
trait FormProps extends js.Object { | ||
var name: js.UndefOr[String] = js.native | ||
} | ||
|
||
object FormProps { | ||
@scala.inline | ||
def apply(): FormProps = { | ||
val __obj = js.Dynamic.literal() | ||
__obj.asInstanceOf[FormProps] | ||
} | ||
@scala.inline | ||
implicit class FormPropsOps[Self <: FormProps] (val x: Self) extends AnyVal { | ||
@scala.inline | ||
def duplicate: Self = (js.Dynamic.global.Object.assign(js.Dynamic.literal(), x)).asInstanceOf[Self] | ||
@scala.inline | ||
def combineWith[Other <: js.Any](other: Other): Self with Other = (js.Dynamic.global.Object.assign(js.Dynamic.literal(), x, other.asInstanceOf[js.Any])).asInstanceOf[Self with Other] | ||
@scala.inline | ||
def set(key: String, value: js.Any): Self = { | ||
x.asInstanceOf[js.Dynamic].updateDynamic(key)(value) | ||
x | ||
} | ||
@scala.inline | ||
def setName(value: String): Self = this.set("name", value.asInstanceOf[js.Any]) | ||
@scala.inline | ||
def deleteName: Self = this.set("name", js.undefined) | ||
} | ||
|
||
} | ||
|
12 changes: 12 additions & 0 deletions
12
tests/antd/check/r/rc-field-form/src/main/scala/typings/rcFieldForm/rcFieldFormRequire.scala
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,12 @@ | ||
package typings.rcFieldForm | ||
|
||
import scala.scalajs.js | ||
import scala.scalajs.js.`|` | ||
import scala.scalajs.js.annotation._ | ||
|
||
/* This can be used to `require` the library as a side effect. | ||
If it is a global library this will make scalajs-bundler include it */ | ||
@JSImport("rc-field-form", JSImport.Namespace) | ||
@js.native | ||
object rcFieldFormRequire extends js.Object | ||
|
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,5 @@ | ||
import { FormProps as RcFormProps } from 'rc-field-form/lib/Form'; | ||
|
||
export interface FormProps extends Omit<RcFormProps, 'form'> { | ||
prefixCls?: string; | ||
} |
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 @@ | ||
{ | ||
"name": "antd", | ||
"version": "4.3.1", | ||
"description": "An enterprise-class UI design language and React components implementation", | ||
"files": [ | ||
"dist", | ||
"lib", | ||
"es" | ||
], | ||
"main": "lib/index.js", | ||
"module": "es/index.js", | ||
"unpkg": "dist/antd.min.js", | ||
"typings": "lib/index.d.ts", | ||
"title": "Ant Design", | ||
"dependencies": { | ||
"rc-field-form": "^1.4.4" | ||
} | ||
} |
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,3 @@ | ||
export interface FormProps { | ||
name?: string; | ||
} |
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 @@ | ||
import { FormProps } from './Form'; |
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,15 @@ | ||
{ | ||
"name": "rc-field-form", | ||
"version": "1.4.4", | ||
"description": "React Form Component", | ||
"typings": "es/index.d.ts", | ||
"files": [ | ||
"lib", | ||
"es", | ||
"dist", | ||
"assets/*.css" | ||
], | ||
"license": "MIT", | ||
"main": "./lib/index", | ||
"module": "./es/index" | ||
} |
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 @@ | ||
/// <reference no-default-lib="true"/> | ||
|
||
/** | ||
* From T, pick a set of properties whose keys are in the union K | ||
*/ | ||
type Pick<T, K extends keyof T> = { | ||
[P in K]: T[P]; | ||
}; | ||
|
||
/** | ||
* Exclude from T those types that are assignable to U | ||
*/ | ||
type Exclude<T, U> = T extends U ? never : T; | ||
|
||
/** | ||
* Construct a type with the properties of T except for those in type K. | ||
*/ | ||
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>; |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/// <reference no-default-lib="true"/> | ||
|
||
type Partial<T> = T; | ||
interface Array<T> {} | ||
interface ArrayLike<T> {} | ||
interface ArrayLike<T> {} |