mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 07:19:22 +00:00
small fixes
This commit is contained in:
parent
04afb5e563
commit
9cb1e4f99c
@ -22,7 +22,7 @@ Content
|
|||||||
- [Optional parameters](#optional-parameters)
|
- [Optional parameters](#optional-parameters)
|
||||||
- [Bridging to external JavaScript elements](#bridging-to-external-javascript-elements)
|
- [Bridging to external JavaScript elements](#bridging-to-external-javascript-elements)
|
||||||
- [Ambient declarations](#ambient-declarations)
|
- [Ambient declarations](#ambient-declarations)
|
||||||
- [Definitions (`def.*` packages)](#definitions-def.-packages)
|
- [Definitions](#definitions)
|
||||||
- [Mixins](#mixins)
|
- [Mixins](#mixins)
|
||||||
- [Auxiliary types](#auxiliary-types)
|
- [Auxiliary types](#auxiliary-types)
|
||||||
- [Functional types](#functional-types)
|
- [Functional types](#functional-types)
|
||||||
@ -538,7 +538,7 @@ class Store {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that ambient classes constructors cannot have a body. Also, ambient classes methods must be `abstract` or `native`. For instance:
|
Note that ambient classes constructors must have an empty body. Also, ambient classes methods must be `abstract` or `native`. For instance:
|
||||||
|
|
||||||
``` java
|
``` java
|
||||||
@Ambient
|
@Ambient
|
||||||
@ -547,7 +547,7 @@ class MyExternalJavaScriptClass {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Definitions (`def.*` packages)
|
### Definitions
|
||||||
|
|
||||||
By convention, putting the classes in a `def.libname` package defines a set of definitions for the `libname` external JavaScript library called `libname`. Definitions are by default all ambient declarations and do not need to be annotated with `@jsweet.lang.Ambient` annotations since they are implicit in `def.*` packages and sub-packages. Note that this mechanism is similar to the TypeScript `d.ts` definition files.
|
By convention, putting the classes in a `def.libname` package defines a set of definitions for the `libname` external JavaScript library called `libname`. Definitions are by default all ambient declarations and do not need to be annotated with `@jsweet.lang.Ambient` annotations since they are implicit in `def.*` packages and sub-packages. Note that this mechanism is similar to the TypeScript `d.ts` definition files.
|
||||||
|
|
||||||
@ -617,7 +617,7 @@ The JSweet transpiler automatically adds the `.jsweet/candies/processed` directo
|
|||||||
|
|
||||||
For example, with Eclipse (similar configuration can be made with other IDEs):
|
For example, with Eclipse (similar configuration can be made with other IDEs):
|
||||||
|
|
||||||
1. Right-click on the project \(>\) Build path \(>\) Configure build path... \(>\) Libraries (tab) \(>\) Add class folder (button). Then choose the `.jsweet/candies/processed` directory.
|
1. Right-click on the project >Build path >Configure build path... >Libraries (tab) >Add class folder (button). Then choose the `.jsweet/candies/processed` directory.
|
||||||
|
|
||||||
2. In the “order and export” tab of the build path dialog, make sure that the `.jsweet/candies/processed` directory appears at the top of the list (or at least before the Maven dependencies).
|
2. In the “order and export” tab of the build path dialog, make sure that the `.jsweet/candies/processed` directory appears at the top of the list (or at least before the Maven dependencies).
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\title{JSweet Language Specifications\\{\large Version 1.0.0}}
|
\title{JSweet Language Specifications\\{\large Version 1.1.0}}
|
||||||
\author{%
|
\author{%
|
||||||
Renaud Pawlak\\
|
Renaud Pawlak\\
|
||||||
{\normalsize renaud.pawlak@jsweet.org}\\
|
{\normalsize renaud.pawlak@jsweet.org}\\
|
||||||
@ -556,7 +556,7 @@ class Store {
|
|||||||
}
|
}
|
||||||
\end{lstlisting}
|
\end{lstlisting}
|
||||||
|
|
||||||
Note that ambient classes constructors cannot have a body. Also, ambient classes methods must be \texttt{abstract} or \texttt{native}. For instance:
|
Note that ambient classes constructors must have an empty body. Also, ambient classes methods must be \texttt{abstract} or \texttt{native}. For instance:
|
||||||
|
|
||||||
\begin{lstlisting}[language=Java]
|
\begin{lstlisting}[language=Java]
|
||||||
@Ambient
|
@Ambient
|
||||||
@ -565,7 +565,7 @@ class MyExternalJavaScriptClass {
|
|||||||
}
|
}
|
||||||
\end{lstlisting}
|
\end{lstlisting}
|
||||||
|
|
||||||
\section{Definitions (\texttt{def.*} packages)}
|
\section{Definitions}
|
||||||
|
|
||||||
By convention, putting the classes in a \texttt{def.libname} package defines a set of definitions for the \texttt{libname} external JavaScript library called \texttt{libname}. Definitions are by default all ambient declarations and do not need to be annotated with \texttt{@jsweet.lang.Ambient} annotations since they are implicit in \texttt{def.*} packages and sub-packages. Note that this mechanism is similar to the TypeScript \texttt{d.ts} definition files.
|
By convention, putting the classes in a \texttt{def.libname} package defines a set of definitions for the \texttt{libname} external JavaScript library called \texttt{libname}. Definitions are by default all ambient declarations and do not need to be annotated with \texttt{@jsweet.lang.Ambient} annotations since they are implicit in \texttt{def.*} packages and sub-packages. Note that this mechanism is similar to the TypeScript \texttt{d.ts} definition files.
|
||||||
|
|
||||||
@ -636,7 +636,7 @@ The JSweet transpiler automatically adds the \texttt{.jsweet/candies/processed}
|
|||||||
For example, with Eclipse (similar configuration can be made with other IDEs):
|
For example, with Eclipse (similar configuration can be made with other IDEs):
|
||||||
|
|
||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\item Right-click on the project $>$ Build path $>$ Configure build path... $>$ Libraries (tab) $>$ Add class folder (button). Then choose the \texttt{.jsweet/candies/processed} directory.
|
\item Right-click on the project \textgreater Build path \textgreater Configure build path... \textgreater Libraries (tab) \textgreater Add class folder (button). Then choose the \texttt{.jsweet/candies/processed} directory.
|
||||||
\item In the "order and export" tab of the build path dialog, make sure that the \texttt{.jsweet/candies/processed} directory appears at the top of the list (or at least before the Maven dependencies).
|
\item In the "order and export" tab of the build path dialog, make sure that the \texttt{.jsweet/candies/processed} directory appears at the top of the list (or at least before the Maven dependencies).
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user