We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 557bb59 commit eea6c97Copy full SHA for eea6c97
es6-promise/es6-promise-tests.ts
@@ -160,3 +160,32 @@ getJSON('story.json').then(function(story: Story) {
160
}).then(function() {
161
(<HTMLElement>document.querySelector('.spinner')).style.display = 'none';
162
});
163
+
164
+interface T1 {
165
+ __t1: string;
166
+}
167
168
+interface T2 {
169
+ __t2: string;
170
171
172
+interface T3 {
173
+ __t3: string;
174
175
176
+function f1(): Promise<T1> {
177
+ return Promise.resolve({ __t1: "foo_t1" });
178
179
180
+function f2(x: T1): T2 {
181
+ return { __t2: x.__t1 + ":foo_21" };
182
183
184
+var x3 = f1()
185
+ .then(f2, (e: Error) => {
186
+ console.log("error 1");
187
+ throw e;
188
+})
189
+ .then((x: T2) => {
190
+ return { __t3: x.__t2 + "bar" };
191
+});
0 commit comments