Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
81 views

unknown is so annoying to work with when using strict Typescript. I understand not being allowed to assign a type unknown to a known type, but you are able to assign known types to unknown. So why ...
Dao Seeker's user avatar
0 votes
0 answers
12 views

My Dispatcher-servlet.xml cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-registry' getting this error I am new to Java and spring ...
Panchakshari RS's user avatar
1 vote
1 answer
66 views

I discovered a subtle but significant issue with xUnit and Moq's Strict behavior that can lead to false-positive test results. Here's the scenario: Test Setup Using Moq with MockBehavior.Strict ...
SvenskaBarnet's user avatar
0 votes
1 answer
106 views

After installing V12.4, I get several errors when trying to create new content-elements, files or other elements. I installed Typo3 from the CLI with the command composer create “typo3/cms-base-...
Gert Romkes's user avatar
0 votes
0 answers
61 views

I'm currently refactoring a codebase to support TypeScript's strict mode. However, I've ran into an issue with functions that leverage generics. In essence, I have a function that takes an object with ...
CristianHG's user avatar
0 votes
1 answer
494 views

I'm using React tanstackQuery axios I read that function caller is deprecated since ES5(not sure ES5). So I can't use it in strict mode. I don't think disabling strict mode is good idea. Is there ...
seungseung's user avatar
0 votes
1 answer
172 views

There's no error raised when calling save(), create(), or insert().execute() on a model instantiated with one or more fields omitted, even on fields configured as null=False and default=None (the ...
Magnus Lind Oxlund's user avatar
2 votes
1 answer
117 views

In our app we have a common base module that enables strict, warnings and some other pragmas for every file that it used from. It also enables signatures and disables the warning about signatures ...
Daniel Böhmer's user avatar
-3 votes
3 answers
392 views

Given: if ($var) is a loose comparison as in if ($var == true) strict comparison will be if ($var === true) should also bool return type function be explicitly enforced? es: if (isset($var) === true) ...
apedic's user avatar
  • 155
1 vote
1 answer
49 views

I am facing an issue with TypeScript's strictNullChecks setting. I have a function handleAction which expects an argument of type MyType. type MyType = { prop: MyEnum; // ... other properties }; ...
Puukallistaja's user avatar
0 votes
1 answer
204 views

Below is a simple ANTLR grammar: grammar EXAMPLE; document : Name+ EOF ; Name : 'k'+ ; The generated antlr parser accepts any string that contains substring 'k'. However, I ...
Bachir Bendrissou's user avatar
2 votes
0 answers
55 views

per 3v4l: https://3v4l.org/qeU8s , In every version of PHP between 7.0.0 and 8.2.9, why is this code <?php declare(strict_types=1); $arr = ["1"]; $filtered = array_filter($arr, function (...
hanshenrik's user avatar
  • 22.4k
0 votes
1 answer
50 views

Why can't I pass the URL string to "get" in a variable? #use strict; use warnings; use LWP::Simple; my $hxUrl; my $Page; $hxUrl="https://finance.yahoo.com/quote/SPY/history?period1=...
user1067305's user avatar
  • 3,561
0 votes
1 answer
74 views

Edit: We want to use strict alongside more compiler flags Original: For some background info, we are trying to cleanup our huge internal angular system, some of the choices we made were to setup ...
Francois Venter's user avatar
0 votes
1 answer
380 views

first of all im new in react and i've read the documentation, the rules of hooks. https://reactjs.org/docs/hooks-rules.html#explanation I know the component es mounted and unmounted with the ...
Zim92's user avatar
  • 21
0 votes
0 answers
480 views

Compiling Script files using npm start, getting errors: use strict: not found Syntax error: "(" unexpected or Syntax error: word unexpected (expecting ")") Here is my code, index....
guhiAni's user avatar
0 votes
2 answers
1k views

I am currently converting our application to strictTemplates, and we are comming up with a huge amount of errors, some of them are more relevant than others. So i wanted to configure the strictness of ...
Paul Weber's user avatar
  • 6,733
