profile
viewpoint

issue commentmicrosoft/TypeScript

What do you not like about the TypeScript Website and Documentation?

[Provide project setup documentation for Linters]

[As part of setting up a project, include how to setup with a Linter, most likely just typescript-eslint which the project is supposed to be using itself.]

Tags: [linter]

orta

comment created time in 18 days

issue commentaspnet/EntityFramework6

Cannot Add-Migration after moving configuration to use Microsoft.Extensions.Configuration (appsettings.json)

I actually ended up making this work with the new json files using some code.

Jojoshua

comment created time in 20 days

issue commentolifolkerd/tabulator

TypeScript typings

Thanks @angeliski for letting us know the solution!

andreivanea

comment created time in 2 months

pull request commentDefinitelyTyped/DefinitelyTyped

tabulator-tables: add export statement

@hados99 @minyoung You guys might try the solution here https://github.com/olifolkerd/tabulator/issues/86#issuecomment-491462834

Basically add tabulator-types to your types section and then require tabulator like so... const Tabulator = require('tabulator-tables');

This solved the issue in a vue project that was similar to yours.

"types": [ "webpack-env", "jest", "tabulator-tables" ],

hados99

comment created time in 2 months

issue commentolifolkerd/tabulator

TypeScript typings

@angeliski if you try to use the :Tabulator type inside your main.ts file it should work because that is a typescript file. I don't know how it works in .vue files.

andreivanea

comment created time in 2 months

issue commentolifolkerd/tabulator

TypeScript typings

Thanks @angeliski so what did you change to stop the error?

andreivanea

comment created time in 2 months

issue commentaspnet/EntityFramework6

Cannot Add-Migration after moving configuration to use Microsoft.Extensions.Configuration (appsettings.json)

Found out if I change the type to MOVIES.Data this now works. I'm not sure if this an issue with package manager console (I have MOVIES.Data selected as the default project when adding the migration), entity framework, configuration extensions, or my project setup. I would prefer to keep the AppSettingsJsonConfigurationBuilder code inside the MOVIES project. Any ideas?

 <configBuilders>
    <builders>
      <add name="AppSettingsJsonConfigurationBuilder" type="MOVIES.AppSettingsJsonConfigurationBuilder, MOVIES.Data" />
    </builders>
  </configBuilders>
Jojoshua

comment created time in 2 months

issue commentaspnet/EntityFramework6

Cannot Add-Migration after moving configuration to use Microsoft.Extensions.Configuration (appsettings.json)

The main difference is toggling the connection strings. Using xml works and the configBuilder does not.

<!--<connectionStrings configSource="WebConfig\connectionStrings.xml" />--> <connectionStrings configBuilders="AppSettingsJsonConfigurationBuilder"/>

Jojoshua

comment created time in 2 months

issue openedaspnet/EntityFramework6

Cannot Add-Migration after moving configuration to use Microsoft.Extensions.Configuration (appsettings.json)

Describe what is not working as expected.

If you are seeing an exception, include the full exceptions details (message and stack trace).

Exception message:
Stack trace:
System.TypeInitializationException: The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception. ---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Could not load file or assembly 'MOVIES' or one of its dependencies. The system cannot find the file specified. (C:\Users\UID\Downloads\movies\movies\MOVIES\tmpEB8.tmp line 72) ---> System.IO.FileNotFoundException: Could not load file or assembly 'MOVIES' or one of its dependencies. The system cannot find the file specified.
   at System.Configuration.TypeUtil.GetTypeImpl(String typeString, Boolean throwOnError)
   at System.Configuration.ConfigurationBuildersSection.InstantiateBuilder(ProviderSettings ps)
   at System.Configuration.ConfigurationBuildersSection.GetBuilderFromName(String builderName)
   at System.Configuration.BaseConfigurationRecord.GetConfigBuilderFromName(String builderName)
   at System.Configuration.BaseConfigurationRecord.GetSectionXmlReader(String[] keys, SectionInput input)
   --- End of inner exception stack trace ---
   at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
   at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
   at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
   at System.Configuration.ConfigurationManager.GetSection(String sectionName)
   at System.Configuration.ConfigurationManager.get_ConnectionStrings()
   at System.Data.Entity.Internal.AppConfig..ctor()
   at System.Data.Entity.Internal.AppConfig..cctor()
   --- End of inner exception stack trace ---
   at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.EnsureLoadedForAssembly(Assembly assemblyHint, Type contextTypeHint)
   at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.EnsureLoadedForContext(Type contextType)
   at System.Data.Entity.Migrations.DbMigrationsConfiguration`1..cctor()
   --- End of inner exception stack trace ---
   at System.Data.Entity.Migrations.DbMigrationsConfiguration`1..ctor()
   at MOVIES.Data.Migrations.Configuration..ctor() in C:\Users\UID\Downloads\movies\movies\MOVIES.Data\Migrations\Configuration.cs:line 12
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Data.Entity.Migrations.Utilities.MigrationsConfigurationFinder.FindMigrationsConfiguration(Type contextType, String configurationTypeName, Func`2 noType, Func`3 multipleTypes, Func`3 noTypeWithName, Func`3 multipleTypesWithName)
   at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.FindConfiguration()
   at System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldRunner.RunCore()
   at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception.

