-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
import: give type aliases of conditional types same treatment as thos…
…e with mapped types, see da701d2
- Loading branch information
1 parent
fbe142d
commit 28eaaad
Showing
82 changed files
with
679 additions
and
326 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
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,11 +1,11 @@ | ||
organization := "org.scalablytyped" | ||
name := "punchcard" | ||
version := "0.0-unknown-ae6eca" | ||
version := "0.0-unknown-591208" | ||
scalaVersion := "3.1.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-29cbd9") | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-7dfdbf") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
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
15 changes: 15 additions & 0 deletions
15
tests/punchcard/check-3/s/std/src/main/scala/typings/std/Extract.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,15 @@ | ||
package typings.std | ||
|
||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
/** NOTE: Conditional type definitions are impossible to translate to Scala. | ||
* See https://www.typescriptlang.org/docs/handbook/2/conditional-types.html for an intro. | ||
* You'll have to cast your way around this structure, unfortunately. | ||
* TS definition: {{{ | ||
T extends U ? T : never | ||
}}} | ||
*/ | ||
@js.native | ||
trait Extract[T, U] extends StObject |
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
6 changes: 3 additions & 3 deletions
6
tests/react-integration-test/check-japgolly-3/c/componentstest/build.sbt
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,13 +1,13 @@ | ||
organization := "org.scalablytyped" | ||
name := "componentstest" | ||
version := "0.0-unknown-192563" | ||
version := "0.0-unknown-c856ab" | ||
scalaVersion := "3.1.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.github.japgolly.scalajs-react" %%% "core" % "2.1.1", | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2", | ||
"org.scalablytyped" %%% "react" % "16.9.2-1a0f7f", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-57c945") | ||
"org.scalablytyped" %%% "react" % "16.9.2-89c3ae", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-f06d0f") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
6 changes: 3 additions & 3 deletions
6
tests/react-integration-test/check-japgolly-3/r/react-bootstrap/build.sbt
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,13 +1,13 @@ | ||
organization := "org.scalablytyped" | ||
name := "react-bootstrap" | ||
version := "0.32-917bae" | ||
version := "0.32-6eac56" | ||
scalaVersion := "3.1.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.github.japgolly.scalajs-react" %%% "core" % "2.1.1", | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2", | ||
"org.scalablytyped" %%% "react" % "16.9.2-1a0f7f", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-57c945") | ||
"org.scalablytyped" %%% "react" % "16.9.2-89c3ae", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-f06d0f") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
6 changes: 3 additions & 3 deletions
6
tests/react-integration-test/check-japgolly-3/r/react-contextmenu/build.sbt
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,13 +1,13 @@ | ||
organization := "org.scalablytyped" | ||
name := "react-contextmenu" | ||
version := "2.13.0-62c09e" | ||
version := "2.13.0-e70b6a" | ||
scalaVersion := "3.1.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.github.japgolly.scalajs-react" %%% "core" % "2.1.1", | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2", | ||
"org.scalablytyped" %%% "react" % "16.9.2-1a0f7f", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-57c945") | ||
"org.scalablytyped" %%% "react" % "16.9.2-89c3ae", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-f06d0f") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
6 changes: 3 additions & 3 deletions
6
tests/react-integration-test/check-japgolly-3/r/react-dropzone/build.sbt
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,13 +1,13 @@ | ||
organization := "org.scalablytyped" | ||
name := "react-dropzone" | ||
version := "10.1.10-3f6e87" | ||
version := "10.1.10-505392" | ||
scalaVersion := "3.1.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.github.japgolly.scalajs-react" %%% "core" % "2.1.1", | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2", | ||
"org.scalablytyped" %%% "react" % "16.9.2-1a0f7f", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-57c945") | ||
"org.scalablytyped" %%% "react" % "16.9.2-89c3ae", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-f06d0f") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
6 changes: 3 additions & 3 deletions
6
tests/react-integration-test/check-japgolly-3/r/react-markdown/build.sbt
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,13 +1,13 @@ | ||
organization := "org.scalablytyped" | ||
name := "react-markdown" | ||
version := "0.0-unknown-7ebfca" | ||
version := "0.0-unknown-a12fbc" | ||
scalaVersion := "3.1.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.github.japgolly.scalajs-react" %%% "core" % "2.1.1", | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2", | ||
"org.scalablytyped" %%% "react" % "16.9.2-1a0f7f", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-57c945") | ||
"org.scalablytyped" %%% "react" % "16.9.2-89c3ae", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-f06d0f") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
4 changes: 2 additions & 2 deletions
4
tests/react-integration-test/check-japgolly-3/r/react-native/build.sbt
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,12 +1,12 @@ | ||
organization := "org.scalablytyped" | ||
name := "react-native" | ||
version := "0.0-unknown-0fb830" | ||
version := "0.0-unknown-0c8e8e" | ||
scalaVersion := "3.1.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.github.japgolly.scalajs-react" %%% "core" % "2.1.1", | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-57c945") | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-f06d0f") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
6 changes: 3 additions & 3 deletions
6
tests/react-integration-test/check-japgolly-3/r/react-select/build.sbt
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,13 +1,13 @@ | ||
organization := "org.scalablytyped" | ||
name := "react-select" | ||
version := "0.0-unknown-f830c1" | ||
version := "0.0-unknown-685a3b" | ||
scalaVersion := "3.1.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.github.japgolly.scalajs-react" %%% "core" % "2.1.1", | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2", | ||
"org.scalablytyped" %%% "react" % "16.9.2-1a0f7f", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-57c945") | ||
"org.scalablytyped" %%% "react" % "16.9.2-89c3ae", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-f06d0f") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
4 changes: 2 additions & 2 deletions
4
tests/react-integration-test/check-japgolly-3/r/react/build.sbt
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,12 +1,12 @@ | ||
organization := "org.scalablytyped" | ||
name := "react" | ||
version := "16.9.2-1a0f7f" | ||
version := "16.9.2-89c3ae" | ||
scalaVersion := "3.1.2" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.github.japgolly.scalajs-react" %%% "core" % "2.1.1", | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2", | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-57c945") | ||
"org.scalablytyped" %%% "std" % "0.0-unknown-f06d0f") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
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
32 changes: 32 additions & 0 deletions
32
...st/check-japgolly-3/r/react/src/main/scala/typingsJapgolly/react/mod/ComponentProps.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,32 @@ | ||
package typingsJapgolly.react.mod | ||
|
||
import typingsJapgolly.react.reactStrings.a_ | ||
import typingsJapgolly.react.reactStrings.abbr | ||
import typingsJapgolly.react.reactStrings.address | ||
import typingsJapgolly.react.reactStrings.area | ||
import typingsJapgolly.react.reactStrings.article | ||
import typingsJapgolly.react.reactStrings.aside | ||
import typingsJapgolly.react.reactStrings.audio | ||
import typingsJapgolly.react.reactStrings.b | ||
import typingsJapgolly.react.reactStrings.base | ||
import typingsJapgolly.react.reactStrings.bdi | ||
import typingsJapgolly.react.reactStrings.bdo | ||
import typingsJapgolly.react.reactStrings.big | ||
import typingsJapgolly.react.reactStrings.view | ||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
/** | ||
* NOTE: prefer ComponentPropsWithRef, if the ref is forwarded, | ||
* or ComponentPropsWithoutRef when refs are not supported. | ||
*/ | ||
/** NOTE: Conditional type definitions are impossible to translate to Scala. | ||
* See https://www.typescriptlang.org/docs/handbook/2/conditional-types.html for an intro. | ||
* You'll have to cast your way around this structure, unfortunately. | ||
* TS definition: {{{ | ||
T extends react.react.JSXElementConstructor<infer P> ? P : T extends 'a' | 'abbr' | 'address' | 'area' | 'article' | 'aside' | 'audio' | 'b' | 'base' | 'bdi' | 'bdo' | 'big' | 'view' ? react.react.<global>.JSX.IntrinsicElements[T] : {} | ||
}}} | ||
*/ | ||
@js.native | ||
trait ComponentProps[T /* <: a_ | abbr | address | area | article | aside | audio | b | base | bdi | bdo | big | view | JSXElementConstructor[Any] */] extends StObject |
15 changes: 15 additions & 0 deletions
15
...k-japgolly-3/r/react/src/main/scala/typingsJapgolly/react/mod/ComponentPropsWithRef.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,15 @@ | ||
package typingsJapgolly.react.mod | ||
|
||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
/** NOTE: Conditional type definitions are impossible to translate to Scala. | ||
* See https://www.typescriptlang.org/docs/handbook/2/conditional-types.html for an intro. | ||
* You'll have to cast your way around this structure, unfortunately. | ||
* TS definition: {{{ | ||
T extends react.react.ComponentClass<infer P, react.react.ComponentState> ? react.react.PropsWithoutRef<P> & react.react.RefAttributes</ * import warning: transforms.QualifyReferences#resolveTypeRef many Couldn't qualify InstanceType<T> * / any> : react.react.PropsWithRef<react.react.ComponentProps<T>> | ||
}}} | ||
*/ | ||
@js.native | ||
trait ComponentPropsWithRef[T /* <: japgolly.scalajs.react.facade.React.ElementType */] extends StObject |
15 changes: 15 additions & 0 deletions
15
...-test/check-japgolly-3/r/react/src/main/scala/typingsJapgolly/react/mod/ContextType.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,15 @@ | ||
package typingsJapgolly.react.mod | ||
|
||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
/** NOTE: Conditional type definitions are impossible to translate to Scala. | ||
* See https://www.typescriptlang.org/docs/handbook/2/conditional-types.html for an intro. | ||
* You'll have to cast your way around this structure, unfortunately. | ||
* TS definition: {{{ | ||
C extends react.react.Context<infer T> ? T : never | ||
}}} | ||
*/ | ||
@js.native | ||
trait ContextType[C /* <: Context[Any] */] extends StObject |
19 changes: 19 additions & 0 deletions
19
...n-test/check-japgolly-3/r/react/src/main/scala/typingsJapgolly/react/mod/Defaultize.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,19 @@ | ||
package typingsJapgolly.react.mod | ||
|
||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
// Any prop that has a default prop becomes optional, but its type is unchanged | ||
// Undeclared default props are augmented into the resulting allowable attributes | ||
// If declared props have indexed properties, ignore default props entirely as keyof gets widened | ||
// Wrap in an outer-level conditional type to allow distribution over props that are unions | ||
/** NOTE: Conditional type definitions are impossible to translate to Scala. | ||
* See https://www.typescriptlang.org/docs/handbook/2/conditional-types.html for an intro. | ||
* You'll have to cast your way around this structure, unfortunately. | ||
* TS definition: {{{ | ||
P extends any ? string extends keyof P ? P : std.Pick<P, std.Exclude<keyof P, keyof D>> & std.Partial<std.Pick<P, / * import warning: transforms.QualifyReferences#resolveTypeRef many Couldn't qualify Extract<keyof P, keyof D> * / any>> & std.Partial<std.Pick<D, std.Exclude<keyof D, keyof P>>> : never | ||
}}} | ||
*/ | ||
@js.native | ||
trait Defaultize[P, D] extends StObject |
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
Oops, something went wrong.