本文整理汇总了Scala中scala.scalajs.js.annotation.ScalaJSDefined类的典型用法代码示例。如果您正苦于以下问题:Scala ScalaJSDefined类的具体用法?Scala ScalaJSDefined怎么用?Scala ScalaJSDefined使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ScalaJSDefined类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Scala代码示例。
示例1: ConsumerGroupOptions
//设置package包名称以及导入依赖的类
package io.scalajs.npm.kafkanode
import io.scalajs.RawOptions
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
import scala.scalajs.js.|
@ScalaJSDefined
class ConsumerGroupOptions(var batch: js.UndefOr[String] = js.undefined,
var fromOffset: js.UndefOr[String] = js.undefined,
var host: js.UndefOr[String] = js.undefined,
var groupId: js.UndefOr[String] = js.undefined,
var outOfRangeOffset: js.UndefOr[String | js.Array[String]] = js.undefined,
var migrateHLC: js.UndefOr[Boolean] = js.undefined,
var migrateRolling: js.UndefOr[Boolean] = js.undefined,
var protocol: js.UndefOr[js.Array[String]] = js.undefined,
var sessionTimeout: js.UndefOr[Int] = js.undefined,
var ssl: js.UndefOr[Boolean] = js.undefined,
var zk: js.UndefOr[RawOptions] = js.undefined)
extends js.Object
示例2: GetAuthTokenOptions
//设置package包名称以及导入依赖的类
package slate
package chrome
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSName, ScalaJSDefined}
import scala.scalajs.js.{UndefOr, native, undefined}
@ScalaJSDefined
class GetAuthTokenOptions(val interactive: UndefOr[Boolean] = undefined,
val account: UndefOr[AccountInfo] = undefined,
val scopes: UndefOr[js.Array[String]] = undefined) extends js.Object
@ScalaJSDefined
class LaunchWebAuthFlowOptions(val url: String,
val interactive: UndefOr[Boolean] = undefined) extends js.Object
@ScalaJSDefined
class RemoveCachedAuthTokenOptions(val token: String) extends js.Object
@ScalaJSDefined
class AccountInfo(val id: String) extends js.Object
@native
@JSName("chrome.identity")
object ChromeIdentity extends js.Object {
@JSName("getAuthToken")
@native
def fetchAuthToken(details: UndefOr[GetAuthTokenOptions] = undefined,
callback: js.Function1[String, Unit]): Unit = native
@native
def launchWebAuthFlow(details: LaunchWebAuthFlowOptions,
callback: js.Function1[String, Unit]): Unit = native
@native
def removeCachedAuthToken(details: RemoveCachedAuthTokenOptions,
callback: js.Function1[Unit, Unit]): Unit = native
}
@ScalaJSDefined
class LastError(val message: UndefOr[String]) extends js.Object
@native
@JSName("chrome.runtime")
object ChromeRuntime extends js.Object {
@native
def lastError: UndefOr[LastError] = native
}
示例3: HttpConfig
//设置package包名称以及导入依赖的类
package io.scalajs.npm.angularjs.http
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
import scala.scalajs.js.|
@ScalaJSDefined
class HttpConfig(var method: js.UndefOr[String] = js.undefined,
var url: js.UndefOr[String] = js.undefined,
var params: js.UndefOr[js.Dictionary[js.Any]] = js.undefined,
var data: js.Any = js.undefined,
var headers: js.UndefOr[js.Dictionary[js.Any]] = js.undefined,
var xsrfHeaderName: js.UndefOr[String] = js.undefined,
var xsrfCookieName: js.UndefOr[String] = js.undefined,
var transformResponse: js.UndefOr[js.Array[js.Function]] = js.undefined,
// js.Function2[js.Any = js.undefined, js.Any, js.Any]
var transformRequest: js.UndefOr[js.Array[js.Function]] = js.undefined,
// js.Function2[js.Any, js.Any, js.Any]
var cache: js.Any = js.undefined,
var withCredentials: js.UndefOr[Boolean] = js.undefined,
var timeout: js.UndefOr[Int | Double] = js.undefined,
var responseType: js.UndefOr[String] = js.undefined)
extends js.Object
示例4: ConsumerOptions
//设置package包名称以及导入依赖的类
package io.scalajs.npm.kafkanode
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
@ScalaJSDefined
class ConsumerOptions(var groupId: js.UndefOr[String] = js.undefined,
var autoCommit: js.UndefOr[Boolean] = js.undefined,
var autoCommitIntervalMs: js.UndefOr[Int] = js.undefined,
var fetchMaxWaitMs: js.UndefOr[Int] = js.undefined,
var fetchMinBytes: js.UndefOr[Int] = js.undefined,
var fetchMaxBytes: js.UndefOr[Int] = js.undefined,
var fromOffset: js.UndefOr[Long] = js.undefined,
var encoding: js.UndefOr[String] = js.undefined)
extends js.Object
示例5: ModalOptions
//设置package包名称以及导入依赖的类
package io.scalajs.npm.angularjs.uibootstrap
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
@ScalaJSDefined
class ModalOptions(var template: js.UndefOr[String] = js.undefined,
var templateUrl: js.UndefOr[String] = js.undefined,
var controller: js.UndefOr[String] = js.undefined,
var controllerAs: js.Any = js.undefined,
var scope: js.Any = js.undefined,
var size: js.UndefOr[String] = "lg",
var windowClass: js.UndefOr[String] = js.undefined,
var windowTemplateUrl: js.UndefOr[String] = js.undefined,
var animation: js.UndefOr[Boolean] = js.undefined,
var backdrop: js.UndefOr[Boolean] = js.undefined,
var backdropClass: js.UndefOr[String] = js.undefined,
var keyboard: js.UndefOr[Boolean] = js.undefined,
var resolve: js.Any = js.undefined)
extends js.Object
示例6: MarkedOptions
//设置package包名称以及导入依赖的类
package com.karasiq.markedjs
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
import scala.scalajs.js.{Any, UndefOr}
@ScalaJSDefined
class MarkedOptions extends js.Object {
def apply(highlight: UndefOr[(String, UndefOr[String], js.Function) ? String] = js.undefined, renderer: MarkedRenderer = new MarkedRenderer(), gfm: Boolean = true, tables: Boolean = true, breaks: Boolean = false, pedantic: Boolean = false, sanitize: Boolean = false, smartLists: Boolean = true, smartypants: Boolean = false): MarkedOptions = {
val _highlight = highlight
val _renderer = renderer
val _gfm = gfm
val _tables = tables
val _breaks = breaks
val _pedantic = pedantic
val _sanitize = sanitize
val _smartLists = smartLists
val _smartypants = smartypants
new MarkedOptions {
override val highlight: Any = _highlight
override val renderer: MarkedRenderer = _renderer
override val gfm: Boolean = _gfm
override val tables: Boolean = _tables
override val breaks: Boolean = _breaks
override val pedantic: Boolean = _pedantic
override val sanitize: Boolean = _sanitize
override val smartLists: Boolean = _smartLists
override val smartypants: Boolean = _smartypants
}
}
}
示例7: PieChart
//设置package包名称以及导入依赖的类
package io.scalajs.npm.angularjs.nvd3.chart
import io.scalajs.npm.angularjs.nvd3.Legend
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
@ScalaJSDefined
class PieChart(val id: js.UndefOr[String] = js.undefined,
val width: js.UndefOr[Int] = js.undefined,
val height: js.UndefOr[Int] = js.undefined,
val donutRatio: js.UndefOr[Double] = js.undefined,
val donut: js.UndefOr[Boolean] = js.undefined,
val x: js.Function,
val y: js.Function,
val duration: js.UndefOr[Int] = js.undefined,
val labelThreshold: js.UndefOr[Double] = js.undefined,
val labelSunbeamLayout: js.UndefOr[Boolean] = js.undefined,
val showLegend: js.UndefOr[Boolean] = js.undefined,
val showLabels: js.UndefOr[Boolean] = js.undefined,
val legend: js.UndefOr[Legend] = js.undefined)
extends Chart {
override val `type` = "pieChart"
}
示例8: SunburstChart
//设置package包名称以及导入依赖的类
package io.scalajs.npm.angularjs.nvd3.chart
import io.scalajs.npm.angularjs.nvd3.Legend
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
@ScalaJSDefined
class SunburstChart(val id: js.UndefOr[String] = js.undefined,
val width: js.UndefOr[Int] = js.undefined,
val height: js.UndefOr[Int] = js.undefined,
val donutRatio: js.UndefOr[Double] = js.undefined,
val donut: js.UndefOr[Boolean] = js.undefined,
val x: js.Function,
val y: js.Function,
val duration: js.UndefOr[Int] = js.undefined,
val labelThreshold: js.UndefOr[Double] = js.undefined,
val labelSunbeamLayout: js.UndefOr[Boolean] = js.undefined,
val showLegend: js.UndefOr[Boolean] = js.undefined,
val showLabels: js.UndefOr[Boolean] = js.undefined,
val legend: js.UndefOr[Legend] = js.undefined)
extends Chart {
override def `type` = "sunburstChart"
}
示例9: LineChart
//设置package包名称以及导入依赖的类
package io.scalajs.npm.angularjs.nvd3.chart
import io.scalajs.npm.angularjs.nvd3._
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
@ScalaJSDefined
class LineChart(val id: js.UndefOr[String] = js.undefined,
val width: js.UndefOr[Int] = js.undefined,
val height: js.UndefOr[Int] = js.undefined,
val x: js.Function,
val y: js.Function,
val duration: js.UndefOr[Int] = js.undefined,
val labelSunbeamLayout: js.UndefOr[Boolean] = js.undefined,
val showLegend: js.UndefOr[Boolean] = js.undefined,
val showLabels: js.UndefOr[Boolean] = js.undefined,
val caption: js.UndefOr[Caption] = js.undefined,
val margin: js.UndefOr[Margin] = js.undefined,
val title: js.UndefOr[Title] = js.undefined,
val subtitle: js.UndefOr[Title] = js.undefined,
val useInteractiveGuideline: js.UndefOr[Boolean] = js.undefined,
val xAxis: js.UndefOr[AxisLabel] = js.undefined,
val yAxis: js.UndefOr[AxisLabel] = js.undefined)
extends Chart {
override val `type`: String = "lineChart"
}
示例10: apply
//设置package包名称以及导入依赖的类
package io.scalajs.npm.brake
import io.scalajs.RawOptions
import io.scalajs.nodejs.stream.{Readable, Writable}
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSImport, ScalaJSDefined}
import scala.scalajs.js.|
/**
* brake - throttle a stream with backpressure
* @see https://www.npmjs.com/package/brake
* @author [email protected]
*/
@js.native
trait Brake extends js.Object {
/**
* Return a transform stream b that applies backpressure when more data than the rate allows is written.
* @param rate the throttle rate
* @param options the throttle options
* @return a [[Readable]] / [[Writable]] instance
*/
def apply(rate: Double, options: ThrottleOptions | RawOptions = js.native): Readable with Writable = js.native
}
/**
* Brake Singleton
* @author [email protected]
*/
@js.native
@JSImport("brake", JSImport.Namespace)
object Brake extends Brake
/**
* Throttle Options
* @param rate How many bytes to emit for each interval of length period
* @param period How often to check the output length in milliseconds. Default value: 1000.
*/
@ScalaJSDefined
class ThrottleOptions(var rate: js.UndefOr[Double] = js.undefined,
var period: js.UndefOr[Int] = js.undefined) extends js.Object
示例11: createToken
//设置package包名称以及导入依赖的类
package com.outr.stripe.pii
import com.outr.stripe.TokenError
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
@js.native
trait StripePII extends js.Object {
def createToken(info: StripePIIInfo, responseHandler: js.Function2[Int, PIITokenInfo, Unit]): Unit = js.native
}
@ScalaJSDefined
trait StripePIIInfo extends js.Object {
var personal_id_number: js.UndefOr[String] = js.undefined
}
@js.native
trait PIITokenInfo extends js.Object {
def id: String = js.native
def created: Long = js.native
def livemode: Boolean = js.native
def `type`: String = js.native
def `object`: String = js.native
def used: Boolean = js.native
def error: TokenError = js.native
}
示例12:
//设置package包名称以及导入依赖的类
package com.outr.stripe.card
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
@ScalaJSDefined
trait StripeCardInfo extends js.Object {
var name: js.UndefOr[String] = js.undefined
var number: js.UndefOr[String] = js.undefined
var cvc: js.UndefOr[String] = js.undefined
var exp_month: js.UndefOr[Int] = js.undefined
var exp_year: js.UndefOr[Int] = js.undefined
var address_line1: js.UndefOr[String] = js.undefined
var address_line2: js.UndefOr[String] = js.undefined
var address_city: js.UndefOr[String] = js.undefined
var address_state: js.UndefOr[String] = js.undefined
var address_zip: js.UndefOr[String] = js.undefined
var address_country: js.UndefOr[String] = js.undefined
}
示例13: StaticOptions
//设置package包名称以及导入依赖的类
package io.scalajs.npm.express
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
@ScalaJSDefined
class StaticOptions(var dotfiles: js.UndefOr[String] = js.undefined,
var etag: js.UndefOr[Boolean] = js.undefined,
var extensions: js.UndefOr[Boolean] = js.undefined,
var fallthrough: js.UndefOr[Boolean] = js.undefined,
var index: js.UndefOr[js.Any] = js.undefined,
var lastModified: js.UndefOr[Boolean] = js.undefined,
var maxAge: js.UndefOr[Double] = js.undefined,
var redirect: js.UndefOr[Boolean] = js.undefined,
var setHeaders: js.UndefOr[js.Function] = js.undefined)
extends js.Object
示例14: CookieOptions
//设置package包名称以及导入依赖的类
package io.scalajs.npm.express
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
@ScalaJSDefined
class CookieOptions(var domain: js.UndefOr[String] = js.undefined,
var encode: js.UndefOr[js.Function] = js.undefined,
var expires: js.UndefOr[js.Date] = js.undefined,
var httpOnly: js.UndefOr[Boolean] = js.undefined,
var maxAge: js.UndefOr[String] = js.undefined,
var path: js.UndefOr[String] = js.undefined,
var secure: js.UndefOr[Boolean] = js.undefined,
var signed: js.UndefOr[Boolean] = js.undefined)
extends js.Object
示例15: CssNumberOptions
//设置package包名称以及导入依赖的类
package io.scalajs.jquery
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
@ScalaJSDefined
class CssNumberOptions(var zIndex: String = null,
var fontWeight: String = null,
var opacity: String = null,
var zoom: String = null,
var lineHeight: String = null,
var widows: String = null,
var orphans: String = null,
var fillOpacity: String = null,
var columnCount: String = null,
var order: String = null,
var flexGrow: String = null,
var flexShrink: String = null)
extends js.Object