Steps to reproduce

I have an ASP.NET MVC 5 application and was using the standard appsettings in the web.config. However, I just moved my configuration to use Microsoft.Extensions.Configuration and followed this article to do so. My code is similar. https://dasmulli.blog/2018/01/21/use-appsettings-json-and-environment-overrides-in-classic-asp-net-apps/

This works as expected in my application ...until I tried to do an Add-Migration. Above is the error. I have my main ASP.NET in project called MOVIES and a MOVIES.Data project as my DAL and is where my migrations sit.

The relevant items in web.config are below. As soon as I revert back to using the xml settings, I don't get the error.

<configuration>
	<configSections>
		<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />		
    <section name="configBuilders" type="System.Configuration.ConfigurationBuildersSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" restartOnExternalChanges="false" requirePermission="false" />
  <configBuilders>
    <builders>
      <add name="AppSettingsJsonConfigurationBuilder" type="PWM.AppSettingsJsonConfigurationBuilder, PWM" />
    </builders>
  </configBuilders>
  
	<!--<appSettings configSource="WebConfig\appSettings.xml" />-->
  <appSettings configBuilders="AppSettingsJsonConfigurationBuilder" />

  <connectionStrings configBuilders="AppSettingsJsonConfigurationBuilder">
    <clear/>
  </connectionStrings>

Further technical details

EF version: 6.2.0 Database Provider: EntityFramework.SqlServer Operating system: Windows 10 IDE: Visual Studio 2017 15.8.8

created time in 2 months

issue commentolifolkerd/tabulator

TypeScript typings

@angeliski I'm glad you figured it out. I am curious about the explanation but the link you provided didn't take me to a specific explanation. Can you try again?

andreivanea

comment created time in 2 months

issue commentolifolkerd/tabulator

TypeScript typings

"typeRoots": ["node_modules/@types"]

andreivanea

comment created time in 2 months

issue commentolifolkerd/tabulator

TypeScript typings

@angeliski i can't look now but check out my repo. It doesn't look like you have @types setup in your tsconfig

andreivanea

comment created time in 2 months

issue commentolifolkerd/tabulator

TypeScript typings

@angeliski I don't have experience with vue. Why are you explicitly declaring it as a module? Have you tried removing that module declaration altogether?

andreivanea

comment created time in 2 months

push eventJojoshua/TypedTabulator

Jojoshua

commit sha f6844197058762bfe26010452cf9e5c317480830

Init

view details

push time in 2 months

issue commentolifolkerd/tabulator

TypeScript typings

Hey @Jojoshua

Sorry for the delay in getting back to you on this one, Ive had a crazy busy couple of months.

Im preparing the 4.3 release so would love to put togeather some docs on how to use the typings.

Would you be able to put togeather a few paragraphs i could use on a TypeScript Typings doc page?

Cheers

Oli :)

Hey @olifolkerd , for TypeScript users they should download the definition from @types/tabulator-tables and that's pretty much it.

I have created a sample repository for reference here https://github.com/Jojoshua/TypedTabulator . You should be able to test the bounds of the definitions using this sample project.

andreivanea

comment created time in 2 months

issue commentolifolkerd/tabulator

TypeScript typings

Hey @angeliski what was the issue you were having?

andreivanea

comment created time in 2 months

push eventJojoshua/TypedTabulator

Jojoshua

commit sha 7ea120d1d25ce412f1b70161be2448822c21b22e

Init

view details

Jojoshua

commit sha 364479502c70c3d3e5a4c886cdee5be971169cc2

Merge branch 'master' of https://github.com/Jojoshua/TypedTabulator

view details

push time in 2 months

create barnchJojoshua/TypedTabulator

branch : master

created branch time in 2 months

created repositoryJojoshua/TypedTabulator

created time in 2 months

issue commenttinymce/tinymce

Build Customizer Out of Date (using 4.9.2 instead of 5.0.0)

I noticed the build customizer was titled for v4. Any idea when this will be compatible for v5?

Jojoshua

comment created time in 2 months

startedopenaudible/openaudible

started time in 3 months

startedknyzorg/pluralsight-scraper

started time in 3 months

pull request commentDefinitelyTyped/DefinitelyTyped

tabulator-tables: add export statement

I can't see adding this because it breaks existing users. The issue you are having isn't well defined. Maybe someone from the TS team can help.