0 votes
1 answer
52 views

I've activated strict mode in my APP, and I find a strange thing: when I create a new adapter for my recycler view, the system logs a [StrictMode policy violation; ~duration=352 ms: android.os....
Paolino L Angeletti's user avatar
1 vote
0 answers
41 views

I am trying to learn React by doing. Somehow, I am missing something very silly here. I have 2 calendars in my code. And I have used console logging to debug, as can be seen in the code. import React, ...
NutsAndBolts's user avatar
0 votes
1 answer
83 views

Consider the following code: type Props = 'foo' | 'bar'; type ParRec = Partial<Record<Props, string>>; function doSomething (item: ParRec) { const props: Props[] = ['foo', 'bar']; ...
Neil S's user avatar
  • 2,304
2 votes
1 answer
6k views

I'd like to be able to pepper an app with a custom log function when debugging, profiling or just familiarizing myself with the code, using arguments.callee.name so I don't have to type the enclosing ...
Chema's user avatar
  • 753
1 vote
1 answer
755 views

I have a simple typing error detected with cli flag --strict $ ./node_modules/.bin/tsc --strict main.ts main.ts:6:5 - error TS2322: Type 'null' is not assignable to type 'Person'. 6 return null; ...
OrenIshShalom's user avatar
0 votes
1 answer
190 views

The strictNullChecks: true in the tsconfig.json! Is it allowed to use a not null assertion operator if we are sure the object is not null and undefined? In the following example, where the type ...
L. Kvri's user avatar
  • 1,752
2 votes
1 answer
3k views

To enable strict mode in JavaScript it's needed to insert 'use strict' to a script. If I have several scripts, I need to add it to all. Maybe it can be added only once in settings? Not found any ...
thegreatdeveloper's user avatar
1 vote
1 answer
2k views

I'm try to install Mediawiki on local host, and working with Lua. I try to export one page from Wikipedia, for example: https://en.wikipedia.org/wiki/Maize, and re-import it into the local system. ...
Truong Xuan Viet's user avatar
0 votes
0 answers
98 views

I just wonder what's the best practice here. I noticed that React strict mode calls a state setter twice, so if I have e.g. setArray(function(arr){ arr.push(arr.length); return [...arr]; }) it ...
fweth's user avatar
  • 715
0 votes
1 answer
304 views

I am using strict mode for the following code. Trying to assign an object value from a Map. It is granted that the value I am getting from the Map isn't undefined but strict mode giving the following ...
Philopateer Nabil's user avatar
1 vote
1 answer
469 views

I'm getting an error from Typescript (4.8.2) STRICT: Argument of type 'State | undefined' is not assignable to parameter of type 'State'. Type 'undefined' is not assignable to type 'State'. ts(2345) ...
Fred Hors's user avatar
  • 3,823
0 votes
0 answers
734 views

I'm working on implementing strict type checking in TypeScript (TS2322). When writing the code like this, the IDE (IntelliJ) correctly validates that these variables are defined as strings: if (typeof ...
Jonathan Lloyd's user avatar
1 vote
1 answer
578 views

My script needs to call third party scripts that do not work under strict mode. Right now I explicitly disable the strict mode in my script for these calls: Set-StrictMode -Version 3 …my script here… ...
liori's user avatar
  • 42.7k
0 votes
1 answer
51 views

If I create a custom type such as: type LowercaseString = string And then use it in a function like this: function displayLowercaseString(input: LowercaseString) { ... } displayLowercaseString('...
StanFlint's user avatar
  • 171
0 votes
1 answer
274 views

When Option Strict is turned Off, which is the default for my application, VB will automatically convert the value when property is String. It appears to call the toString() of the incoming value's ...
Timothy C. Quinn's user avatar
0 votes
1 answer
337 views

I've been searching a lot for an answer to this REALLY simple question, but I cannot find it: " How to create constructors in strict mode ? " fetch(`https://restcountries.com/v3.1/name/${...
user avatar
1 vote
1 answer
451 views

Console.log runs twice. Underneath said it is to reason Strict Mode: React Hooks: useEffect() is called twice even if an empty array is used as an argument StrictMode renders components twice (on dev ...
Arman Ebrahimi's user avatar
2 votes
1 answer
78 views

As Perl constants are somewhat strange to use, I decided to implement my "class variables" as our variables, just like: our $foo = '...'; However when I added a UNITCHECK block using the ...
U. Windl's user avatar
  • 4,784
0 votes
1 answer
2k views

What is the proper syntax to declare a type string[] attribute in php? protected string[] $array_of_strings; does gives an error at '['
theking2's user avatar
  • 3,098
0 votes
0 answers
503 views

I have type error. Exists child component Pagination with type of props: interface BaseProps { url: string; rowKey: string; renderItem: (item: unknown) => React.ReactNode; params?: Record&...
Dimitriy's user avatar
  • 147
4 votes
2 answers
3k views

I have an existing Angular Application that started development at the time of Angular 4, now it's on Angular 12. But at the time of development, the strict mode was not enabled. Now after the ...
HassanMoin's user avatar
  • 2,234
8 votes
1 answer
4k views

I have an issue with running a test on my files. Would love if someone more experienced could help me out here. the following code gives me this error: error Parsing error: Binding arguments in ...
Hey's user avatar
  • 73
-1 votes
1 answer
141 views

I need to be able to create strict typed maps dynamically. Like this: $map = new Map( 'string,array<string,int>', [ 'foo' => [ 'bar' => 1 ] ]; I have seen a lot of solutions for ...
Vadim C.'s user avatar
4 votes
2 answers
241 views

I recently produced a stupid bug: "use strict"; function doSomething() { let testObject = {a: "foo", b: "bar", parent: "bla"}; if (parent in ...
Philipp Imhof's user avatar
1 vote
1 answer
781 views

Traditionally sqlite allowed any data type to be submitted to any field in a database table for example you could submit an INTEGER to a TEXT field. However strict table data types are now officially ...
mister_cool_beans's user avatar
1 vote
1 answer
1k views

I am trying to pull dates from news and government announcement texts I have scraped on Covid-19 in Hawaii. I have run a sample program on a dummy data set, and find dates generated for every number ...
Lawrence Nitz's user avatar
1 vote
1 answer
145 views

I am trying to use the following https://embed.plnkr.co/plunk/pWNOdA in a project that uses strict-DI. In the app-mockbackend.js you can see the following setup - angular.module('app').run(function($...
dale thompson's user avatar
0 votes
0 answers
172 views

I have two module files, in module2 I have a global variable, $global_var1 = 'global_var_sub'; sub global_var_sub { return something; } now, in module1, I do use module2; and then try to print ...
fthomas's user avatar
  • 17
1 vote
3 answers
680 views

I'm using Angular 12, which automatically adds strict mode to your projects. I was going through a tutorial to set up authentication in my project, but strict mode doesn't allow me to set it up as it ...
ACDev's user avatar
  • 159
1 vote
0 answers
1k views

Is there a way to disable the strict mode (although I didn't turn it on) for the specific test? I have a function that pushes the arguments object to an array. In my test, I need to check the array ...
Raz Luvaton's user avatar
  • 3,900
2 votes
1 answer
2k views

This is the structure of my project app/ |--src/ |--folder |--tsconfig.json here is my tsconfig file { "compilerOptions": { "target": "es5", &...
Med El Mobarik's user avatar
8 votes
2 answers
2k views

I'm still struggling to understand what's allowed and not allowed with strict aliasing. With this concrete example is it violation of strict aliasing rule? If not, why? Is it because I placement new a ...
Zebrafish's user avatar
  • 16.5k
3 votes
3 answers
243 views

I have a series of modules that perform output functions for my scripts. Sometimes the module is called directly -- it is called View -- and sometimes a child class that extends it is used instead (...
Timothy R. Butler's user avatar

1
2 3 4 5
10