install the npm in my angular application and
And put this code
import * as iconvLite from 'iconv-lite';
import { deEncapsulateSync } from 'rtf-stream-parser';
ERROR in node_modules/rtf-stream-parser/dist/src/de-encapsulate.d.ts(90,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/rtf-stream-parser/dist/src/de-encapsulate.d.ts(91,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/rtf-stream-parser/dist/src/de-encapsulate.d.ts(92,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/rtf-stream-parser/dist/src/de-encapsulate.d.ts(93,9): error TS1086: An accessor cannot be declared in an ambient context.
install the npm in my angular application and And put this code import * as iconvLite from 'iconv-lite'; import { deEncapsulateSync } from 'rtf-stream-parser';
const rtf = '{\rtf1\ansi\ansicpg1252\fromtext{{{{{{hello}}}}}}}'; const result = deEncapsulateSync(rtf, { decode: iconvLite.decode }); console.log(result); // { mode: 'text', text: 'hello' }
it give below error
ERROR in node_modules/rtf-stream-parser/dist/src/de-encapsulate.d.ts(90,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/rtf-stream-parser/dist/src/de-encapsulate.d.ts(91,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/rtf-stream-parser/dist/src/de-encapsulate.d.ts(92,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/rtf-stream-parser/dist/src/de-encapsulate.d.ts(93,9): error TS1086: An accessor cannot be declared in an ambient context.