Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
10
rated 0 times [  13] [ 3]  / answers: 1 / hits: 5704  / 4 Years ago, sun, may 10, 2020, 12:00:00

I am working on code that is a mixture of JS and TS, using TypeScript 3.8. I wrote the following line:



export * as Easing from './easing';


Which should be fair game in TypeScript 3.8. However, I am compiling using Webpack, and I am not using ts-loader, only babel-loader with the TypeScript preset, and it seems like Babel does not support this syntax. I'm getting this error:




ERROR in ./src/index.ts
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /home/laptou/projects/my-project/src/index.ts: Unexpected export specifier type
30 | default as Clock, addUpdateListener, after, chain, clock, infinite, tween
31 | } from './clock';
32 | export * as Easing from './easing';
| ^^^^^^^^^^^
33 | export type { Tween, TweenOptions, TweenStatus } from './tween';
34 | export { default as InterpolateTween } from './tween/interpolate'



How can I fix this?


More From » typescript

 Answers
7

I've asked this question before here: namespace export from index.js



import * as Easing from './easing';
export { Easing }

[#3857] Friday, May 8, 2020, 4 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jocelynkarsynr

Total Points: 472
Total Questions: 98
Total Answers: 96

Location: Macau
Member since Mon, Nov 16, 2020
4 Years ago
jocelynkarsynr questions
Tue, Feb 8, 22, 00:00, 2 Years ago
Sat, Jul 11, 20, 00:00, 4 Years ago
Sat, Jan 18, 20, 00:00, 4 Years ago
Thu, Mar 14, 19, 00:00, 5 Years ago
;