hados99

comment created time in 3 months

Pull request review commentDefinitelyTyped/DefinitelyTyped

[FIX] Updated some type declaration for tabulator-tables

 declare class Tabulator {     browserSlow: boolean;     modules: any;     options: Tabulator.Options;+    element: any;

I gotcha now. I'm good with it.

simusr2

comment created time in 3 months

pull request commentDefinitelyTyped/DefinitelyTyped

tabulator-tables: add export statement

Are you trying to create a new instance of Tabulator? Try to use it like the tests do. I looked at one of the index.d.ts definitions you were using from jest and it doesn't have an export default in it either.

hados99

comment created time in 3 months

pull request commentDefinitelyTyped/DefinitelyTyped

tabulator-tables: add export statement

What does your tsconfig look like? You should have it recognize @types using "typeRoots": ["node_modules/@types"],

hados99

comment created time in 3 months

Pull request review commentDefinitelyTyped/DefinitelyTyped

[FIX] Updated some type declaration for tabulator-tables

 declare namespace Tabulator {         /**  Setting this option to true will cause Tabulator to create a list of page size options, that are multiples of the current page size. In the example below, the list will have the values of 5, 10, 15 and 20.      When using the page size selector like this, if you use the setPageSize function to set the page size to a value not in the list, the list will be regenerated using the new page size as the starting valuer	*/-        paginationSizeSelector?: true | number[];+        paginationSizeSelector?: true | false | number[];

The docs don't say anything about setting this to false. It is default false and redundant to set.

http://tabulator.info/docs/4.2/release#page

simusr2

comment created time in 3 months

Pull request review commentDefinitelyTyped/DefinitelyTyped

[FIX] Updated some type declaration for tabulator-tables

 colDef.formatterParams = {     huge: true }; // Custom Formatter-colDef.formatter = (cell: Tabulator.CellComponent, formatterParams: {}, onRendered) => {+colDef.formatter = (cell: Tabulator.CellComponent, formatterParams: {}, onRendered: Tabulator.EmptyCallback) => {

Typescript already infers this as Tabulator.EmptyCallback.

simusr2

comment created time in 3 months

Pull request review commentDefinitelyTyped/DefinitelyTyped

[FIX] Updated some type declaration for tabulator-tables

 You can pass an optional additional property with sorter, sorterParams that shou     type CustomAccessorParams = {} | ((value: any, data: any, type: "data" | "download" | "clipboard", column?: ColumnComponent) => any);     type ColumnCalc = "avg" | "max" | "min" | "sum" | "concat" | "count" | ((values: any[], data: any[], calcParams: {}) => number);     type ColumnCalcParams = (values: any, data: any) => any;-    type Formatter = "plaintext" | "textarea" | "html" | "money" | "image" | "datetime" | "datetimediff" | "link" | "tickCross" | "color" | "star" | "traffic" | "progress" | "lookup" | "buttonTick" | "buttonCross" | "rownum" | "handle" | ((cell: CellComponent, formatterParams: {}, onRendered: EmptyCallback) => string | HTMLElement);+    type Formatter = ((cell: CellComponent, formatterParams: {}, onRendered: EmptyCallback) => string) | string | "plaintext" | "textarea" | "html" | "money" | "image" | "datetime" | "datetimediff" | "link" | "tickCross" | "color" | "star" | "traffic" | "progress" | "lookup" | "buttonTick" | "buttonCross" | "rownum" | "handle" | ((cell: CellComponent, formatterParams: {}, onRendered: EmptyCallback) => string | HTMLElement);

The custom formatter at the end handles the one you copied on the front. The custom formatter should return either a string or html element per the docs.

http://tabulator.info/docs/4.2/format#format-builtin

Also, I don't see where you can add a plain string as a Formatter option. This negates the type benefits as well. I would undo this one too.

simusr2

comment created time in 3 months

Pull request review commentDefinitelyTyped/DefinitelyTyped

[FIX] Updated some type declaration for tabulator-tables

 declare class Tabulator {     browserSlow: boolean;     modules: any;     options: Tabulator.Options;+    element: any;

element is not part of the Tabulator class. It is a parameter that can be passed in but not saved to this

var Tabulator = function(element, options){

simusr2

comment created time in 3 months

Pull request review commentDefinitelyTyped/DefinitelyTyped

[FIX] Updated some type declaration for tabulator-tables

 declare namespace Tabulator {     interface ColumnDefinition extends ColumnLayout, CellCallbacks {         // Layout         /** sets the text alignment for this column */-        align?: "left" | "center" | "right"; // Align?+        align?: "left" | "center" | "right" | string; // Align?

Documentation only states left,center,right. http://tabulator.info/docs/4.2/columns#definition

simusr2

comment created time in 3 months

more