[Pas2js] dts2pas cannot handle plain interfaces
    Ng Pheng Siong 
    ngps at objectmemetic.com
       
    Mon Nov  7 10:00:41 CET 2022
    
    
  
Hi Michael and all,
I've used dts2pas to create a Pascal unit for OnsenUI. It seems dts2pas
currently does not support 'plain' interfaces. Line 1237 of onsenui.d.ts declares
following:
  interface OnsListElement extends HTMLElement {
    <stuff>
  }
Then, from line 1283 onwards:
  interface OnsOptions {
    parentScope?: Object;
  }
  interface AlertOptions {
    <stuff>
  }
In the output generated by dts2pas, class TOnsListItemElement exists, corresponding to
the line 1237 declaration mentioned above, but the 'plain' interfaces OnsOptions and so on 
aren't generated. The Pascal source fails to compile:
  Pas2JS Compiler version 2.3.1 [2022/10/05] for Linux x86_64
  Copyright (c) 2022 Free Pascal team.
  units/onsenui.pas(14,14) Error: Forward type not resolved "TOnsOptions"
  Fatal: Compilation aborted
OnsenUI is v2.12.6, installed by npm. pas2js is this version:
  commit 426000efcd3ddeb3b3dc0649cb30f9e3aa82b9c3 (HEAD -> main, origin/main, origin/HEAD)
  Author: Michaël Van Canneyt <michael at freepascal.org>
  Date:   Tue Oct 4 09:41:27 2022 +0200
  
      * Reinstate check for non-empty text content
Is this expected to work? Should I raise an issue in Gitlab?
Pheng
    
    
More information about the Pas2js
mailing list