Can we automate the process of generating Typescript classes from VB.net server-side classes?

Currently, I am developing a web application project where the server language is VB.net and the frontend is built using Angular (typescript). One issue I have been facing is that every time a class model is created in VB.net, the same class needs to be manually replicated in front end typescript. Is there a way we can automate this process and generate the typescript for the frontend automatically?

I did attempt using typegen, however, it seems to only work with C# at the moment.

Answer №1

I am the brains behind TypeGen, and after seeing some chatter in the comments section of the original post about TypeGen, I realized that my reputation is not high enough to join the discussion there. So here I am, posting an answer instead.

TypeGen functions by delving into assemblies and utilizing Reflection to gather data on the types, ultimately converting them into TypeScript.

The reason why it is labeled as a "C# to TypeScript" generator (as opposed to ".NET to TypeScript") is because it has solely been put through its paces with C#. While it may be possible to generate TypeScript from .NET assemblies developed with VB.NET using TypeGen, I can't guarantee it will work flawlessly since I haven't tested it thoroughly in that scenario.

I trust this sheds some light on the matter.

Warm regards, Jacek

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The value in the Controller is being cleared each time an Ajax call is made

Within my controller, the method responsible for returning the View also takes care of initializing a few values for certain class-level properties: private string igc = String.Empty; private string igcCode = String.Empty; private bool isSuggested = false ...

An error has occurred in Angular2 and Ionic 2, where there is a TypeError preventing the reading of the property 'addEventListener' in the InAppBrowser

When attempting to open a remote address in my app using the Cordova plugin InAppBrowser, I encountered an issue with the following code: import { Injectable } from "@angular/core"; import { HttpQueryService } from "./httpqueryservice"; import { ToastCo ...

Crafting redirect rules in React that avoid redirecting to the same route

In my project, there is a file named AuthenticatedRoute.tsx, which serves as a template for all the protected/authenticated routes in my Router.tsx file. export default ({ component: C, authUser: A, path: P, exact: E }: { component, authUser, path, ex ...

What is the best way to stop a TextBox from adjusting the scrollbar and text position when adding text to it?

Whenever text that exceeds the width of a TextBox is written, the scrollbar automatically moves with the added text. However, I want the scrollbar to always be positioned at the far left (beginning of the line). I would like it fixed in place or have the o ...

Trouble with HTTP post response handling in Angular 8

I'm attempting to download the server response content as a CSV file, but I've encountered two errors in the process. Here is the method I am using: generateCsv(exportModel: any) { let headers={}; return this.http.post<any>(Report ...

Tips for storing data in a database with DotNetNuke version 6.0

I currently have a custom registration form in DotNetNuke 6.0, but I'm facing an issue where the submitted values are not being saved into the database. I would appreciate some guidance on how to properly save these values into the database. Thank you ...

Access an object within the ngOnInit lifecycle hook

Is there a way to access an object from the ngOnInit function and use it outside the class in the same component? Let me explain: I am implementing an Angular Material table and want to dynamically populate it with data retrieved from Firebase. ngOnIn ...

Monitoring the advancement of an Angular 2 service call

It has been mentioned to me that we utilize services to communicate with the database or other data storage systems. During the query execution, I am interested in displaying a progress bar on the user interface. What is the best way to monitor and track ...

Dynamically load a custom element with a Component

I am attempting to dynamically inject a component into a container. Component: @Component({...}) export class InvestmentProcess{ @ViewChild('container') container; constructor(public dcl: DynamicComponentLoader) {} loadComponent(fo ...

Converting JSON data into what format?

I'm faced with the task of deserializing JSON data, but I'm hesitant to create a class with specific property names. Here is a snippet of the JSON data: "[{"id":1,"width":100,"sortable":true}, {"id":"Change","width":100,"sortable":true}]" Any ...

Navigating a hierarchy of parent and child elements

I'm currently developing a game that allows players to target specific limbs on each mob, such as the head or legs. Here is the constructor I have for creating humanoid characters: public Humanoid(Race race, Gender gender, string firstname, string l ...

Angular 6: Addressing the 'ExpressionChangedAfterItHasBeenCheckedError' in dynamic form validation with reactive form by adding and removing elements

When utilizing Angular 6 Reactive Form and dynamically adding and removing new validators, an error occurs: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'disabled: false'. Current ...

Updating the page dynamically in React/Redux by making API calls based on user submissions

My current task involves calling an API with Redux, triggering the call based on a form submission. If the query is empty, it should return all lists; otherwise, it should only return lists that match the query. // List.tsx import React, { useEffect, useS ...

Unable to sign out user from the server side using Next.js and Supabase

Is there a way to log out a user on the server side using Supabase as the authentication provider? I initially thought that simply calling this function would work: export const getServerSideProps: GetServerSideProps = withPageAuth({ redirectTo: &apos ...

Guide on utilizing CanActivateFn in Angular 16 through constructor-based injection techniques

How do I utilize the latest CanActivateFn feature in Angular 16 with Dependency Injection? The new version of Angular 16 now uses a function instead of a class for the canActivate functionality. Below is my implementation. How can I incorporate my depende ...

When the button onClick event is not functioning as expected in NextJS with TypeScript

After creating a login page with a button to sign in and hit an API, I encountered an issue where clicking the button does not trigger any action. I have checked the console log and no errors or responses are showing up. Could there be a mistake in my code ...

What is the process of defining a callback function in Typescript?

Here is a function that I am working with: .add({a: 1, b: 2}, function (msg, reply) { reply({z: msg.z}) }) I attempted something like this: interface SenecaMethods { add: (pattern: object, CALLBACK NEEDS TO BE INSERTED HERE) => object; } ...

The Radix UI Theme's dark mode isn't taking effect

I'm having trouble getting the dark mode to work properly in my Radix UI app. Despite setting appearance="dark", nested components like Box and Card remain light. Interestingly, other props such as accent color seem to be working fine. It&a ...

Navigating between browser sessions

I am facing a challenge with my Selenium tests where I need to activate different browser windows that are running in parallel. How can I simulate a user click on the taskbar to make a specific window active? By default, the first instance of Selenium&apo ...

On iOS, the backdrop cannot be used to dismiss ion-loading manually

When using Ionic v7 with Angular, I encountered an issue with the backdropDismiss property of the LoadingController. Interestingly, this problem only occurs on iOS and not on Android or in the browser. The LoadingController is injected into a service and u ...